Examples of Change


Examples of com.softsizo.data.Change

        return false;
    }

    private void dumpChanges() {
        if(versionedFile!=null){
            Change change = new Change(changeSet, versionedFile, lineCount);
            this.changeSet.addChange(change);
            this.versionedFile.addChange(change);
        }
        this.lineCount = new LineCount();
        this.versionedFile = null;
View Full Code Here

Examples of com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change

     * test.
     */
    @Test
    public void testMakeRefSpec1() {
        PatchsetCreated event = new PatchsetCreated();
        Change change = new Change();
        change.setNumber("1");
        event.setChange(change);
        PatchSet patch = new PatchSet();
        patch.setNumber("1");
        event.setPatchset(patch);
        String expResult = StringUtil.REFSPEC_PREFIX + "01/1/1";
View Full Code Here

Examples of gov.nysenate.openleg.model.Change

            try {
                // Extract object descriptors from the entry key
                String key = entry.getKey();
                String otype = key.split("/")[1];
                String oid = key.split("/")[2];
                Change change = entry.getValue();
                logger.debug("Indexing "+change.getStatus()+" "+otype+": "+oid);

                // We don't currently index agendas; meetings get their own entries
                // and meeting votes are attached to bills
                if (otype.equals("agenda")) continue;

                if (change.getStatus() == Storage.Status.DELETED) {
                    if(otype.equals("bill")) {
                        // When a bill is deleted, also remove its sub-documents
                        lucene.deleteDocumentsByQuery("otype:action AND billno:" + oid);
                        lucene.deleteDocumentsByQuery("otype:vote AND billno:" + oid);
                        lucene.deleteDocumentById(oid);
View Full Code Here

Examples of jetbrains.communicator.ide.Change

      return line;
    }

    int addOn = 0;
    for (int i = 0; i < myChanges.length; i++) {
      Change change = myChanges[i];

      if (line < change.getSrcLine()) {
        break;
      }

      addOn += change.getInserted();
      addOn -= change.getDeleted();
    }

    int result = Math.max(line + addOn, 0);
    if (myDestLines != null) {
      return Math.min(myDestLines.length - 1, result);
View Full Code Here

Examples of liquibase.change.Change

                }

                TestState state = new TestState(name.getMethodName(), changeName, database.getShortName(), TestState.Type.SQL);
                state.addComment("Database: " + database.getShortName());

                Change change = changeFactory.create(changeName);
                if (!change.supports(database)) {
                    continue;
                }
                if (change.generateStatementsVolatile(database)) {
                    continue;
                }
                ChangeMetaData changeMetaData = ChangeFactory.getInstance().getChangeMetaData(change);

                change.setResourceAccessor(new JUnitResourceAccessor());

                for (String paramName : new TreeSet<String>(changeMetaData.getRequiredParameters(database).keySet())) {
                    ChangeParameterMetaData param = changeMetaData.getParameters().get(paramName);
                    Object paramValue = param.getExampleValue(database);
                    String serializedValue;
                    serializedValue = formatParameter(paramValue);
                    state.addComment("Change Parameter: " + param.getParameterName() + "=" + serializedValue);
                    param.setValue(change, paramValue);
                }

                ValidationErrors errors = change.validate(database);
                assertFalse("Validation errors for " + changeMetaData.getName() + " on " + database.getShortName() + ": " + errors.toString(), errors.hasErrors());

                SqlStatement[] sqlStatements = change.generateStatements(database);
                for (SqlStatement statement : sqlStatements) {
                    Sql[] sql = SqlGeneratorFactory.getInstance().generateSql(statement, database);
                    if (sql == null) {
                        System.out.println("Null sql for " + statement + " on " + database.getShortName());
                    } else {
View Full Code Here

Examples of org.apache.ibatis.migration.Change

    super(repository, environment, force);
  }

  public void execute(String... params) {
    try {
      Change lastChange = getLastAppliedChange();
      List<Change> migrations = getMigrations();
      Collections.reverse(migrations);
      int steps = 0;
      for (Change change : migrations) {
        if (change.getId().equals(lastChange.getId())) {
          printStream.println(horizontalLine("Undoing: " + change.getFilename(), 80));
          ScriptRunner runner = getScriptRunner();
          try {
            runner.runScript(new MigrationReader(new FileReader(scriptFile(change.getFilename())), true, environmentProperties()));
          } finally {
View Full Code Here

Examples of org.apache.ibatis.migration.Change

    }
    Arrays.sort(filenames);
    List<Change> migrations = new ArrayList<Change>();
    for (String filename : filenames) {
      if (filename.endsWith(".sql") && !"bootstrap.sql".equals(filename)) {
        Change change = parseChangeFromFilename(filename);
        migrations.add(change);
      }
    }
    return migrations;
  }
View Full Code Here

Examples of org.apache.ibatis.migration.Change

      List<Change> changes = new ArrayList<Change>();
      for (Map<String, Object> change : changelog) {
        String id = change.get("ID") == null ? null : change.get("ID").toString();
        String appliedAt = change.get("APPLIED_AT") == null ? null : change.get("APPLIED_AT").toString();
        String description = change.get("DESCRIPTION") == null ? null : change.get("DESCRIPTION").toString();
        changes.add(new Change(new BigDecimal(id), appliedAt, description));
      }
      return changes;
    } catch (SQLException e) {
      throw new MigrationException("Error querying last applied migration.  Cause: " + e, e);
    } finally {
View Full Code Here

Examples of org.apache.ibatis.migration.Change

    return new File(base.getAbsoluteFile() + File.separator + sub);
  }

  private Change parseChangeFromFilename(String filename) {
    try {
      Change change = new Change();
      String[] parts = filename.split("\\.")[0].split("_");
      change.setId(new BigDecimal(parts[0]));
      StringBuilder builder = new StringBuilder();
      for (int i = 1; i < parts.length; i++) {
        if (i > 1) {
          builder.append(" ");
        }
        builder.append(parts[i]);
      }
      change.setDescription(builder.toString());
      change.setFilename(filename);
      return change;
    } catch (Exception e) {
      throw new MigrationException("Error parsing change from file.  Cause: " + e, e);
    }
  }
View Full Code Here

Examples of org.apache.ibatis.migration.Change

    this.runOneStepOnly = runOneStepOnly;
  }

  public void execute(String... params) {
    try {
      Change lastChange = null;
      if (changelogExists()) {
        lastChange = getLastAppliedChange();
      }
      List<Change> migrations = getMigrations();
      for (Change change : migrations) {
        if (lastChange == null || change.getId().compareTo(lastChange.getId()) > 0) {
          out.println(horizontalLine("Applying: " + change.getFilename(), 80));
          ScriptRunner runner = getScriptRunner();
          try {
            runner.runScript(new MigrationReader(new FileReader(scriptFile(change.getFilename())), false, environmentProperties()));
          } finally {
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.