public class ColumnModel extends Object
| Constructor and Description |
|---|
ColumnModel(String columnName) |
| Modifier and Type | Method and Description |
|---|---|
ColumnModel |
autoId()
Bind column to a global Auto Id generator, can be Sequence or a Table
|
ColumnModel |
BIGDECIMAL() |
ColumnModel |
BIGDECIMAL(Integer digiLength) |
ColumnModel |
BIGDECIMAL(Integer precision,
Integer scale) |
ColumnModel |
BIGINT() |
ColumnModel |
BINARY() |
ColumnModel |
BINARY(Integer length) |
ColumnModel |
BIT() |
ColumnModel |
BLOB() |
ColumnModel |
BLOB(Integer length) |
ColumnModel |
BOOLEAN() |
ColumnModel |
CHAR() |
ColumnModel |
CHAR(Integer length) |
ColumnModel |
check(String check)
Add a column check DDL piece if support
|
void |
checkReadOnly() |
ColumnModel |
CLOB() |
ColumnModel |
CLOB(Integer length) |
ColumnModel |
comment(String comment)
Add comments at end of column definition DDL
|
ColumnModel |
DATE() |
ColumnModel |
DECIMAL() |
ColumnModel |
DECIMAL(Integer precision,
Integer scale) |
ColumnModel |
defaultValue(String value)
Default value for column's definition DDL
|
ColumnModel |
DOUBLE() |
ColumnModel |
entityField(String entityFieldName)
Mark this column map to a Java entity field, if exist other columns map to
this field, delete other columns.
|
ColumnModel |
FLOAT() |
ColumnModel |
FLOAT(Integer precision) |
String |
getCheck() |
String |
getClearQuoteColumnName() |
String |
getColumnDefinition() |
String |
getColumnName() |
Type |
getColumnType() |
String |
getComment() |
Object |
getConverterClassOrName() |
String |
getDebugInfo() |
String |
getDefaultValue() |
String |
getEntityField() |
GenerationType |
getIdGenerationType() |
IdGenerator |
getIdGenerator() |
String |
getIdGeneratorName() |
Boolean |
getInsertable() |
Integer |
getLength() |
Boolean |
getNullable() |
Boolean |
getPkey() |
Integer |
getPrecision() |
Integer |
getScale() |
String[] |
getShardDatabase() |
String[] |
getShardTable() |
TableModel |
getTableModel() |
String |
getTail() |
Boolean |
getTransientable() |
Boolean |
getUpdatable() |
Object |
getValue() |
Boolean |
getValueExist() |
ColumnModel |
id()
equal to pkey method.
|
ColumnModel |
identityId()
Mark a field will use database's native identity type.
|
ColumnModel |
idGenerator(String idGeneratorName)
The value of this column will be generated by a sequence or table generator
|
ColumnModel |
insertable(Boolean insertable)
Mark a field insertable=true, only for JPA or ORM tool use
|
ColumnModel |
INTEGER() |
boolean |
isCreatedBy() |
boolean |
isCreateTimestamp() |
boolean |
isLastModifiedBy() |
boolean |
isUpdateTimestamp() |
ColumnModel |
JAVA_OBJECT() |
ColumnModel |
LONG() |
ColumnModel |
LONGNVARCHAR(Integer length) |
ColumnModel |
LONGVARBINARY() |
ColumnModel |
LONGVARBINARY(Integer length) |
ColumnModel |
LONGVARCHAR() |
ColumnModel |
LONGVARCHAR(Integer length) |
ColumnModel |
NCHAR(Integer length) |
ColumnModel |
NCLOB() |
ColumnModel |
newCopy() |
ColumnModel |
notNull()
Add a not null DDL piece if support
|
ColumnModel |
NUMERIC() |
ColumnModel |
NUMERIC(Integer digiLength) |
ColumnModel |
NUMERIC(Integer precision,
Integer scale) |
ColumnModel |
NVARCHAR(Integer length) |
ColumnModel |
pkey()
Mark primary key, if more than one will build compound Primary key
|
ColumnModel |
REAL() |
ColumnModel |
sequenceGenerator(String name,
String sequenceName,
Integer initialValue,
Integer allocationSize)
The value of this column will be generated by a sequence
|
void |
setCheck(String check) |
ColumnModel |
setColumnDefinition(String columnDefinition) |
void |
setColumnName(String columnName) |
void |
setColumnType(Type columnType) |
void |
setComment(String comment) |
void |
setConverterClassOrName(Object converterClassOrName) |
void |
setCreatedBy(boolean createdBy) |
void |
setCreateTimestamp(boolean createTimestamp) |
void |
setDefaultValue(String defaultValue) |
void |
setEntityField(String entityField) |
void |
setIdGenerationType(GenerationType idGenerationType) |
void |
setIdGeneratorName(String idGeneratorName) |
void |
setInsertable(Boolean insertable) |
void |
setLastModifiedBy(boolean lastModifiedBy) |
void |
setLength(Integer length) |
void |
setNullable(Boolean nullable) |
void |
setPkey(Boolean pkey) |
void |
setPrecision(Integer precision) |
void |
setScale(Integer scale) |
void |
setShardDatabase(String[] shardDatabase) |
void |
setShardTable(String[] shardTable) |
void |
setTableModel(TableModel tableModel) |
void |
setTail(String tail) |
void |
setTransientable(Boolean transientable) |
void |
setUpdatable(Boolean updatable) |
void |
setUpdateTimestamp(boolean updateTimestamp) |
ColumnModel |
setValue(Object value) |
ColumnModel |
setValueExist(Boolean valueExist) |
ColumnModel |
shardDatabase(String... shardDatabase)
Mark is a shartDatabase column, for ORM tool use
|
ColumnModel |
shardTable(String... shardTable)
Mark is a shartTable column, for ORM tool use
|
ColumnModel |
SHORT() |
FKeyModel |
singleFKey(String... refTableAndColumns)
A shortcut method to add Foreign constraint for single column, for multiple
columns please use tableModel.fkey() method instead
|
ColumnModel |
singleIndex()
A shortcut method to add a index for single column, for multiple columns
index please use tableModel.index() method
|
ColumnModel |
singleIndex(String indexName)
A shortcut method to add a index for single column, for multiple columns
index please use tableModel.index() method
|
ColumnModel |
singleUnique()
A shortcut method to add a unique constraint for single column, for multiple
columns index please use tableModel.unique() method
|
ColumnModel |
singleUnique(String uniqueName)
A shortcut method to add a unique constraint for single column, for multiple
columns index please use tableModel.unique() method
|
ColumnModel |
SMALLINT() |
ColumnModel |
snowflake() |
ColumnModel |
sortedUUID(String name,
Integer sortedLength,
Integer uuidLength) |
ColumnModel |
STRING(Integer length) |
ColumnModel |
tableGenerator(String name,
String tableName,
String pkColumnName,
String valueColumnName,
String pkColumnValue,
Integer initialValue,
Integer allocationSize) |
ColumnModel |
tail(String tail)
Put an extra tail String manually at the end of column definition DDL
|
ColumnModel |
TIME() |
ColumnModel |
TIMESTAMP() |
ColumnModel |
timeStampId() |
ColumnModel |
TINYINT() |
ColumnModel |
updatable(Boolean updatable)
Mark a field updatable=true, only for JPA or ORM tool use
|
ColumnModel |
uuid() |
ColumnModel |
uuid25() |
ColumnModel |
uuid26() |
ColumnModel |
uuid32() |
ColumnModel |
uuid36() |
ColumnModel |
uuidAny(String name,
Integer length) |
ColumnModel |
VARBINARY() |
ColumnModel |
VARBINARY(Integer length) |
ColumnModel |
VARCHAR(Integer length) |
public ColumnModel(String columnName)
public ColumnModel notNull()
public ColumnModel check(String check)
public ColumnModel newCopy()
public ColumnModel singleIndex(String indexName)
public ColumnModel singleIndex()
public ColumnModel singleUnique(String uniqueName)
public ColumnModel singleUnique()
public ColumnModel defaultValue(String value)
public ColumnModel comment(String comment)
public ColumnModel pkey()
public ColumnModel shardTable(String... shardTable)
public ColumnModel shardDatabase(String... shardDatabase)
public ColumnModel id()
public FKeyModel singleFKey(String... refTableAndColumns)
public IdGenerator getIdGenerator()
public ColumnModel identityId()
public ColumnModel uuid()
public ColumnModel uuid25()
public ColumnModel uuid26()
public ColumnModel uuid32()
public ColumnModel uuid36()
public ColumnModel snowflake()
public ColumnModel uuidAny(String name, Integer length)
public ColumnModel timeStampId()
public ColumnModel autoId()
public ColumnModel sortedUUID(String name, Integer sortedLength, Integer uuidLength)
public ColumnModel sequenceGenerator(String name, String sequenceName, Integer initialValue, Integer allocationSize)
public ColumnModel idGenerator(String idGeneratorName)
public ColumnModel tableGenerator(String name, String tableName, String pkColumnName, String valueColumnName, String pkColumnValue, Integer initialValue, Integer allocationSize)
public ColumnModel tail(String tail)
public ColumnModel entityField(String entityFieldName)
public ColumnModel insertable(Boolean insertable)
public ColumnModel updatable(Boolean updatable)
public String getDebugInfo()
public void checkReadOnly()
public ColumnModel LONG()
public ColumnModel BOOLEAN()
public ColumnModel DOUBLE()
public ColumnModel INTEGER()
public ColumnModel SHORT()
public ColumnModel DATE()
public ColumnModel TIME()
public ColumnModel TIMESTAMP()
public ColumnModel BIGINT()
public ColumnModel BIT()
public ColumnModel JAVA_OBJECT()
public ColumnModel NCLOB()
public ColumnModel REAL()
public ColumnModel SMALLINT()
public ColumnModel TINYINT()
public ColumnModel LONGNVARCHAR(Integer length)
public ColumnModel NCHAR(Integer length)
public ColumnModel NVARCHAR(Integer length)
public ColumnModel STRING(Integer length)
public ColumnModel VARCHAR(Integer length)
public ColumnModel FLOAT()
public ColumnModel FLOAT(Integer precision)
public ColumnModel BIGDECIMAL()
public ColumnModel BIGDECIMAL(Integer digiLength)
public ColumnModel BIGDECIMAL(Integer precision, Integer scale)
public ColumnModel DECIMAL()
public ColumnModel DECIMAL(Integer precision, Integer scale)
public ColumnModel BINARY()
public ColumnModel BINARY(Integer length)
public ColumnModel BLOB()
public ColumnModel BLOB(Integer length)
public ColumnModel CHAR()
public ColumnModel CHAR(Integer length)
public ColumnModel CLOB()
public ColumnModel CLOB(Integer length)
public ColumnModel LONGVARBINARY()
public ColumnModel LONGVARBINARY(Integer length)
public ColumnModel LONGVARCHAR()
public ColumnModel LONGVARCHAR(Integer length)
public ColumnModel NUMERIC()
public ColumnModel NUMERIC(Integer digiLength)
public ColumnModel NUMERIC(Integer precision, Integer scale)
public ColumnModel VARBINARY()
public ColumnModel VARBINARY(Integer length)
public String getClearQuoteColumnName()
public String getColumnName()
public void setColumnName(String columnName)
public TableModel getTableModel()
public void setTableModel(TableModel tableModel)
public Type getColumnType()
public void setColumnType(Type columnType)
public Boolean getPkey()
public void setPkey(Boolean pkey)
public Boolean getNullable()
public void setNullable(Boolean nullable)
public String getCheck()
public void setCheck(String check)
public String getDefaultValue()
public void setDefaultValue(String defaultValue)
public GenerationType getIdGenerationType()
public void setIdGenerationType(GenerationType idGenerationType)
public String getIdGeneratorName()
public void setIdGeneratorName(String idGeneratorName)
public String getTail()
public void setTail(String tail)
public String getComment()
public void setComment(String comment)
public String getEntityField()
public void setEntityField(String entityField)
public Integer getLength()
public void setLength(Integer length)
public Integer getPrecision()
public void setPrecision(Integer precision)
public Integer getScale()
public void setScale(Integer scale)
public Boolean getInsertable()
public void setInsertable(Boolean insertable)
public Boolean getUpdatable()
public void setUpdatable(Boolean updatable)
public Boolean getTransientable()
public void setTransientable(Boolean transientable)
public String[] getShardTable()
public void setShardTable(String[] shardTable)
public String[] getShardDatabase()
public void setShardDatabase(String[] shardDatabase)
public Object getConverterClassOrName()
public void setConverterClassOrName(Object converterClassOrName)
public Object getValue()
public ColumnModel setValue(Object value)
public Boolean getValueExist()
public ColumnModel setValueExist(Boolean valueExist)
public String getColumnDefinition()
public ColumnModel setColumnDefinition(String columnDefinition)
public boolean isCreateTimestamp()
public void setCreateTimestamp(boolean createTimestamp)
public boolean isUpdateTimestamp()
public void setUpdateTimestamp(boolean updateTimestamp)
public boolean isCreatedBy()
public void setCreatedBy(boolean createdBy)
public boolean isLastModifiedBy()
public void setLastModifiedBy(boolean lastModifiedBy)
Copyright © 2022. All rights reserved.