コード例 #1
0
  @Override
  public Issue update(Issue issue) {
    logger.info("> update");

    counterService.increment("services.issueservice.update.invoked");

    Issue updatedIssue = issueRepository.save(issue);

    logger.info("< update");
    return updatedIssue;
  }
コード例 #2
0
  @Override
  public Issue create(Issue issue) {
    logger.info("> create");

    counterService.increment("services.issueservice.create.invoked");

    // Set default attribute values
    issue.setStatus(IssueStatus.OPEN);

    if (issue.getPriority() == null) {
      issue.setPriority(IssuePriority.MEDIUM);
    }

    Issue persistedIssue = issueRepository.save(issue);

    logger.info("< create");
    return persistedIssue;
  }