|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.storage.sql.jdbc.db.TableImpl
public class TableImpl
The basic implementation of a SQL table.
Constructor Summary | |
---|---|
TableImpl(Dialect dialect,
String name,
String key)
Creates a new empty table. |
Method Summary | |
---|---|
Column |
addColumn(String name,
Column column)
Adds a column without dialect physical name canonicalization (for directories). |
Column |
addColumn(String name,
ColumnType type,
String key,
Model model)
Adds a Column to the table. |
void |
addFulltextIndex(String indexName,
String... columnNames)
Adds a named fulltext index on one or several columns. |
void |
addIndex(String... columnNames)
Adds an index 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()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TableImpl(Dialect dialect, String name, String key)
Method Detail |
---|
public boolean isAlias()
isAlias
in interface Table
public Table getRealTable()
getRealTable
in interface Table
public Dialect getDialect()
getDialect
in interface Table
public String getKey()
getKey
in interface Table
public String getPhysicalName()
getPhysicalName
in interface Table
public String getQuotedName()
getQuotedName
in interface Table
public String getQuotedSuffixedName(String suffix)
getQuotedSuffixedName
in interface Table
public Column getColumn(String name)
getColumn
in interface Table
public Column getPrimaryColumn()
getPrimaryColumn
in interface Table
public Collection<Column> getColumns()
getColumns
in interface Table
public Column addColumn(String name, Column column)
public Column addColumn(String name, ColumnType type, String key, Model model)
Table
Column
to the table.
addColumn
in interface Table
public void addIndex(String... columnNames)
addIndex
in interface Table
columnNames
- the column namespublic void addFulltextIndex(String indexName, String... columnNames)
Table
addFulltextIndex
in interface Table
indexName
- the index namecolumnNames
- the column namespublic boolean hasFulltextIndex()
Table
hasFulltextIndex
in interface Table
true
if the table has some fulltext indexespublic String getCreateSql()
getCreateSql
in interface Table
public String getAddColumnSql(Column column)
getAddColumnSql
in interface Table
column
- the column to add
public List<String> getPostCreateSqls(Model model)
Table
getPostCreateSqls
in interface Table
public List<String> getPostAddSqls(Column column, Model model)
Table
getPostAddSqls
in interface Table
public String getDropSql()
TODO drop constraints and indexes
getDropSql
in interface Table
public String toString()
toString
in class Object
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |