Package org.sonar.core.issue.db

Examples of org.sonar.core.issue.db.IssueMapper


    this.projectTree = projectTree;
  }

  @Override
  protected void doInsert(DbSession session, Date now, DefaultIssue issue) {
    IssueMapper issueMapper = session.getMapper(IssueMapper.class);
    long componentId = componentId(issue);
    long projectId = projectId();
    int ruleId = ruleId(issue);
    IssueDto dto = IssueDto.toDtoForBatchInsert(issue, componentId, projectId, ruleId, now);
    issueMapper.insert(dto);
  }
View Full Code Here


    issueMapper.insert(dto);
  }

  @Override
  protected void doUpdate(DbSession session, Date now, DefaultIssue issue) {
    IssueMapper issueMapper = session.getMapper(IssueMapper.class);
    IssueDto dto = IssueDto.toDtoForUpdate(issue, projectId(), now);
    if (Issue.STATUS_CLOSED.equals(issue.status()) || issue.selectedAt() == null) {
      // Issue is closed by scan or changed by end-user
      issueMapper.update(dto);

    } else {
      int count = issueMapper.updateIfBeforeSelectedDate(dto);
      if (count == 0) {
        // End-user and scan changed the issue at the same time.
        // See https://jira.codehaus.org/browse/SONAR-4309
        conflictResolver.resolve(issue, issueMapper);
      }
View Full Code Here

TOP

Related Classes of org.sonar.core.issue.db.IssueMapper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.