Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.directory.sql.repository
Class Table

java.lang.Object
  extended by org.nuxeo.ecm.directory.sql.repository.Table
All Implemented Interfaces:
java.io.Serializable

public class Table
extends java.lang.Object
implements java.io.Serializable

A SQL table.

Author:
Florent Guillaume
See Also:
Serialized Form

Constructor Summary
Table(java.lang.String name)
          Creates a new empty table.
 
Method Summary
 void addColumn(Column column)
          Adds a Column to the table.
 Column getColumn(java.lang.String name)
           
 java.util.List<Column> getColumns()
           
 java.lang.String getCreateSql(Dialect dialect)
          Computes the SQL statement to create the table.
 java.lang.String getDropSql(Dialect dialect)
          Computes the SQL statement to drop the table.
 java.lang.String getName()
           
 Column getPrimaryColumn()
           
 java.lang.String getQuotedName(Dialect dialect)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Table

public Table(java.lang.String name)
Creates a new empty table.

Parameters:
name - the table name.
Method Detail

getName

public java.lang.String getName()

getQuotedName

public java.lang.String getQuotedName(Dialect dialect)

getColumns

public java.util.List<Column> getColumns()

addColumn

public void addColumn(Column column)
               throws ConfigurationException
Adds a Column to the table.

Parameters:
column - the column
Throws:
ConfigurationException

getCreateSql

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

Parameters:
dialect - the dialect.
Returns:
the SQL create string.

getDropSql

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

Parameters:
dialect - the dialect.
Returns:
the SQL drop string.

getColumn

public Column getColumn(java.lang.String name)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getPrimaryColumn

public Column getPrimaryColumn()

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.