121314151617181920
public class CustomerService implements RepositoryService<Customer> { @Override public Customer store(Customer customer) { CustomerDAO repository = new CustomerDAO(); return repository.save(customer); }
2021222324252627
} @Override public void remove(Customer customer) { CustomerDAO repository = new CustomerDAO(); repository.delete(customer); }
2728293031323334
} @Override public Collection<Customer> getAll() { CustomerDAO repository = new CustomerDAO(); return repository.getAll(); }
3334353637383940
return repository.getAll(); } @Override public Customer getById(Serializable id) { CustomerDAO repository = new CustomerDAO(); return repository.get(id); }