Ontimize 5.2072EN

com.ontimize.db.sql
Class SQLTableCreation

java.lang.Object
  extended bycom.ontimize.db.sql.SQLTable
      extended bycom.ontimize.db.sql.SQLTableCreation
Direct Known Subclasses:
SQLTemporaryTableCreation

public class SQLTableCreation
extends SQLTable


Field Summary
protected  java.util.List columns
          The list of SQLColum with the columns that are going to be applied in the creation of the table
protected  java.util.List constraints
          The list of SQLConstraint with the constraints that are going to be applied in the creation of the table
 
Fields inherited from class com.ontimize.db.sql.SQLTable
tableName
 
Constructor Summary
SQLTableCreation(java.lang.String tableName, java.util.List columns, java.util.List constraints)
          Creates a new SQLTableCreation indicating the name of the constraint and the columns in where the constraint is applied.
 
Method Summary
 void addColumn(SQLColumn column)
          Adds a new column to the collection of columns of the database table.
 void addConstraints(SQLConstraint constraint)
          Adds a new constraint to the collection of constraints of the database table.
 java.util.List getColumns()
          Returns a list with all columns of the database table.
 java.util.List getConstraints()
          Returns a list with all constraints that affect to the database table.
 java.lang.String getCreateTableInstruction()
          This method returns the starting of the SQL statement of Create Table.
 
Methods inherited from class com.ontimize.db.sql.SQLTable
getTableName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

columns

protected java.util.List columns
The list of SQLColum with the columns that are going to be applied in the creation of the table


constraints

protected java.util.List constraints
The list of SQLConstraint with the constraints that are going to be applied in the creation of the table

Constructor Detail

SQLTableCreation

public SQLTableCreation(java.lang.String tableName,
                        java.util.List columns,
                        java.util.List constraints)
Creates a new SQLTableCreation indicating the name of the constraint and the columns in where the constraint is applied.

Parameters:
tableName - The name of the table
columns - The list of columns that are going to be applied in the creation of the table
constraints - The list of constraints that are going to be applied in the creation of the table
Method Detail

getConstraints

public java.util.List getConstraints()
Returns a list with all constraints that affect to the database table.

Returns:
a List with the constraints.

getColumns

public java.util.List getColumns()
Returns a list with all columns of the database table.

Returns:
a List with the columns

addConstraints

public void addConstraints(SQLConstraint constraint)
Adds a new constraint to the collection of constraints of the database table.

Parameters:
constraint - The constraint to be added.

addColumn

public void addColumn(SQLColumn column)
Adds a new column to the collection of columns of the database table.

Parameters:
column - The column to be added.

getCreateTableInstruction

public java.lang.String getCreateTableInstruction()
This method returns the starting of the SQL statement of Create Table.

Returns:
a String whit the statement.

Ontimize