Class TableAlias
java.lang.Object
org.nuxeo.ecm.core.storage.sql.jdbc.db.TableAlias
- All Implemented Interfaces:
Serializable
,Table
An alias for an existing table. The returned columns are wrapped.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.nuxeo.ecm.core.storage.sql.jdbc.db.Table
Table.IndexType
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTableAlias
(Table table, String alias) Creates a table as an alias for another one. -
Method Summary
Modifier and TypeMethodDescriptionaddColumn
(String name, ColumnType type, String key, Model model) Adds aColumn
to the table.void
Adds an index on one or several columns.void
addIndex
(String indexName, Table.IndexType indexType, String... columnNames) Adds an index of the given name and type on one or several columns.getAddColumnSql
(Column column) Computes the SQL statement to alter a table and add a column to it.Computes the SQL statement to create the table.Computes the SQL statement to drop the table.getKey()
getPostAddSqls
(Column column, Model model) Computes the SQL statements to finish adding a column, usually some ALTER TABLE statements to add constraints or indexes.getPostCreateSqls
(Model model) Computes the SQL statements to finish creating the table, usually some ALTER TABLE statements to add constraints or indexes.getQuotedSuffixedName
(String suffix) boolean
Checks if the table has some fulltext indexes.boolean
isAlias()
toString()
-
Field Details
-
table
The table this is an alias of. -
alias
The name (alias) used to refer to this table. -
dialect
-
-
Constructor Details
-
TableAlias
Creates a table as an alias for another one.
-
-
Method Details
-
isAlias
public boolean isAlias() -
getRealTable
- Specified by:
getRealTable
in interfaceTable
-
getDialect
- Specified by:
getDialect
in interfaceTable
-
getKey
-
getPhysicalName
- Specified by:
getPhysicalName
in interfaceTable
-
getQuotedName
- Specified by:
getQuotedName
in interfaceTable
-
getQuotedSuffixedName
- Specified by:
getQuotedSuffixedName
in interfaceTable
-
toString
-
getColumn
-
getPrimaryColumn
- Specified by:
getPrimaryColumn
in interfaceTable
-
getColumns
- Specified by:
getColumns
in interfaceTable
-
addColumn
Description copied from interface:Table
Adds aColumn
to the table. -
addIndex
Description copied from interface:Table
Adds an index on one or several columns. -
addIndex
Description copied from interface:Table
Adds an index of the given name and type on one or several columns. -
hasFulltextIndex
public boolean hasFulltextIndex()Description copied from interface:Table
Checks if the table has some fulltext indexes.- Specified by:
hasFulltextIndex
in interfaceTable
- Returns:
true
if the table has some fulltext indexes
-
getCreateSql
Description copied from interface:Table
Computes the SQL statement to create the table.- Specified by:
getCreateSql
in interfaceTable
- Returns:
- the SQL create string.
-
getAddColumnSql
Description copied from interface:Table
Computes the SQL statement to alter a table and add a column to it.- Specified by:
getAddColumnSql
in interfaceTable
- Parameters:
column
- the column to add- Returns:
- the SQL alter table string
-
getPostCreateSqls
Description copied from interface:Table
Computes the SQL statements to finish creating the table, usually some ALTER TABLE statements to add constraints or indexes.- Specified by:
getPostCreateSqls
in interfaceTable
- Returns:
- the SQL strings
-
getPostAddSqls
Description copied from interface:Table
Computes the SQL statements to finish adding a column, usually some ALTER TABLE statements to add constraints or indexes.- Specified by:
getPostAddSqls
in interfaceTable
- Returns:
- the SQL strings
-
getDropSql
Description copied from interface:Table
Computes the SQL statement to drop the table.TODO drop constraints and indexes
- Specified by:
getDropSql
in interfaceTable
- Returns:
- the SQL drop string.
-