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

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