@Override public List<IncomeItem> findByOwnerAndBetweenIncomeDate(User user, Date startDate, Date endDate) { if (startDate == null || endDate == null) { return repo.findByOwner(user); } return repo.findByOwnerAndBetweenIncomeDate(user, startDate, endDate); }
@Override public void delete(IncomeItem item) { if (item == null) { throw new NullPointerException("item is null."); } repo.delete(item.getId()); }
@Override public IncomeItem findByIdAndOwner(Integer id, User user) { return repo.findByIdAndOwner(id, user); }
@Override public IncomeItem save(IncomeItem item) { return repo.save(item); }