예제 #1
0
  @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);
  }
예제 #2
0
  @Override
  public void delete(IncomeItem item) {
    if (item == null) {
      throw new NullPointerException("item is null.");
    }

    repo.delete(item.getId());
  }
예제 #3
0
 @Override
 public IncomeItem findByIdAndOwner(Integer id, User user) {
   return repo.findByIdAndOwner(id, user);
 }
예제 #4
0
 @Override
 public IncomeItem save(IncomeItem item) {
   return repo.save(item);
 }