Package org.sonar.core.persistence

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


  @Deprecated
  public void update(QualityProfileDto dto) {
    DbSession session = mybatis.openSession(false);
    try {
      update(session, dto);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here


  @Deprecated
  public void delete(int id) {
    DbSession session = mybatis.openSession(false);
    try {
      delete(id, session);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

      }

      rule.setStatus(RuleStatus.REMOVED);
      dbClient.ruleDao().update(dbSession, rule);

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

    Date updateDate = new Date(system2.now());
    DbSession session = dbClient.openSession(true);
    try {
      delete(findCharacteristic(characteristicId, session), updateDate, session);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

  void delete(String key) {
    DbSession session = db.openSession(false);
    try {
      delete(session, key, false);
      session.commit();
    } finally {
      session.close();
    }
  }
View Full Code Here

        }
        String previousName = profile.getName();
        profile.setName(newName);
        db.qualityProfileDao().update(dbSession, profile);
        db.propertiesDao().updateProperties(PROFILE_PROPERTY_PREFIX + profile.getLanguage(), previousName, newName, dbSession);
        dbSession.commit();
        return true;
      }
      return false;
    } finally {
      dbSession.close();
View Full Code Here

    try {
      report.succeed();
      for (ComputationStep step : stepRegistry.steps()) {
        TimeProfiler stepProfiler = new TimeProfiler(LOG).start(step.getDescription());
        step.execute(session, report, project);
        session.commit();
        stepProfiler.stop();
      }

    } catch (Exception exception) {
      report.fail();
View Full Code Here

    } catch (Exception exception) {
      report.fail();
      Throwables.propagate(exception);
    } finally {
      logActivity(session, report, project);
      session.commit();
      MyBatis.closeQuietly(session);
      profiler.stop();
    }
  }
View Full Code Here

      GroupDto group = userDao.selectGroupByName(groupName, session);
      if (group == null) {
        throw new NotFoundException("Group does not exists : " + groupName);
      }
      permissionTemplateDao.removeByGroup(group.getId(), session);
      session.commit();
    } finally {
      MyBatis.closeQuietly(session);
    }
  }
View Full Code Here

        for (Map.Entry<String, Collection<RulesProfile>> entry : profilesByName(defs).entrySet()) {
          String name = entry.getKey();
          QProfileName profileName = new QProfileName(language, name);
          if (shouldRegister(profileName, session)) {
            register(profileName, entry.getValue(), session);
            session.commit();
          }
          builtInProfiles.put(language, name);
        }
        setDefault(language, defs, session);
        session.commit();
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.