java.lang.Object
org.litebridgedb.db.spi.Aliased
org.litebridgedb.db.spi.Column
A database column that belongs to a specific table and optionally has an alias.
It extends the functionality of the Aliased class to include the concept of table association.
Columns can be used to construct queries and represent database metadata.
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a newColumninstance associated with the specified table and column name.Construct a newColumninstance associated with the specified table, column name, and optional column alias. -
Method Summary
Modifier and TypeMethodDescriptionAssign an alias to the currentColumninstance and return the updated instance.static ColumnCreate a newColumninstance associated with the specified table and column name.static ColumnCreate a newColumninstance associated with the specified schema, table, and column name.static ColumnCreate a newColumninstance associated with the specified catalog, schema, table, and column name.static ColumnCreate a newColumninstance for the specified table and column name.booleanbooleanequalsColumnOnlyIgnoreAlias(Column column) booleanequalsIgnoreAlias(Aliased aliased) inthashCode()table()Retrieve theTableinstance associated with thisColumn.toString()Methods inherited from class org.litebridgedb.db.spi.Aliased
alias, aliasOrName, name, setAlias
-
Constructor Details
-
Column
Construct a newColumninstance associated with the specified table and column name.- Parameters:
table- the table to which the column belongs; must not be nullname- the name of the column; must not be null
-
Column
Construct a newColumninstance associated with the specified table, column name, and optional column alias.- Parameters:
table- the table to which the column belongs; must not be nullname- the name of the column; must not be nullalias- an optional alias for the column; may be null if not needed
-
-
Method Details
-
table
Retrieve theTableinstance associated with thisColumn.- Returns:
- the
Tableto which this column belongs
-
as
Assign an alias to the currentColumninstance and return the updated instance. -
c
Create a newColumninstance for the specified table and column name.This is shorthand for
new Column(table, column).- Parameters:
table- the table to which the column belongscolumn- the name of the column- Returns:
- a new
Columninstance associated with the given table and column name
-
c
Create a newColumninstance associated with the specified table and column name.This is shorthand for
new Column(new Table("", "", table), column).- Parameters:
table- the name of the table to which the column belongscolumn- the name of the column- Returns:
- a new
Columninstance associated with the specified catalog, schema, table, and column name
-
c
Create a newColumninstance associated with the specified schema, table, and column name.This is shorthand for
new Column(new Table("", schema, table), column).- Parameters:
schema- the name of the schema to which the table belongstable- the name of the table to which the column belongscolumn- the name of the column- Returns:
- a new
Columninstance associated with the specified catalog, schema, table, and column name
-
c
Create a newColumninstance associated with the specified catalog, schema, table, and column name.This is shorthand for
new Column(new Table(catalog, schema, table), column).- Parameters:
catalog- the name of the catalog to which the table belongsschema- the name of the schema to which the table belongstable- the name of the table to which the column belongscolumn- the name of the column- Returns:
- a new
Columninstance associated with the specified catalog, schema, table, and column name
-
equals
-
equalsIgnoreAlias
- Overrides:
equalsIgnoreAliasin classAliased
-
equalsColumnOnlyIgnoreAlias
-
hashCode
public int hashCode() -
toString
-