@Override public Function<String, String> convertDbObjectName() { return Functions.getPassThru(); }
@Override public Function<String, String> convertDbObjectName() { return Functions.getPassThru(); }
@Override public Function<String, String> convertDbObjectName() { return Functions.getPassThru(); }
@Override public Function<String, String> convertDbObjectName() { return Functions.getPassThru(); }
@Override public Function<String, String> convertDbObjectName() { return Functions.getPassThru(); }
@Override public Iterable<Pair<T, SortableDependency>> valueOf(T group) { return group.getComponents().collect(Functions.pair(Functions.getFixedValue(group), Functions.<SortableDependency>getPassThru())); } });
@Override public Iterable<Pair<T, SortableDependency>> valueOf(T group) { return group.getComponents().collect(Functions.pair(Functions.getFixedValue(group), Functions.<SortableDependency>getPassThru())); } });
/** * Returns true/false if all the schemas in the environment either need rollback (true) or don't (false). * * If some do and some don't, an exception is thrown. */ @Override public boolean determineRollback(final String productVersion, final ImmutableSet<String> schemas, final DeployExecutionDao deployExecutionDao) { MutableMap<String, Boolean> rollbackFlags = schemas.toMap( Functions.<String>getPassThru(), new Function<String, Boolean>() { @Override public Boolean valueOf(String schema) { LOG.info("Checking rollback status on Product Version {} and Schema {}", productVersion, schema); return DefaultRollbackDetector.this.determineRollbackForSchema(productVersion, deployExecutionDao.getDeployExecutions(schema)); } } ); MutableSet<Boolean> values = rollbackFlags.valuesView().toSet(); if (values.size() > 1) { MutableSetMultimap<Boolean, String> schemasByRollbackFlag = rollbackFlags.flip(); MutableSet<String> rollbackSchemas = schemasByRollbackFlag.get(Boolean.TRUE); MutableSet<String> nonrollbackSchemas = schemasByRollbackFlag.get(Boolean.FALSE); throw new IllegalArgumentException("The following schemas were calculated for rollback [" + rollbackSchemas + "], though the rest were not [" + nonrollbackSchemas + "]; cannot proceed in this mixed mode"); } return values.iterator().next().booleanValue(); }
/** * Returns true/false if all the schemas in the environment either need rollback (true) or don't (false). * * If some do and some don't, an exception is thrown. */ @Override public boolean determineRollback(final String productVersion, final ImmutableSet<String> schemas, final DeployExecutionDao deployExecutionDao) { MutableMap<String, Boolean> rollbackFlags = schemas.toMap( Functions.<String>getPassThru(), new Function<String, Boolean>() { @Override public Boolean valueOf(String schema) { LOG.info("Checking rollback status on Product Version {} and Schema {}", productVersion, schema); return DefaultRollbackDetector.this.determineRollbackForSchema(productVersion, deployExecutionDao.getDeployExecutions(schema)); } } ); MutableSet<Boolean> values = rollbackFlags.valuesView().toSet(); if (values.size() > 1) { MutableSetMultimap<Boolean, String> schemasByRollbackFlag = rollbackFlags.flip(); MutableSet<String> rollbackSchemas = schemasByRollbackFlag.get(Boolean.TRUE); MutableSet<String> nonrollbackSchemas = schemasByRollbackFlag.get(Boolean.FALSE); throw new IllegalArgumentException("The following schemas were calculated for rollback [" + rollbackSchemas + "], though the rest were not [" + nonrollbackSchemas + "]; cannot proceed in this mixed mode"); } return values.iterator().next().booleanValue(); }
appContext.cleanAndDeploy(); final MutableMap<PhysicalSchema, ImmutableCollection<DaTable>> regularTableMap = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, ImmutableCollection<DaTable>>() { @Override public ImmutableCollection<DaTable> valueOf(PhysicalSchema object) { final MutableMap<PhysicalSchema, ImmutableCollection<DaTable>> baselineTableMap = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, ImmutableCollection<DaTable>>() { @Override public ImmutableCollection<DaTable> valueOf(PhysicalSchema object) {
appContext.cleanAndDeploy(); final MutableMap<PhysicalSchema, ImmutableCollection<DaTable>> regularTableMap = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, ImmutableCollection<DaTable>>() { @Override public ImmutableCollection<DaTable> valueOf(PhysicalSchema object) { final MutableMap<PhysicalSchema, ImmutableCollection<DaTable>> baselineTableMap = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, ImmutableCollection<DaTable>>() { @Override public ImmutableCollection<DaTable> valueOf(PhysicalSchema object) {
this.platform = platform; this.physicalSchemas = physicalSchemas; this.nextIdBySchema = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, MutableInt>() { @Override public MutableInt valueOf(PhysicalSchema object) {
this.nextIdBySchema = env.getPhysicalSchemas().toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, MutableInt>() { @Override public MutableInt valueOf(PhysicalSchema object) {
this.nextIdBySchema = env.getPhysicalSchemas().toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, MutableInt>() { @Override public MutableInt valueOf(PhysicalSchema object) {
this.platform = platform; this.physicalSchemas = physicalSchemas; this.nextIdBySchema = physicalSchemas.toMap(Functions.<PhysicalSchema>getPassThru(), new Function<PhysicalSchema, MutableInt>() { @Override public MutableInt valueOf(PhysicalSchema object) {