Package com.ateam.webstore.dao

Examples of com.ateam.webstore.dao.AddressDAO


public class AddressService implements RepositoryService<Address> {

  @Override
  public Address store(Address address) {
   
    AddressDAO repository = new AddressDAO();
    return repository.save(address);
   
  }
View Full Code Here


  }

  @Override
  public void remove(Address address) {
   
    AddressDAO repository = new AddressDAO();
    repository.delete(address);
   
  }
View Full Code Here

  }

  @Override
  public Collection<Address> getAll() {

    AddressDAO repository = new AddressDAO();
    return repository.getAll();
   
  }
View Full Code Here

   
  }

  @Override
  public Address getById(Serializable id) {
    AddressDAO repository = new AddressDAO();
    return repository.get(id);
  }
View Full Code Here

    return repository.get(id);
  }
 
  public Collection<Address> getByCustomerId(Serializable id) {
    Customer customer = new CustomerService().getById(id);
    AddressDAO repository = new AddressDAO();
    return repository.getByPerson(customer.getPerson());
  }
View Full Code Here

TOP

Related Classes of com.ateam.webstore.dao.AddressDAO

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.