public class SQLTableCreation extends SQLTable
| Modifier and Type | Field and Description |
|---|---|
protected List |
columns
The list of
SQLColum with the columns that are going to be
applied in the creation of the table |
protected List |
constraints
The list of
SQLConstraint with the constraints that are
going to be applied in the creation of the table |
| Constructor and Description |
|---|
SQLTableCreation(String tableName,
List columns,
List constraints)
Creates a new
SQLTableCreation indicating the name of the
constraint and the columns in where the constraint is applied. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
List |
getColumns()
Returns a list with all columns of the database table.
|
List |
getConstraints()
Returns a list with all constraints that affect to the database table.
|
String |
getCreateTableInstruction()
This method returns the starting of the SQL statement of Create Table.
|
getTableNameprotected List columns
SQLColum with the columns that are going to be
applied in the creation of the tableprotected List constraints
SQLConstraint with the constraints that are
going to be applied in the creation of the tablepublic SQLTableCreation(String tableName, List columns, List constraints)
SQLTableCreation indicating the name of the
constraint and the columns in where the constraint is applied.tableName - The name of the tablecolumns - The list of columns that are going to be applied in the
creation of the tableconstraints - The list of constraints that are going to be applied in the
creation of the tablepublic List getConstraints()
List with the constraints.public List getColumns()
List with the columnspublic void addConstraints(SQLConstraint constraint)
constraint - The constraint to be added.public void addColumn(SQLColumn column)
column - The column to be added.public String getCreateTableInstruction()
String whit the statement.Copyright © 2016 Imatia Innovation S.L.. All rights reserved.