Tabnine Logo
DeployExecution
Code IndexAdd Tabnine to your IDE (free)

How to use
DeployExecution
in
com.gs.obevo.api.appdata

Best Java code snippets using com.gs.obevo.api.appdata.DeployExecution (Showing top 20 results out of 315)

origin: com.goldmansachs.obevo/obevo-mongodb

private Document getDocumentFromDeployExecution(DeployExecution deployExecution, boolean forUpdate) {
  ImmutableSet<Document> attrs = deployExecution.getAttributes().collect(new Function<DeployExecutionAttribute, Document>() {
    @Override
    public Document valueOf(DeployExecutionAttribute object) {
      return new Document()
          .append(attrNameColName, object.getName())
          .append(attrValueColName, object.getValue());
    }
  });
  return new Document()
      .append(idColName, deployExecution.getId())
      .append(requesterIdColName, deployExecution.getRequesterId())
      .append(deployExecutionIdColName, deployExecution.getExecutorId())
      .append(dbSchemaColName, deployExecution.getSchema())
      .append(toolVersionColName, deployExecution.getToolVersion())
      .append(deployTimeColName, new Date(deployExecution.getDeployTime().getTime()))
      .append(initCommandColName, deployExecution.isInit())
      .append(rollbackCommandColName, deployExecution.isRollback())
      .append(productVersionColName, deployExecution.getProductVersion())
      .append(reasonColName, deployExecution.getReason())
      .append("attrs", new ArrayList<>(attrs.toList()));
}
origin: com.goldmansachs.obevo/obevo-core

private void logDeployExecutions(ImmutableCollection<DeployExecution> deployExecutions, String message) {
  if (LOG.isInfoEnabled()) {
    LOG.info("Found {} {} for this schema", deployExecutions.size(), message);
    if (LOG.isDebugEnabled()) {
      for (DeployExecution deployExecution : deployExecutions.toSortedListBy(new Function<DeployExecution, Long>() {
        @Override
        public Long valueOf(DeployExecution deployExecution1) {
          return deployExecution1.getId();
        }
      })) {
        LOG.debug("Execution ID={}, Version Name={}, Deploy Time={}, Rollback={}",
            deployExecution.getId(), getDeployVersion(deployExecution), deployExecution.getDeployTime(), deployExecution.isRollback());
      }
    }
  }
}
origin: goldmansachs/obevo

  @Override
  public void value(Connection conn) {
    jdbc.update(conn, "UPDATE " + platform.getSchemaPrefix(physicalSchema) + deployExecutionTableName + " " +
            "SET " + statusColName + " = ? " +
            "WHERE " + idColName + " = ? ",
        String.valueOf(entry.getStatus().getStatusCode()),
        entry.getId()
    );
  }
});
origin: goldmansachs/obevo

  @Override
  public Long valueOf(DeployExecution deployExecution) {
    return deployExecution.getId();
  }
});
origin: goldmansachs/obevo

  private void verifyExecution3(DeployExecution execution3) {
    assertEquals("try3", execution3.getReason());
    assertEquals(
        Sets.immutable.with(
            new DeployExecutionAttributeImpl("F", "fval")
        ),
        execution3.getAttributes());
  }
}
origin: goldmansachs/obevo

  private DeployExecution newExecution(long id, String versionName, boolean rollback) {
    DeployExecution exec = mock(DeployExecution.class);
    when(exec.getId()).thenReturn(id);
    when(exec.isRollback()).thenReturn(rollback);
    when(exec.getProductVersion()).thenReturn(versionName);

    return exec;
  }
}
origin: com.goldmansachs.obevo/obevo-db

deployExecution.setStatus(DeployExecutionStatus.SUCCEEDED);
deployExecutionDao.persistNewSameContext(conn, deployExecution, physicalSchema);
jdbc.execute(conn, String.format("UPDATE %s SET %s = %s", schemaPlusTable, insertDeployExecutionIdColumn, deployExecution.getId()));
origin: com.goldmansachs.obevo/obevo-core

  private String getDeployVersion(DeployExecution deployExecution) {
    return ObjectUtils.defaultIfNull(deployExecution.getProductVersion(), "no-version-available");
  }
}
origin: com.goldmansachs.obevo/obevo-core

