public interface Table extends Serializable
Modifier and Type | Interface and Description |
---|---|
static class |
Table.IndexType |
Modifier and Type | Method and Description |
---|---|
Column |
addColumn(String name,
ColumnType type,
String key,
Model model)
Adds a
Column to the table. |
void |
addIndex(String... columnNames)
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.
|
String |
getAddColumnSql(Column column)
Computes the SQL statement to alter a table and add a column to it.
|
Column |
getColumn(String name) |
Collection<Column> |
getColumns() |
String |
getCreateSql()
Computes the SQL statement to create the table.
|
Dialect |
getDialect() |
String |
getDropSql()
Computes the SQL statement to drop the table.
|
String |
getKey() |
String |
getPhysicalName() |
List<String> |
getPostAddSqls(Column column,
Model model)
Computes the SQL statements to finish adding a column, usually some ALTER TABLE statements to add constraints or
indexes.
|
List<String> |
getPostCreateSqls(Model model)
Computes the SQL statements to finish creating the table, usually some ALTER TABLE statements to add constraints
or indexes.
|
Column |
getPrimaryColumn() |
String |
getQuotedName() |
String |
getQuotedSuffixedName(String suffix) |
Table |
getRealTable() |
boolean |
hasFulltextIndex()
Checks if the table has some fulltext indexes.
|
boolean |
isAlias() |
boolean isAlias()
Table getRealTable()
Dialect getDialect()
String getPhysicalName()
String getQuotedName()
String getQuotedSuffixedName(String suffix)
Column getPrimaryColumn()
Collection<Column> getColumns()
Column addColumn(String name, ColumnType type, String key, Model model)
Column
to the table.void addIndex(String... columnNames)
columnNames
- the column namesvoid addIndex(String indexName, Table.IndexType indexType, String... columnNames)
indexName
- the index nameindexType
- the index typecolumnNames
- the column namesboolean hasFulltextIndex()
true
if the table has some fulltext indexesString getCreateSql()
String getAddColumnSql(Column column)
column
- the column to addList<String> getPostCreateSqls(Model model)
List<String> getPostAddSqls(Column column, Model model)
String getDropSql()
TODO drop constraints and indexes
Copyright © 2017 Nuxeo. All rights reserved.