Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.storage.sql.jdbc.db
Interface Table

All Superinterfaces:
Serializable
All Known Implementing Classes:
TableAlias, TableImpl

public interface Table
extends Serializable

A SQL table.


Method Summary
 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()
           
 

Method Detail

isAlias

boolean isAlias()

getRealTable

Table getRealTable()

getDialect

Dialect getDialect()

getKey

String getKey()

getPhysicalName

String getPhysicalName()

getQuotedName

String getQuotedName()

getQuotedSuffixedName

String getQuotedSuffixedName(String suffix)

getColumn

Column getColumn(String name)

getPrimaryColumn

Column getPrimaryColumn()

getColumns

Collection<Column> getColumns()

addColumn

Column addColumn(String name,
                 ColumnType type,
                 String key,
                 Model model)
Adds a Column to the table.


addIndex

void addIndex(String... columnNames)
Adds an index on one or several columns.

Parameters:
columnNames - the column names

addFulltextIndex

void addFulltextIndex(String indexName,
                      String... columnNames)
Adds a named fulltext index on one or several columns.

Parameters:
indexName - the index name
columnNames - the column names

hasFulltextIndex

boolean hasFulltextIndex()
Checks if the table has some fulltext indexes.

Returns:
true if the table has some fulltext indexes

getCreateSql

String getCreateSql()
Computes the SQL statement to create the table.

Returns:
the SQL create string.

getAddColumnSql

String getAddColumnSql(Column column)
Computes the SQL statement to alter a table and add a column to it.

Parameters:
column - the column to add
Returns:
the SQL alter table string

getPostCreateSqls

List<String> getPostCreateSqls(Model model)
Computes the SQL statements to finish creating the table, usually some ALTER TABLE statements to add constraints or indexes.

Returns:
the SQL strings

getPostAddSqls

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.

Returns:
the SQL strings

getDropSql

String getDropSql()
Computes the SQL statement to drop the table.

TODO drop constraints and indexes

Returns:
the SQL drop string.

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.