181920212223242526
public class WishListService implements RepositoryService<WishList> { @Override public WishList store(WishList wishList) { WishListDAO repository = new WishListDAO(); return repository.save(wishList); }
262728293031323334
} @Override public void remove(WishList wishList) { WishListDAO repository = new WishListDAO(); repository.delete(wishList); }
343536373839404142
} @Override public Collection<WishList> getAll() { WishListDAO repository = new WishListDAO(); return repository.getAll(); }
4142434445464748
} @Override public WishList getById(Serializable id) { WishListDAO repository = new WishListDAO(); return repository.get(id); }
4849505152535455
} public WishList getByCustomerId(Serializable customerID) { Customer customer = new CustomerService().getById(customerID); WishListDAO repository = new WishListDAO(); return repository.getByCustomer(customer); }