Nuxeo Enterprise Platform 5.4

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

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
TableAlias, TableImpl

public interface Table
extends java.io.Serializable

A SQL table.

Author:
Florent Guillaume

Method Summary
 Column addColumn(java.lang.String name, ColumnType type, java.lang.String key, Model model)
          Adds a Column to the table.
 void addFulltextIndex(java.lang.String indexName, java.lang.String... columnNames)
          Adds a named fulltext index on one or several columns.
 void addIndex(java.lang.String... columnNames)
          Adds an index on one or several columns.
 java.lang.String getAddColumnSql(Column column)
          Computes the SQL statement to alter a table and add a column to it.
 Column getColumn(java.lang.String name)
           
 java.util.Collection<Column> getColumns()
           
 java.lang.String getCreateSql()
          Computes the SQL statement to create the table.
 Dialect getDialect()
           
 java.lang.String getDropSql()
          Computes the SQL statement to drop the table.
 java.lang.String getKey()
           
 java.lang.String getPhysicalName()
           
 java.util.List<java.lang.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.
 java.util.List<java.lang.String> getPostCreateSqls(Model model)
          Computes the SQL statements to finish creating the table, usually some ALTER TABLE statements to add constraints or indexes.
 java.lang.String getQuotedName()
           
 java.lang.String getQuotedSuffixedName(java.lang.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

java.lang.String getKey()

getPhysicalName

java.lang.String getPhysicalName()

getQuotedName

java.lang.String getQuotedName()

getQuotedSuffixedName

java.lang.String getQuotedSuffixedName(java.lang.String suffix)

getColumn

Column getColumn(java.lang.String name)

getColumns

java.util.Collection<Column> getColumns()

addColumn

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


addIndex

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

Parameters:
columnNames - the column names

addFulltextIndex

void addFulltextIndex(java.lang.String indexName,
                      java.lang.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

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

Returns:
the SQL create string.

getAddColumnSql

java.lang.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

java.util.List<java.lang.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

java.util.List<java.lang.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

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

TODO drop constraints and indexes

Returns:
the SQL drop string.

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.