@Override public V get(Object key) { return this.getDelegate().get(key); }
@Override public V get(Object key) { return this.getDelegate().get(key); }
@Override public boolean containsKeyAndValue(Object key, Object value) { C collection = this.getMap().get(key); return collection != null && collection.contains(value); }
@Override public boolean containsKeyAndValue(Object key, Object value) { C collection = this.getMap().get(key); return collection != null && collection.contains(value); }
Object actualValue = mapIterable.get(expectedKey); if (!Comparators.nullSafeEquals(actualValue, expectedValue))
@Override public V get(Object key) { return this.getDelegate().get(key); }
@Override public boolean containsKeyAndValue(Object key, Object value) { C collection = this.getMap().get(key); return collection != null && collection.contains(value); }
public CellComparator getComparator(String columnName) { Twin<CellComparator> cellComparators = this.comparatorsByColumn.get(columnName); return cellComparators == null ? getDefaultComparator() : cellComparators.getOne(); }
public CellComparator getComparatorForRebase(String columnName) { Twin<CellComparator> cellComparators = this.comparatorsByColumn.get(columnName); return cellComparators == null ? this.defaultCellComparator.getTwo() : cellComparators.getTwo(); }
@Override public DaTable valueOf(Table object) { if (object instanceof View) { return new DaViewImpl((View) object, schemaStrategy, extraViewInfoMap.get(object.getName())); } else { return new DaTableImpl(object, schemaStrategy, extraIndexes); } } })
private void syncSchemaTables(DbPlatform dbPlatform, RichIterable<TableSyncSide> syncSides, File outputDir) { for (TableSyncSide syncSide : syncSides) { syncSide.enrichTables(dbPlatform); } RichIterable<DaTable> idealTables = this.createIdealTables(syncSides); MapIterable<String, DaTable> idealTablesMap = idealTables.groupByUniqueKey(DaNamedObject.TO_NAME); System.out.println("Starting the alters"); for (TableSyncSide syncSide : syncSides) { for (DaTable table : syncSide.getTables()) { File outputFile = new File(new File(outputDir, syncSide.getSchema().getPhysicalName()), table.getName() + ".sql"); this.generateDiffsToTable(table, idealTablesMap.get(table.getName()), outputFile); } } }
private void syncSchemaTables(DbPlatform dbPlatform, RichIterable<TableSyncSide> syncSides, File outputDir) { for (TableSyncSide syncSide : syncSides) { syncSide.enrichTables(dbPlatform); } RichIterable<DaTable> idealTables = this.createIdealTables(syncSides); MapIterable<String, DaTable> idealTablesMap = idealTables.groupByUniqueKey(DaNamedObject.TO_NAME); System.out.println("Starting the alters"); for (TableSyncSide syncSide : syncSides) { for (DaTable table : syncSide.getTables()) { File outputFile = new File(new File(outputDir, syncSide.getSchema().getPhysicalName()), table.getName() + ".sql"); this.generateDiffsToTable(table, idealTablesMap.get(table.getName()), outputFile); } } }
@Override public ImmutableCollection<DaIndex> getIndices() { return CollectionAdapter.adapt(table.getIndexes()) .collect(new Function<Index, DaIndex>() { @Override public DaIndex valueOf(Index object) { return new DaIndexImpl(object, schemaStrategy, extraIndexInfoMap.get(object.getName())); } }) .reject(new Predicate<DaIndex>() { @Override public boolean accept(DaIndex index) { ExtraIndexInfo extraIndexInfo = extraIndexInfoMap.get(index.getName()); return extraIndexInfo != null && extraIndexInfo.isConstraint(); } }) .toImmutable(); }
Object actualValue = mapIterable.get(expectedKey); if (!Comparators.nullSafeEquals(actualValue, expectedValue))