if (!currentExecution.isRollback()) {
  executionStack.push(currentExecution);
} else {
origin: com.goldmansachs.obevo/obevo-mongodb

@Override
public void update(DeployExecution deployExecution) {
  MongoDatabase database = mongoClient.getDatabase(env.getPhysicalSchema(deployExecution.getSchema()).getPhysicalName());
  MongoCollection<Document> auditCollection = database.getCollection(deployExecutionTableName);
  auditCollection.replaceOne(getChangeFilter(deployExecution), getDocumentFromDeployExecution(deployExecution, true));
}
origin: goldmansachs/obevo

  @Override
  public Long valueOf(DeployExecution deployExecution1) {
    return deployExecution1.getId();
  }
})) {
origin: com.goldmansachs.obevo/obevo-db-db2

  private void verifyExecution3(DeployExecution execution3) {
    assertEquals("try3", execution3.getReason());
    assertEquals(
        Sets.immutable.with(
            new DeployExecutionAttributeImpl("F", "fval")
        ),
        execution3.getAttributes());
  }
}
origin: goldmansachs/obevo

private void logDeployExecutions(ImmutableCollection<DeployExecution> deployExecutions, String message) {
  if (LOG.isInfoEnabled()) {
    LOG.info("Found {} {} for this schema", deployExecutions.size(), message);
    if (LOG.isDebugEnabled()) {
      for (DeployExecution deployExecution : deployExecutions.toSortedListBy(new Function<DeployExecution, Long>() {
        @Override
        public Long valueOf(DeployExecution deployExecution1) {
          return deployExecution1.getId();
        }
      })) {
        LOG.debug("Execution ID={}, Version Name={}, Deploy Time={}, Rollback={}",
            deployExecution.getId(), getDeployVersion(deployExecution), deployExecution.getDeployTime(), deployExecution.isRollback());
      }
    }
  }
}
origin: com.goldmansachs.obevo/obevo-db

  @Override
  public void value(Connection conn) {
    jdbc.update(conn, "UPDATE " + platform.getSchemaPrefix(physicalSchema) + deployExecutionTableName + " " +
            "SET " + statusColName + " = ? " +
            "WHERE " + idColName + " = ? ",
        String.valueOf(entry.getStatus().getStatusCode()),
        entry.getId()
    );
  }
});
origin: goldmansachs/obevo

deployExecution.setStatus(DeployExecutionStatus.SUCCEEDED);
deployExecutionDao.persistNewSameContext(conn, deployExecution, physicalSchema);
jdbc.execute(conn, String.format("UPDATE %s SET %s = %s", schemaPlusTable, insertDeployExecutionIdColumn, deployExecution.getId()));
origin: goldmansachs/obevo

  private String getDeployVersion(DeployExecution deployExecution) {
    return ObjectUtils.defaultIfNull(deployExecution.getProductVersion(), "no-version-available");
  }
}
origin: goldmansachs/obevo

if (!currentExecution.isRollback()) {
  executionStack.push(currentExecution);
} else {
origin: goldmansachs/obevo

@Override
public void update(DeployExecution deployExecution) {
  MongoDatabase database = mongoClient.getDatabase(env.getPhysicalSchema(deployExecution.getSchema()).getPhysicalName());
  MongoCollection<Document> auditCollection = database.getCollection(deployExecutionTableName);
  auditCollection.replaceOne(getChangeFilter(deployExecution), getDocumentFromDeployExecution(deployExecution, true));
}
origin: goldmansachs/obevo

private Document getDocumentFromDeployExecution(DeployExecution deployExecution, boolean forUpdate) {
  ImmutableSet<Document> attrs = deployExecution.getAttributes().collect(new Function<DeployExecutionAttribute, Document>() {
    @Override
    public Document valueOf(DeployExecutionAttribute object) {
      return new Document()
          .append(attrNameColName, object.getName())
          .append(attrValueColName, object.getValue());
    }
  });
  return new Document()
      .append(idColName, deployExecution.getId())
      .append(requesterIdColName, deployExecution.getRequesterId())
      .append(deployExecutionIdColName, deployExecution.getExecutorId())
      .append(dbSchemaColName, deployExecution.getSchema())
      .append(toolVersionColName, deployExecution.getToolVersion())
      .append(deployTimeColName, new Date(deployExecution.getDeployTime().getTime()))
      .append(initCommandColName, deployExecution.isInit())
      .append(rollbackCommandColName, deployExecution.isRollback())
      .append(productVersionColName, deployExecution.getProductVersion())
      .append(reasonColName, deployExecution.getReason())
      .append("attrs", new ArrayList<>(attrs.toList()));
}
origin: com.goldmansachs.obevo/obevo-core

  @Override
  public Long valueOf(DeployExecution deployExecution1) {
    return deployExecution1.getId();
  }
})) {
com.gs.obevo.api.appdataDeployExecution

Most used methods

  • getId
  • getAttributes
  • getProductVersion
  • getReason
  • isRollback
  • getDeployTime
  • getExecutorId
  • getRequesterId
  • getSchema
  • getToolVersion
  • isInit
  • getStatus
  • isInit,
  • getStatus,
  • setStatus

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • getResourceAsStream (ClassLoader)
  • setRequestProperty (URLConnection)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Path (java.nio.file)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now