}).toList().toImmutable();
}).toList().toImmutable();
private void validateNoBaselineBreaks(DbDeployerAppContext appContext, Predicate<? super CompareBreak> breakIgnorePredicate) { MutableList<CompareBreak> sortedCompareBreaks = this.calculateBaselineBreaks(appContext).toList().sortThis( Comparators.fromFunctions( CompareBreak.TO_COMPARE_SUBJECT, Functions.chain(CompareBreak.TO_CLAZZ, CLASS_TO_NAME), Functions.chain(Functions.getToClass(), CLASS_TO_NAME) )); MutableList<CompareBreak> relevantBreaks = sortedCompareBreaks.reject(breakIgnorePredicate); LOG.info("Found " + relevantBreaks.size() + " breaks"); if (!relevantBreaks.isEmpty()) { throw new IllegalArgumentException( "Found some mismatches between your change alters (LEFT) and your baseline files (RIGHT). Please review:\n" + relevantBreaks.makeString("\n")); } }
private void validateNoBaselineBreaks(DbDeployerAppContext appContext, Predicate<? super CompareBreak> breakIgnorePredicate) { MutableList<CompareBreak> sortedCompareBreaks = this.calculateBaselineBreaks(appContext).toList().sortThis( Comparators.fromFunctions( CompareBreak.TO_COMPARE_SUBJECT, Functions.chain(CompareBreak.TO_CLAZZ, CLASS_TO_NAME), Functions.chain(Functions.getToClass(), CLASS_TO_NAME) )); MutableList<CompareBreak> relevantBreaks = sortedCompareBreaks.reject(breakIgnorePredicate); LOG.info("Found " + relevantBreaks.size() + " breaks"); if (!relevantBreaks.isEmpty()) { throw new IllegalArgumentException( "Found some mismatches between your change alters (LEFT) and your baseline files (RIGHT). Please review:\n" + relevantBreaks.makeString("\n")); } }
@Override public MutableList<SchemaObjectRow> safeValueOf(Connection conn) throws Exception { return postDeployAction.getTablesNeedingReorg(conn, environment) .toList().sortThis(Comparators.fromFunctions(new Function<SchemaObjectRow, String>() { @Override public String valueOf(SchemaObjectRow schemaObjectRow1) { return schemaObjectRow1.getSchema(); } }, new Function<SchemaObjectRow, String>() { @Override public String valueOf(SchemaObjectRow schemaObjectRow) { return schemaObjectRow.getName(); } })); } });
@Override public MutableList<SchemaObjectRow> safeValueOf(Connection conn) throws Exception { return postDeployAction.getTablesNeedingReorg(conn, environment) .toList().sortThis(Comparators.fromFunctions(new Function<SchemaObjectRow, String>() { @Override public String valueOf(SchemaObjectRow schemaObjectRow1) { return schemaObjectRow1.getSchema(); } }, new Function<SchemaObjectRow, String>() { @Override public String valueOf(SchemaObjectRow schemaObjectRow) { return schemaObjectRow.getName(); } })); } });
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())); }
final Function<String, String> convertDbObjectName = env.getPlatform().convertDbObjectName(); MutableList<Change> artfs = env.getSchemaNames().toList().flatCollect(new Function<String, MutableList<Change>>() { @Override public MutableList<Change> valueOf(final String schema) {
final Function<String, String> convertDbObjectName = env.getPlatform().convertDbObjectName(); MutableList<Change> artfs = env.getSchemaNames().toList().flatCollect(new Function<String, MutableList<Change>>() { @Override public MutableList<Change> valueOf(final String schema) {