public final class CreateTableColumnBuilder extends Object implements ColumnBuilder<CreateTableColumnBuilder>, UpdateScript
CreateTable
.Constructor and Description |
---|
CreateTableColumnBuilder(CreateTable createTable,
MutableColumn column) |
Modifier and Type | Method and Description |
---|---|
T |
asPrimaryKey()
Defines that the created column should be a primary key
|
protected MutableColumn |
getColumn() |
protected T |
getReturnObject() |
T |
like(Column column)
Builds several properties of a column, based on another
Column
object as a prototype. |
T |
nullable(boolean nullable)
Defines if the created column should be nullable or not.
|
T |
ofNativeType(String nativeType)
Defines the native type of the created column (useful especially for SQL
based
DataContext s). |
T |
ofSize(int size)
Defines the size of the created column.
|
T |
ofType(ColumnType type)
Defines the
ColumnType of the created column. |
void |
run(UpdateCallback callback)
Invoked by MetaModel when the update script should be run.
|
CreateTableColumnBuilder |
withColumn(String name) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
asPrimaryKey, like, nullable, ofNativeType, ofSize, ofType
public CreateTableColumnBuilder(CreateTable createTable, MutableColumn column)
public void run(UpdateCallback callback)
UpdateScript
UpdateCallback
.run
in interface UpdateScript
run
in interface Action<UpdateCallback>
public CreateTableColumnBuilder withColumn(String name)
protected MutableColumn getColumn()
protected T getReturnObject()
public final T like(Column column)
ColumnBuilder
Column
object as a prototype.like
in interface ColumnBuilder<T extends ColumnBuilder<?>>
column
- a prototype for the column being built.public final T ofType(ColumnType type)
ColumnBuilder
ColumnType
of the created column.ofType
in interface ColumnBuilder<T extends ColumnBuilder<?>>
type
- the column type of the created column.public final T ofNativeType(String nativeType)
ColumnBuilder
DataContext
s).ofNativeType
in interface ColumnBuilder<T extends ColumnBuilder<?>>
nativeType
- the native type of the created columnpublic final T ofSize(int size)
ColumnBuilder
ofSize
in interface ColumnBuilder<T extends ColumnBuilder<?>>
size
- the size of the created column.public final T nullable(boolean nullable)
ColumnBuilder
nullable
in interface ColumnBuilder<T extends ColumnBuilder<?>>
nullable
- if the created column should be nullable or not.public final T asPrimaryKey()
ColumnBuilder
asPrimaryKey
in interface ColumnBuilder<T extends ColumnBuilder<?>>
Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.