@NotThreadSafe public interface ColumnEditor
Column
instances.Modifier and Type | Method and Description |
---|---|
ColumnEditor |
autoIncremented(boolean autoIncremented)
Set whether the column's values are automatically incremented.
|
String |
charsetName()
Get the database-specific name of the character set used by this column.
|
ColumnEditor |
charsetName(String charsetName)
Set the database-specific name of the character set used by this column.
|
String |
charsetNameOfTable()
Get the database-specific name of the character set defined by this column's table, which is used if a character set is
not explicitly set on this column.
|
ColumnEditor |
charsetNameOfTable(String charsetName)
Set the database-specific name of the character set defined by this column's table.
|
Column |
create()
Obtain an immutable column definition representing the current state of this editor.
|
Object |
defaultValue()
Get the default value of the column.
|
ColumnEditor |
defaultValue(Object defaultValue)
Set the default value of the column;
|
List<String> |
enumValues()
get the enumeration values for the column.
|
ColumnEditor |
enumValues(List<String> enumValues)
Set the list of enumeration values.
|
ColumnEditor |
generated(boolean generated)
Set whether the column's values are generated by the database.
|
boolean |
hasDefaultValue()
Determine whether this column's has a default value set
|
boolean |
isAutoIncremented()
Determine whether this column's values are automatically incremented by the database.
|
boolean |
isGenerated()
Determine whether this column's values are generated by the database.
|
boolean |
isOptional()
Determine whether this column is optional.
|
int |
jdbcType()
Get the
JDBC type for this column |
ColumnEditor |
jdbcType(int jdbcType)
Set the
JDBC type of this column. |
int |
length()
Get the maximum length of this column's values.
|
ColumnEditor |
length(int length)
Set the maximum length of this column's values.
|
String |
name()
Get the name of the column.
|
ColumnEditor |
name(String name)
Set the name of the column.
|
int |
nativeType()
Get the internal database-specific type identifier for this column.
|
ColumnEditor |
nativeType(int nativeType)
Set the native type for this column .
|
ColumnEditor |
optional(boolean optional)
Set whether the column's values are optional (e.g., can contain nulls).
|
int |
position()
Get the position of the column in the table.
|
ColumnEditor |
position(int position)
Set the position of the column within the table definition.
|
Optional<Integer> |
scale()
Get the scale of the column.
|
ColumnEditor |
scale(Integer scale)
Set the scale of the column.
|
ColumnEditor |
type(String typeName)
Set the database-specific name of the column's data type.
|
ColumnEditor |
type(String typeName,
String typeExpression)
Set the database-specific name of the column's data type.
|
String |
typeExpression()
Get the database-specific complete expression defining the column's data type, including dimensions, length, precision,
character sets, constraints, etc.
|
String |
typeName()
Get the database-specific name of the column's data type.
|
ColumnEditor |
unsetDefaultValue()
Unsets the default value of the column, reverting the editor to the state where
#defaultValue(Object))
has never been called |
String name()
int position()
int jdbcType()
JDBC type
for this columnint nativeType()
String typeName()
String typeExpression()
String charsetName()
String charsetNameOfTable()
int length()
boolean isOptional()
true
if it is optional, or false
otherwiseboolean isAutoIncremented()
true
if the values are auto-incremented, or false
otherwiseboolean isGenerated()
true
if the values are generated, or false
otherwiseObject defaultValue()
boolean hasDefaultValue()
true
if the default value was provided, or false
otherwiseList<String> enumValues()
ColumnEditor name(String name)
name
- the column nameColumnEditor type(String typeName)
typeName
- the column's type nameColumnEditor type(String typeName, String typeExpression)
type name
and also any dimensions, lengths, precisions, character sets, etc.typeName
- the column's type nametypeExpression
- the column's complete type expressionColumnEditor jdbcType(int jdbcType)
JDBC type
of this column.jdbcType
- JDBC type
for this columnColumnEditor nativeType(int nativeType)
ColumnEditor charsetName(String charsetName)
charsetName
- the database-specific character set name; may be nullColumnEditor charsetNameOfTable(String charsetName)
charsetName
- the database-specific character set name; may be nullColumnEditor length(int length)
length
- the column's lengthColumnEditor scale(Integer scale)
scale
- the scale or null
to unsetColumnEditor optional(boolean optional)
optional
- true
if the column's values are optional, or false
otherwiseColumnEditor autoIncremented(boolean autoIncremented)
autoIncremented
- true
if the column's values are automatically incremented by the database, or false
otherwiseColumnEditor generated(boolean generated)
generated
- true
if the column's values are generated by the database, or false
otherwiseColumnEditor position(int position)
position
- the new column positionColumnEditor defaultValue(Object defaultValue)
defaultValue
- the default valueColumnEditor enumValues(List<String> enumValues)
enumValues
- the enumeration valuesColumnEditor unsetDefaultValue()
#defaultValue(Object))
has never been calledColumn create()
Copyright © 2020 JBoss by Red Hat. All rights reserved.