Package org.sonar.core.persistence

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


    DbSession session = dbClient.openSession(false);
    try {
      ComponentDto project = getByKey(projectKey);

      resourceKeyUpdaterDao.bulkUpdateKey(project.getId(), stringToReplace, replacementString);
      session.commit();

      ComponentDto newProject = dbClient.componentDao().getById(project.getId(), session);
      previewCache.reportResourceModification(newProject.key());

      session.commit();
View Full Code Here


      session.commit();

      ComponentDto newProject = dbClient.componentDao().getById(project.getId(), session);
      previewCache.reportResourceModification(newProject.key());

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

        // Do not delegate creation to QProfileBackuper because we need to keep
        // the parent-child association, if exists.
        toProfile = factory.create(dbSession, toProfileName);
        toProfile.setParentKee(fromProfile.getParentKee());
        db.qualityProfileDao().update(dbSession, toProfile);
        dbSession.commit();
      }
      return toProfileName;

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

  public void addProject(int profileId, long projectId, UserSession userSession) {
    DbSession session = db.openSession(false);
    try {
      addProject(profileId, projectId, userSession, session);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

      ComponentDto project = db.componentDao().getById(projectId, session);
      checkPermission(userSession, project.key());
      QualityProfileDto qualityProfile = findNotNull(profileId, session);

      db.propertiesDao().deleteProjectProperty(QProfileProjectLookup.PROFILE_PROPERTY_PREFIX + qualityProfile.getLanguage(), project.getId(), session);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

    try {
      ComponentDto project = db.componentDao().getById(projectId, session);
      checkPermission(userSession, project.key());

      db.propertiesDao().deleteProjectProperty(QProfileProjectLookup.PROFILE_PROPERTY_PREFIX + language, project.getId(), session);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

    checkPermission(userSession);
    DbSession session = db.openSession(false);
    try {
      QualityProfileDto qualityProfile = findNotNull(profileId, session);
      db.propertiesDao().deleteProjectProperties(QProfileProjectLookup.PROFILE_PROPERTY_PREFIX + qualityProfile.getLanguage(), qualityProfile.getName(), session);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

        dao.cleanWithTruncate(session);
      } else {
        dao.cleanWithUpdateAllToPendingStatus(session);
      }

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

            }
            activations.add(activation);
          }
        }
        doReset(dbSession, profile, activations);
        dbSession.commit();
      }
    } finally {
      dbSession.close();
    }
  }
View Full Code Here

  BulkChangeResult reset(QProfileName profileName, Collection<RuleActivation> activations) {
    DbSession dbSession = db.openSession(false);
    try {
      QualityProfileDto profile = factory.getOrCreate(dbSession, profileName);
      BulkChangeResult result = doReset(dbSession, profile, activations);
      dbSession.commit();
      return result;
    } finally {
      dbSession.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.