java.lang.Object
org.litebridge.db.spi.Aliased
org.litebridge.db.spi.Table
- Direct Known Subclasses:
TableSpec
A database table with an associated catalog, schema, name, and optional alias.
This class provides functionality for handling table-related metadata and supports aliasing for the table name.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newTablewith catalog, schema, and name.Constructs a newTablewith catalog, schema, name, and alias.Constructs a newTablewith a name.Constructs a newTablewith name and alias.Constructs a newTableas a copy of another table. -
Method Summary
Modifier and TypeMethodDescriptionSet the alias for this entity and return the updated instance.@Nullable Stringcatalog()Returns the catalog name of the table.booleanbooleanCompares this instance with anotherAliasedinstance, ignoring their aliases.inthashCode()Returns the qualified name of the table (schema.name).@Nullable Stringschema()Returns the schema name of the table.toString()Methods inherited from class org.litebridge.db.spi.Aliased
alias, aliasOrName, name, setAlias
-
Constructor Details
-
Table
Constructs a newTablewith catalog, schema, and name.- Parameters:
catalog- the catalog nameschema- the schema namename- the table name
-
Table
public Table(@Nullable String catalog, @Nullable String schema, String name, @Nullable String alias) Constructs a newTablewith catalog, schema, name, and alias.- Parameters:
catalog- the catalog nameschema- the schema namename- the table namealias- the table alias
-
Table
Constructs a newTablewith name and alias.- Parameters:
name- the table namealias- the table alias
-
Table
Constructs a newTablewith a name.- Parameters:
name- the table name
-
Table
Constructs a newTableas a copy of another table.- Parameters:
other- the table to copy
-
-
Method Details
-
catalog
Returns the catalog name of the table.- Returns:
- the catalog name, or
nullif not specified
-
schema
Returns the schema name of the table.- Returns:
- the schema name, or
nullif not specified
-
qualifiedName
Returns the qualified name of the table (schema.name).- Returns:
- the qualified table name
-
as
Description copied from class:AliasedSet the alias for this entity and return the updated instance. -
equals
-
equalsIgnoreAlias
Description copied from class:AliasedCompares this instance with anotherAliasedinstance, ignoring their aliases.- Overrides:
equalsIgnoreAliasin classAliased- Parameters:
o- The other instance to compare with.- Returns:
trueif the names are equal,falseotherwise.
-
hashCode
public int hashCode() -
toString
-