Exemplo n.º 1
0
  public List<Customer> getCustomerList(Member member, ProjectGroup projectGroup) {
    Session session = genericDAO.getSession();
    Criteria cr = session.createCriteria(Customer.class);
    cr.add(Restrictions.eq("projectGroup", projectGroup));
    if (member.getAuth().equals("1")) cr.add(Restrictions.eq("member", member));
    List<Customer> resultList = cr.list();

    return resultList;
  }
Exemplo n.º 2
0
 public void updateCustomer(Customer customer) {
   genericDAO.update(customer);
 }
Exemplo n.º 3
0
 public Customer getCustomer(String id) {
   Customer customer = genericDAO.get(Customer.class, id);
   return customer;
 }
Exemplo n.º 4
0
 public void insertCustomer(Customer customer) {
   genericDAO.save(customer);
 }