Package de.peacei.gae.foodsupplier.data.dao

Source Code of de.peacei.gae.foodsupplier.data.dao.UserDAO

/**
*
*/
package de.peacei.gae.foodsupplier.data.dao;

import javax.jdo.PersistenceManager;
import javax.jdo.Query;

import de.peacei.gae.foodsupplier.data.User;
import de.peacei.gae.foodsupplier.util.PMF;

/**
* @author peacei
*
*/
public class UserDAO {
 
  public User getUserViaMail(String mailAddy) {
    User user = null;
   
        PersistenceManager pm = PMF.get().getPersistenceManager();
        try {
          Query query = pm.newQuery(User.class, "email == mailAddy");
          query.declareParameters("String mailAddy");
          query.setUnique(true);
          user = (User) query.execute(mailAddy);
   
        } catch(Exception e) {  }
       
    return user;
  }

}
TOP

Related Classes of de.peacei.gae.foodsupplier.data.dao.UserDAO

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.