Class TableImpl
java.lang.Object
org.nuxeo.ecm.core.storage.sql.jdbc.db.TableImpl
- All Implemented Interfaces:
Serializable
,Table
The basic implementation of a SQL table.
- 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
-
Method Summary
Modifier and TypeMethodDescriptionaddColumn
(String name, ColumnType type, String key, Model model) Adds aColumn
to the table.Adds a column without dialect physical name canonicalization (for directories).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.protected void
addOneColumn
(StringBuilder sb, Column column) Adds to buf the column name and its type and constraints for create / alter.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()
protected void
postAddColumn
(Column column, List<String> sqls, Model model) toString()
-
Field Details
-
dialect
-
key
-
name
-
-
Constructor Details
-
TableImpl
Creates a new empty table.
-
-
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
-
getColumn
-
getPrimaryColumn
- Specified by:
getPrimaryColumn
in interfaceTable
-
getColumns
- Specified by:
getColumns
in interfaceTable
-
addColumn
Adds a column without dialect physical name canonicalization (for directories). -
addColumn
Description copied from interface:Table
Adds aColumn
to the table. -
addIndex
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
Computes the SQL statement to create the table.- Specified by:
getCreateSql
in interfaceTable
- Returns:
- the SQL create string.
-
getAddColumnSql
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
-
addOneColumn
Adds to buf the column name and its type and constraints for create / alter. -
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
-
postAddColumn
-
getDropSql
Computes the SQL statement to drop the table.TODO drop constraints and indexes
- Specified by:
getDropSql
in interfaceTable
- Returns:
- the SQL drop string.
-
toString
-