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; }
/** * 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; }
/** * 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; }
private void buildFullName() { if (fullName != null) { return; } final Schema schema = getSchema(); if (!isBlank(schema.getFullName())) { final Identifiers identifiers = Identifiers.identifiers() .withIdentifierQuoteString("\"").build(); fullName = identifiers.quoteFullName(this); } else { // System data-types are reserved words, but should not be quoted fullName = getName(); } }
private void buildFullName() { if (fullName != null) { return; } final Schema schema = getSchema(); if (!isBlank(schema.getFullName())) { final Identifiers identifiers = Identifiers.identifiers() .withIdentifierQuoteString("\"").build(); fullName = identifiers.quoteFullName(this); } else { // System data-types are reserved words, but should not be quoted fullName = getName(); } }
for (final Schema schema: schemas) out.println(String.format("%s", schema.getFullName())); final Table[] tables = catalog.getTables(schema).toArray(new Table[0]); Arrays.sort(tables, NamedObjectSort.alphabetical);
for (final Schema schema: schemas) out.println("schema: " + schema.getFullName()); final Table[] tables = catalog.getTables(schema).toArray(new Table[0]); Arrays.sort(tables, NamedObjectSort.alphabetical);
for (final Schema schema: schemas) out.println("schema: " + schema.getFullName()); final Table[] tables = catalog.getTables(schema).toArray(new Table[0]); for (final Table table: tables)
for (final Schema schema: schemas) out.println("schema: " + schema.getFullName()); final Table[] tables = catalog.getTables(schema).toArray(new Table[0]); for (final Table table: tables)
for (final Schema schema: schemas) out.println("schema: " + schema.getFullName()); final Table[] tables = catalog.getTables(schema).toArray(new Table[0]); for (final Table table: tables)
for (final Schema schema: schemas) out.println("schema: " + schema.getFullName()); final Table[] tables = catalog.getTables(schema).toArray(new Table[0]); Arrays.sort(tables, NamedObjectSort.alphabetical);
for (final Schema schema: schemas) out.println("schema: " + schema.getFullName()); final Routine[] routines = catalog.getRoutines(schema) .toArray(new Routine[0]);
.lookupSchema(schema.getFullName()); if (!schemaOptional.isPresent())
.lookupSchema(schema.getFullName()); if (!schemaOptional.isPresent())
for (final Schema schema: schemas) out.println("schema: " + schema.getFullName()); final Table[] tables = catalog.getTables(schema).toArray(new Table[0]); Arrays.sort(tables, NamedObjectSort.alphabetical);
for (final Schema schema: schemas) out.println("schema: " + schema.getFullName()); final Table[] tables = catalog.getTables(schema).toArray(new Table[0]); for (final Table table: tables)
private Color getTableNameBgColor(final Table table) { final Color tableNameBgColor; final Schema schema = table.getSchema(); if (!colorMap.containsKey(schema)) { tableNameBgColor = pastelColorHTMLValue(schema.getFullName()); colorMap.put(schema, tableNameBgColor); } else { tableNameBgColor = colorMap.get(schema); } return tableNameBgColor; }
private void buildFullName() { if (fullName == null) { final StringBuilder buffer = new StringBuilder(); final String schemaFullName = schema.getFullName(); if (schema != null && !Utility.isBlank(schemaFullName)) { buffer.append(schemaFullName).append('.'); } final String quotedName = getName(); if (!Utility.isBlank(quotedName)) { buffer.append(quotedName); } fullName = buffer.toString(); } }
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 String getLookupKey() { final String lookupKey = super.getLookupKey(); if (Utility.isBlank(specificName)) { return lookupKey; } else { return getSchema().getFullName() + "." + specificName; } }