Class TableReference

java.lang.Object
org.apache.sis.internal.sql.feature.TableReference

public class TableReference extends Object
A (catalog, schema, table) name tuple, which can be used as keys in hash map.
Since:
1.0
Version:
1.2
Author:
Johann Sorel (Geomatys), Martin Desruisseaux (Geomatys)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final String
    The catalog, schema and table name of a table.
    final String
    The catalog, schema and table name of a table.
    final String
    The catalog, schema and table name of a table.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Returns true if the given object is a TableReference with equal table, schema and catalog names.
    final int
    Computes a hash code from the catalog, schema and table names.
    Formats a string representation of this object for debugging purpose.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • catalog

      public final String catalog
      The catalog, schema and table name of a table. The table name is mandatory, but the schema and catalog names may be null or empty. Note that an empty string and null values have different meanings in JDBC metadata:
      • An empty string means that the table name has no catalog (or schema).
      • A null value means that the catalog (or schema) name should be ignored.
      Names are stored here as they were given by JDBC because those names are sometimes compared with other JDBC metadata or used for fetching more table metadata.
    • schema

      public final String schema
      The catalog, schema and table name of a table. The table name is mandatory, but the schema and catalog names may be null or empty. Note that an empty string and null values have different meanings in JDBC metadata:
      • An empty string means that the table name has no catalog (or schema).
      • A null value means that the catalog (or schema) name should be ignored.
      Names are stored here as they were given by JDBC because those names are sometimes compared with other JDBC metadata or used for fetching more table metadata.
    • table

      public final String table
      The catalog, schema and table name of a table. The table name is mandatory, but the schema and catalog names may be null or empty. Note that an empty string and null values have different meanings in JDBC metadata:
      • An empty string means that the table name has no catalog (or schema).
      • A null value means that the catalog (or schema) name should be ignored.
      Names are stored here as they were given by JDBC because those names are sometimes compared with other JDBC metadata or used for fetching more table metadata.
  • Method Details

    • equals

      public final boolean equals(Object obj)
      Returns true if the given object is a TableReference with equal table, schema and catalog names. All other properties that may be defined in subclasses (column names, action on delete, etc.) are ignored; this method is not for testing if two Relation are fully equal. The purpose of this method is only to use TableReference as keys in a HashSet for remembering full coordinates of tables that may need to be analyzed later.
      Overrides:
      equals in class Object
      Returns:
      whether the given object is another TableReference for the same table.
    • hashCode

      public final int hashCode()
      Computes a hash code from the catalog, schema and table names. See equals(Object) for information about the purpose.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this table reference.
    • toString

      public String toString()
      Formats a string representation of this object for debugging purpose.
      Overrides:
      toString in class Object
      Returns:
      a string representation of this table reference.