Package com.ateam.webstore.model

Examples of com.ateam.webstore.model.Person


*/
public class PersonDAO extends GenericDAOImpl<Person, Serializable> {

  public Person getPersonByLogin(String email) {
   
    Person person = null;
   
    try {
      Query query = getPersistenceManager().newQuery(getPersistentClass(), "login == :email");
      query.setUnique(true);
      person = (Person) query.execute(email);
View Full Code Here


    }
  }
 
  public Person getPersonByLoginAndPassword(String email, String password) {
   
    Person person = null;
   
    try {
      Query query = getPersistenceManager().newQuery(getPersistentClass(), "login == :email && password == :password");
      query.setUnique(true);
      HashMap<String, String> params = new HashMap<String, String>();
View Full Code Here

  }
 
  public Employee registerEmployee(String fname, String lname, String email, String password, Long securityQuestionID, String securityAnswer
      , String ssn, String jobTitle, Date dateOfHire, String deptCode, Double salary) {
    SecurityQuestion secQuestion = new SecurityQuestionService().getById(securityQuestionID);
    Person person = new Person(email, password, secQuestion, securityAnswer);
    return store(new Employee(fname, lname, ssn, jobTitle, dateOfHire, deptCode, salary, person));
  }
View Full Code Here

    return store(new Employee(fname, lname, ssn, jobTitle, dateOfHire, deptCode, salary, person));
  }
 
  public boolean employeeExists(String email) {
    PersonService personServ = new PersonService();
    Person person = personServ.getByLogin(email);
    return (person != null);
  }
View Full Code Here

    return (person != null);
  }
 
  public Employee getEmployee(String email) {
    PersonService personServ = new PersonService();
    Person person = personServ.getByLogin(email);
    return getById(person.getEmployee().getId()); //person.getEmployee();
  }
View Full Code Here

    return getById(person.getEmployee().getId()); //person.getEmployee();
  }
 
  public Employee authenticateEmployee(String email, String password) {
    PersonService personServ = new PersonService();
    Person person = personServ.getByLoginAndPassword(email, password);
    return getById(person.getEmployee().getId())//person.getEmployee();
 
View Full Code Here

  }
 
  public Customer registerCustomer(String fname, String lname, String email, String password, Long securityQuestionID, String securityAnswer) {
   
    SecurityQuestion secQuestion = new SecurityQuestionService().getById(securityQuestionID);
    Person person = new Person(email, password, secQuestion, securityAnswer);
//    CustomerService custService = new CustomerService();
    return store(new Customer(fname, lname, person));
  }
View Full Code Here

    return store(new Customer(fname, lname, person));
  }
 
  public boolean customerExists(String email) {
    PersonService personServ = new PersonService();
    Person person = personServ.getByLogin(email);
    return (person != null);
  }
View Full Code Here

    return (person != null);
  }
 
  public Customer getCustomer(String email) {
    PersonService personServ = new PersonService();
    Person person = personServ.getByLogin(email);
    return person.getCustomer();
   
  }
View Full Code Here

   
  }
 
  public Customer authenticateCustomer(String email, String password) {
    PersonService personServ = new PersonService();
    Person person = personServ.getByLoginAndPassword(email, password);
    return person.getCustomer();
 
View Full Code Here

TOP

Related Classes of com.ateam.webstore.model.Person

Copyright © 2018 www.massapicom. 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.