@Override public String toString() { return getFullName(); }
@Override public String toString() { return getFullName(); }
/** * {@inheritDoc} */ @Override public Optional<SchemaReference> lookupSchema(final String name) { // Schemas need to be looked up by full name, since either the // catalog or schema may be null, depending on the database if (name == null) { return Optional.empty(); } for (final SchemaReference schema: schemas) { if (name.equals(schema.getFullName())) { return Optional.of(schema); } } return Optional.empty(); }
/** * {@inheritDoc} */ @Override public Optional<SchemaReference> lookupSchema(final String name) { // Schemas need to be looked up by full name, since either the // catalog or schema may be null, depending on the database if (name == null) { return Optional.empty(); } for (final SchemaReference schema: schemas) { if (name.equals(schema.getFullName())) { return Optional.of(schema); } } return Optional.empty(); }
@Override public int compareTo(final NamedObject otherSchemaRef) { if (otherSchemaRef == null) { return -1; } else { return convertForComparison(getFullName()) .compareTo(convertForComparison(otherSchemaRef.getFullName())); } }
@Override public int compareTo(final NamedObject otherSchemaRef) { if (otherSchemaRef == null) { return -1; } else { return convertForComparison(getFullName()) .compareTo(convertForComparison(otherSchemaRef.getFullName())); } }
@Test public void schemaRef() { assertThat(new SchemaReference("catalog", "schema").getFullName(), is("catalog.schema")); assertThat(new SchemaReference(null, "schema").getFullName(), is("schema")); assertThat(new SchemaReference("catalog", null).getFullName(), is("catalog")); }
schemaRef.getFullName())); iterator.remove();
schemaRef.getFullName())); iterator.remove();
@Override public String getLookupKey() { return getFullName(); }
@Override public String toString() { return getFullName(); }
@Override public String toString() { return getFullName(); }
@Override public String toString() { return getFullName(); }
/** * {@inheritDoc} */ @Override public Optional<SchemaReference> lookupSchema(final String name) { // Schemas need to be looked up by full name, since either the // catalog or schema may be null, depending on the database if (name == null) { return Optional.empty(); } for (final SchemaReference schema: schemas) { if (name.equals(schema.getFullName())) { return Optional.of(schema); } } return Optional.empty(); }
@Override public int compareTo(final NamedObject otherSchemaRef) { if (otherSchemaRef == null) { return -1; } else { return getFullName().replaceAll("\"", "").compareTo(otherSchemaRef .getFullName().replaceAll("\"", "")); } }
/** * {@inheritDoc} */ @Override public Optional<SchemaReference> lookupSchema(final String name) { // Schemas need to be looked up by full name, since either the // catalog or schema may be null, depending on the database if (name == null) { return Optional.empty(); } for (final SchemaReference schema: schemas) { if (name.equals(schema.getFullName())) { return Optional.of(schema); } } return Optional.empty(); }
@Override public int compareTo(final NamedObject otherSchemaRef) { if (otherSchemaRef == null) { return -1; } else { return convertForComparison(getFullName()) .compareTo(convertForComparison(otherSchemaRef.getFullName())); } }
@Override public int compareTo(final NamedObject otherSchemaRef) { if (otherSchemaRef == null) { return -1; } else { return convertForComparison(getFullName()) .compareTo(convertForComparison(otherSchemaRef.getFullName())); } }
+ schemaRef.getFullName()); iterator.remove();
schemaRef.getFullName())); iterator.remove();