Exemplo n.º 1
0
  public Objective save(Objective objective) {
    objective.setRegisterDate(new Date());
    objective.setUser(session.getLoggedInUser());

    vp.basicValidate(objective);

    return repository.save(objective);
  }
Exemplo n.º 2
0
  public Objective get(Long id) {
    Objective objective = repository.findOne(id);

    if (isNull(objective)) {
      throw new ResourceNotFoundException();
    }

    return objective;
  }
Exemplo n.º 3
0
  @Transactional(propagation = Propagation.REQUIRED)
  public void delete(Long id) {
    Objective objective = get(id);

    repository.delete(objective);
  }
Exemplo n.º 4
0
  public Objective update(Objective objective) {
    vp.basicValidate(objective);

    return repository.save(objective);
  }
Exemplo n.º 5
0
 public List<Objective> findByProject(Long id) {
   return repository.findAllByProject(id);
 }