S
- The type of the builder subclass.public static class ColumnDTO.Builder<S extends ColumnDTO.Builder>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoIncrement
Whether the column is an auto-increment column.
|
protected java.lang.String |
comment
The comment associated with the column.
|
protected Type |
dataType
The data type of the column.
|
protected Expression |
defaultValue
The default value of the column.
|
protected java.lang.String |
name
The name of the column.
|
protected boolean |
nullable
Whether the column value can be null.
|
Constructor and Description |
---|
Builder()
Constructs a new Builder.
|
Modifier and Type | Method and Description |
---|---|
ColumnDTO |
build()
Builds a Column DTO based on the provided builder parameters.
|
S |
withAutoIncrement(boolean autoIncrement)
Sets whether the column is an auto-increment column.
|
S |
withComment(java.lang.String comment)
Sets the comment associated with the column.
|
S |
withDataType(Type dataType)
Sets the data type of the column.
|
S |
withDefaultValue(Expression defaultValue)
Sets the default value of the column.
|
S |
withName(java.lang.String name)
Sets the name of the column.
|
S |
withNullable(boolean nullable)
Sets whether the column value can be null.
|
protected java.lang.String name
protected Type dataType
protected java.lang.String comment
protected boolean nullable
protected boolean autoIncrement
protected Expression defaultValue
public S withName(java.lang.String name)
name
- The name of the column.public S withDataType(Type dataType)
dataType
- The data type of the column.public S withComment(java.lang.String comment)
comment
- The comment associated with the column.public S withNullable(boolean nullable)
nullable
- Whether the column value can be null.public S withAutoIncrement(boolean autoIncrement)
autoIncrement
- Whether the column is an auto-increment column.public S withDefaultValue(Expression defaultValue)
defaultValue
- The default value of the column.public ColumnDTO build()
java.lang.NullPointerException
- If required, fields name and data type are not set.