public Color getColor(final DatabaseObject dbObject) { requireNonNull(dbObject, "No database object provided"); if (noColors) { return default_object_color; } final Color tableColor; final String schemaName = dbObject.getSchema().getFullName(); final Optional<Color> colorMatch = colorMap.match(schemaName); if (!colorMatch.isPresent()) { tableColor = generatePastelColor(schemaName); colorMap.putLiteral(schemaName, tableColor); } else { tableColor = colorMatch.get(); } return tableColor; }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof SchemaReference)) { return false; } final Schema other = (Schema) obj; return Objects.equals(catalogName, other.getCatalogName()) && Objects.equals(schemaName, other.getName()); }
.compareTo(((DatabaseObject) obj).getSchema()); if (schemaCompareTo != 0)
.lookupSchema(schema.getFullName()); if (!schemaOptional.isPresent()) new StringFormat("Retrieving data types for schema <%s>", schema)); final String catalogName = schema.getCatalogName(); final String schemaName = schema.getName();
@Override public String getSchemaName(Schema schema) { return schema.getCatalogName(); }
@Override public String getSubschemaName(Schema schema) { return schema.getName(); } }
@Override public List<String> toUniqueLookupKey() { // Make a defensive copy final List<String> lookupKey = new ArrayList<>(schema.toUniqueLookupKey()); lookupKey.add(getName()); return lookupKey; }
.lookupSchema(schema.getFullName()); if (!schemaOptional.isPresent()) new StringFormat("Retrieving data types for schema <%s>", schema)); final String catalogName = schema.getCatalogName(); final String schemaName = schema.getName();
@Override public boolean accept(Schema each) { return each.getCatalogName().equals(physicalSchema.getPhysicalName()); } });
@Override public String getSchemaName(Schema schema) { return schema.getName(); }
@Override public List<String> toUniqueLookupKey() { // Make a defensive copy final List<String> lookupKey = new ArrayList<>(schema.toUniqueLookupKey()); lookupKey.add(getName()); return lookupKey; }
@Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof SchemaReference)) { return false; } final Schema other = (Schema) obj; return Objects.equals(catalogName, other.getCatalogName()) && Objects.equals(schemaName, other.getName()); }
.lookupSchema(schema.getFullName()); if (!schemaOptional.isPresent()) new StringFormat("Retrieving data types for schema <%s>", schema)); final String catalogName = schema.getCatalogName(); final String schemaName = schema.getName();
/** * Check for database object limiting rules. * * @param databaseObject * Database object to check * @return Whether the table should be included */ @Override public boolean test(final D databaseObject) { if (databaseObject == null) { return false; } boolean include = true; if (include && schemaInclusionRule != null) { include = schemaInclusionRule .test(databaseObject.getSchema().getFullName()); } if (include && databaseObjectInclusionRule != null) { include = databaseObjectInclusionRule.test(databaseObject.getFullName()); } return include; }
@Override public boolean accept(Schema each) { return each.getCatalogName().equals(physicalSchema.getPhysicalName()); } });
.compareTo(((DatabaseObject) obj).getSchema()); if (schemaCompareTo != 0)
@Override public List<String> toUniqueLookupKey() { // Make a defensive copy final List<String> lookupKey = new ArrayList<>(schema.toUniqueLookupKey()); lookupKey.add(getName()); return lookupKey; }
private void quoteFullName(final StringBuilder buffer, final Schema schema) { requireNonNull(buffer, "No buffer provided"); if (schema == null) { return; } final String catalogName = schema.getCatalogName(); final String schemaName = schema.getName(); final boolean hasCatalogName = !isBlank(catalogName); final boolean hasSchemaName = !isBlank(schemaName); if (hasCatalogName) { quoteName(buffer, catalogName); } if (hasCatalogName && hasSchemaName) { buffer.append("."); } if (hasSchemaName) { quoteName(buffer, schemaName); } }
.lookupSchema(schema.getFullName()); if (!schemaOptional.isPresent()) new StringFormat("Retrieving data types for schema <%s>", schema)); final String catalogName = schema.getCatalogName(); final String schemaName = schema.getName();
/** * Check for database object limiting rules. * * @param databaseObject * Database object to check * @return Whether the table should be included */ @Override public boolean test(final D databaseObject) { if (databaseObject == null) { return false; } boolean include = true; if (include && schemaInclusionRule != null) { include = schemaInclusionRule .test(databaseObject.getSchema().getFullName()); } if (include && databaseObjectInclusionRule != null) { include = databaseObjectInclusionRule.test(databaseObject.getFullName()); } return include; }