Package org.sonar.core.persistence

Examples of org.sonar.core.persistence.DbSession.commit()


      if (profile == null) {
        // not enough information to create profile
        throw new IllegalStateException("Quality profile does not exist: " + profileKey);
      }
      BulkChangeResult result = doReset(dbSession, profile, activations);
      dbSession.commit();
      return result;

    } finally {
      dbSession.close();
    }
View Full Code Here


    DbSession session = dbClient.openSession(false);

    try {
      report.setFinishedAt(new Date(system2.now()));
      dao.delete(session, report);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

      if (nextAvailableReport == null) {
        return null;
      }

      AnalysisReportDto report = dao.bookAnalysisReport(session, nextAvailableReport);
      session.commit();

      return report;
    } finally {
      MyBatis.closeQuietly(session);
    }
View Full Code Here

      } else {
        UserSession.get().checkGlobalPermission(GlobalPermissions.PROVISIONING);
      }

      applyDefaultPermissionTemplate(session, component);
      session.commit();
    } finally {
      session.close();
    }
  }
View Full Code Here

      for (String componentKey : query.getSelectedComponents()) {
        ComponentDto component = dbClient.componentDao().getByKey(session, componentKey);
        permissionFacade.applyPermissionTemplate(session, query.getTemplateKey(), component.getId());
        synchronizeProjectPermissions(session, component.uuid());
      }
      session.commit();
    } finally {
      session.close();
    }
  }
View Full Code Here

          // Each custom rule should have this parameter
          insertCustomRuleParameterIfNotAlreadyExisting(templateRuleParam, templateRuleId, customRuleIdsByTemplateRuleId, customRuleParamsByRuleId, session);
        }
      }

      session.commit();

      // log the total number of process rows
      progressTask.log();
    } finally {
      session.close();
View Full Code Here

    try {
      Migration44Mapper mapper = session.getMapper(Migration44Mapper.class);
      for (Long measureId : mapper.selectMeasuresOnDeletedQualityProfiles()) {
        mapper.deleteProfileMeasure(measureId);
      }
      session.commit();

    } finally {
      session.close();
    }
  }
View Full Code Here

    assertThat(index.countAll()).isEqualTo(0);

    DbSession newSession = db.openSession(true);
    try {
      db.issueDao().synchronizeAfter(newSession, index.getLastSynchronization());
      newSession.commit();

    } finally {
      newSession.close();
    }
View Full Code Here

    assertThat(index.countAll()).isEqualTo(0);

    DbSession newSession = db.openSession(true);
    try {
      db.issueDao().synchronizeAfter(newSession);
      newSession.commit();

    } finally {
      newSession.close();
    }
View Full Code Here

    assertThat(index.countAll()).isEqualTo(0);

    DbSession newSession = db.openSession(true);
    try {
      db.issueDao().synchronizeAfter(newSession, index.getLastSynchronization());
      newSession.commit();

    } finally {
      newSession.close();
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.