liquibase.statement.core
Class CreateTableStatement

java.lang.Object
  extended by liquibase.statement.AbstractSqlStatement
      extended by liquibase.statement.core.CreateTableStatement
All Implemented Interfaces:
SqlStatement

public class CreateTableStatement
extends AbstractSqlStatement


Constructor Summary
CreateTableStatement(String schemaName, String tableName)
           
 
Method Summary
 CreateTableStatement addColumn(String columnName, DataType columnType)
           
 CreateTableStatement addColumn(String columnName, DataType columnType, ColumnConstraint... constraints)
           
 CreateTableStatement addColumn(String columnName, DataType columnType, Object defaultValue)
           
 CreateTableStatement addColumn(String columnName, DataType columnType, Object defaultValue, ColumnConstraint... constraints)
           
 CreateTableStatement addColumnConstraint(AutoIncrementConstraint autoIncrementConstraint)
           
 CreateTableStatement addColumnConstraint(ForeignKeyConstraint fkConstraint)
           
 CreateTableStatement addColumnConstraint(NotNullConstraint notNullConstraint)
           
 CreateTableStatement addColumnConstraint(UniqueConstraint uniqueConstraint)
           
 CreateTableStatement addPrimaryKeyColumn(String columnName, DataType columnType, Object defaultValue, String keyName, String tablespace, ColumnConstraint... constraints)
           
 Set<AutoIncrementConstraint> getAutoIncrementConstraints()
           
 List<String> getColumns()
           
 Map<String,DataType> getColumnTypes()
           
 Object getDefaultValue(String column)
           
 Map<String,Object> getDefaultValues()
           
 Set<ForeignKeyConstraint> getForeignKeyConstraints()
           
 Set<String> getNotNullColumns()
           
 PrimaryKeyConstraint getPrimaryKeyConstraint()
           
 String getSchemaName()
           
 String getTableName()
           
 String getTablespace()
           
 Set<UniqueConstraint> getUniqueConstraints()
           
 void setSchemaName(String schemaName)
           
 CreateTableStatement setTablespace(String tablespace)
           
 
Methods inherited from class liquibase.statement.AbstractSqlStatement
skipOnUnsupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateTableStatement

public CreateTableStatement(String schemaName,
                            String tableName)
Method Detail

getSchemaName

public String getSchemaName()

getTableName

public String getTableName()

getColumns

public List<String> getColumns()

getTablespace

public String getTablespace()

setTablespace

public CreateTableStatement setTablespace(String tablespace)

getPrimaryKeyConstraint

public PrimaryKeyConstraint getPrimaryKeyConstraint()

getForeignKeyConstraints

public Set<ForeignKeyConstraint> getForeignKeyConstraints()

getUniqueConstraints

public Set<UniqueConstraint> getUniqueConstraints()

getNotNullColumns

public Set<String> getNotNullColumns()

addPrimaryKeyColumn

public CreateTableStatement addPrimaryKeyColumn(String columnName,
                                                DataType columnType,
                                                Object defaultValue,
                                                String keyName,
                                                String tablespace,
                                                ColumnConstraint... constraints)

addColumn

public CreateTableStatement addColumn(String columnName,
                                      DataType columnType)

addColumn

public CreateTableStatement addColumn(String columnName,
                                      DataType columnType,
                                      Object defaultValue)

addColumn

public CreateTableStatement addColumn(String columnName,
                                      DataType columnType,
                                      ColumnConstraint... constraints)

addColumn

public CreateTableStatement addColumn(String columnName,
                                      DataType columnType,
                                      Object defaultValue,
                                      ColumnConstraint... constraints)

getDefaultValue

public Object getDefaultValue(String column)

addColumnConstraint

public CreateTableStatement addColumnConstraint(NotNullConstraint notNullConstraint)

addColumnConstraint

public CreateTableStatement addColumnConstraint(ForeignKeyConstraint fkConstraint)

addColumnConstraint

public CreateTableStatement addColumnConstraint(UniqueConstraint uniqueConstraint)

addColumnConstraint

public CreateTableStatement addColumnConstraint(AutoIncrementConstraint autoIncrementConstraint)

getAutoIncrementConstraints

public Set<AutoIncrementConstraint> getAutoIncrementConstraints()

getColumnTypes

public Map<String,DataType> getColumnTypes()

getDefaultValues

public Map<String,Object> getDefaultValues()

setSchemaName

public void setSchemaName(String schemaName)


Copyright © 2012 Liquibase.org. All Rights Reserved.