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())); }
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())); }
private void verifyExecution3(DeployExecution execution3) { assertEquals("try3", execution3.getReason()); assertEquals( Sets.immutable.with( new DeployExecutionAttributeImpl("F", "fval") ), execution3.getAttributes()); } }
private void verifyExecution3(DeployExecution execution3) { assertEquals("try3", execution3.getReason()); assertEquals( Sets.immutable.with( new DeployExecutionAttributeImpl("F", "fval") ), execution3.getAttributes()); } }
private void verifyExecution2(DeployExecution execution2) { assertEquals("try2", execution2.getReason()); assertEquals( Sets.immutable.with( new DeployExecutionAttributeImpl("C", "cval2"), new DeployExecutionAttributeImpl("E", "eval") ), execution2.getAttributes()); }
private void verifyExecution1(DeployExecution execution1) { assertEquals("try1", execution1.getReason()); assertEquals( Sets.immutable.with( new DeployExecutionAttributeImpl("A", "aval"), new DeployExecutionAttributeImpl("B", "bval") ), execution1.getAttributes()); }
private void verifyExecution1(DeployExecution execution1) { assertEquals("try1", execution1.getReason()); assertEquals( Sets.immutable.<DeployExecutionAttribute>with(new DeployExecutionAttributeImpl("attr1", "v1_val1"), new DeployExecutionAttributeImpl("attr2", "v1_val2")), execution1.getAttributes()); }
private void verifyExecution1(DeployExecution execution1) { assertEquals("try1", execution1.getReason()); assertEquals( Sets.immutable.with( new DeployExecutionAttributeImpl("A", "aval"), new DeployExecutionAttributeImpl("B", "bval") ), execution1.getAttributes()); }
private void verifyExecution2(DeployExecution execution2) { assertEquals("try2", execution2.getReason()); assertEquals( Sets.immutable.with( new DeployExecutionAttributeImpl("C", "cval2"), new DeployExecutionAttributeImpl("E", "eval") ), execution2.getAttributes()); }
private void verifyExecution1(DeployExecution execution1) { assertEquals("try1", execution1.getReason()); assertEquals( Sets.immutable.<DeployExecutionAttribute>with(new DeployExecutionAttributeImpl("attr1", "v1_val1"), new DeployExecutionAttributeImpl("attr2", "v1_val2")), execution1.getAttributes()); }
private void verifyExecution2(DeployExecution execution2) { assertEquals("try2", execution2.getReason()); assertEquals( Sets.immutable.<DeployExecutionAttribute>with(new DeployExecutionAttributeImpl("attr1", "v2_val1"), new DeployExecutionAttributeImpl("attr2", "v2_val2"), new DeployExecutionAttributeImpl("attr3", "v2_val3")), execution2.getAttributes()); }
private void verifyExecution1a(DeployExecution execution1) { assertEquals("try1a-noop", execution1.getReason()); assertEquals( Sets.immutable.with( new DeployExecutionAttributeImpl("A", "aval"), new DeployExecutionAttributeImpl("B", "bval"), new DeployExecutionAttributeImpl("C", "cval") ), execution1.getAttributes()); }
private void verifyExecution2(DeployExecution execution2) { assertEquals("try2", execution2.getReason()); assertEquals( Sets.immutable.<DeployExecutionAttribute>with(new DeployExecutionAttributeImpl("attr1", "v2_val1"), new DeployExecutionAttributeImpl("attr2", "v2_val2"), new DeployExecutionAttributeImpl("attr3", "v2_val3")), execution2.getAttributes()); }
private void verifyExecution1a(DeployExecution execution1) { assertEquals("try1a-noop", execution1.getReason()); assertEquals( Sets.immutable.with( new DeployExecutionAttributeImpl("A", "aval"), new DeployExecutionAttributeImpl("B", "bval"), new DeployExecutionAttributeImpl("C", "cval") ), execution1.getAttributes()); }
entry.isRollback() ? 1 : 0, entry.getRequesterId(), entry.getReason(), entry.getSchema(), entry.getProductVersion()
entry.isRollback() ? 1 : 0, entry.getRequesterId(), entry.getReason(), entry.getSchema(), entry.getProductVersion()