public class DbColumn extends Object implements Serializable
| Constructor and Description |
|---|
DbColumn()
Creates a new instance of
DbColumn. |
DbColumn(String name,
DbColumnType dbColumnType)
Creates a new instance of
DbColumn. |
DbColumn(String name,
DbColumnType dbColumnType,
boolean autoInc)
Creates a new instance of
DbColumn. |
DbColumn(String name,
DbColumnType dbColumnType,
Integer size)
Creates a new instance of
DbColumn. |
DbColumn(String name,
DbColumnType dbColumnType,
K defaultValue)
Creates a new instance of
DbColumn. |
| Modifier and Type | Method and Description |
|---|---|
DbColumn |
addConstraint(DbColumnConstraint dbColumnConstraint)
Adds a new constraint to this column.
|
DbColumn |
addConstraints(DbColumnConstraint... constraints)
Adds constraints.
|
boolean |
equals(Object obj) |
List<DbColumnConstraint> |
getColumnConstraints() |
DbColumnType |
getDbColumnType() |
K |
getDefaultValue() |
String |
getName() |
Integer |
getSize() |
int |
hashCode() |
boolean |
isAutoInc() |
boolean |
isDefaultValueSet() |
boolean |
isSizeSet() |
DbColumn |
setAutoInc(boolean autoInc)
Sets this field to use auto incrementation techniques.
|
DbColumn |
setDefaultValue(K defaultValue)
Sets The default value of the column.
|
DbColumn |
setName(String name)
Sets the column name.
|
DbColumn |
setSize(Integer size)
Sets the size of the type (if applicable).
|
DbColumn |
setType(DbColumnType dbColumnType)
Sets the column type.
|
String |
toString() |
public DbColumn()
DbColumn.public DbColumn(String name, DbColumnType dbColumnType)
DbColumn.name - The column name.dbColumnType - The column type.public DbColumn(String name, DbColumnType dbColumnType, boolean autoInc)
DbColumn.name - The column name.dbColumnType - The column type.autoInc - True to use auto incrementation, false otherwise.public DbColumn(String name, DbColumnType dbColumnType, Integer size)
DbColumn.name - The column name.dbColumnType - The column type.size - The size.public DbColumn(String name, DbColumnType dbColumnType, K defaultValue)
DbColumn.name - The column name.dbColumnType - The column type.defaultValue - The default value.public DbColumn setName(String name)
name - The column name.public DbColumn setSize(Integer size)
size - The size.public DbColumn setType(DbColumnType dbColumnType)
dbColumnType - The column type.public DbColumn addConstraint(DbColumnConstraint dbColumnConstraint)
dbColumnConstraint - The new constraint.public DbColumn addConstraints(DbColumnConstraint... constraints)
constraints - An array of constraints.public DbColumn setAutoInc(boolean autoInc)
autoInc - True to use auto incrementation, false otherwise.public boolean isAutoInc()
public List<DbColumnConstraint> getColumnConstraints()
public DbColumnType getDbColumnType()
public String getName()
public Integer getSize()
public boolean isSizeSet()
public K getDefaultValue()
public DbColumn setDefaultValue(K defaultValue)
defaultValue - The default value of the column.public boolean isDefaultValueSet()
true if the default value of the column is set, false otherwise.Copyright © 2013. All Rights Reserved.