|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jgpruitt.datamodeler.core.ColumnBuilder
public class ColumnBuilder
Fluent Builder class used to create instances of the Column class.
Column
Field Summary | |
---|---|
protected Column |
column
|
protected TableBuilder |
tableBuilder
|
Constructor Summary | |
---|---|
protected |
ColumnBuilder(java.lang.String name,
TableBuilder tableBuilder)
Constructor. |
Method Summary | |
---|---|
ColumnBuilder |
BIT(int length)
Sets the Column's DataType to BIT and the fixed-length. |
ColumnBuilder |
CHAR(int length)
Sets the Column's DataType to CHAR and the fixed-length. |
ColumnBuilder |
comment(java.lang.String comment)
Assigns a comment to the Column for use in the data dictionary. |
ColumnBuilder |
DATE()
Sets the Column's DataType to DATE. |
ColumnBuilder |
DECIMAL(int precision,
int scale)
Sets the Column's DataType to DECIMAL and sets the precision and scale. |
TableBuilder |
done()
Returns the TableBuilder for the Table to which the Column belongs. |
ColumnBuilder |
DOUBLE()
Sets the Column's DataType to DOUBLE. |
ColumnBuilder |
FLOAT()
Sets the Column's DataType to FLOAT. |
ColumnBuilder |
INT()
Sets the Column's DataType to INT. |
ColumnBuilder |
NCHAR(int length)
Sets the Column's DataType to NCHAR and the fixed-length. |
ColumnBuilder |
NOTNULL()
Sets the Column to disallow NULL values. |
ColumnBuilder |
NULL()
Sets the Column to allow NULL values. |
ColumnBuilder |
NUMERIC(int precision,
int scale)
Sets the Column's DataType to NUMERIC and sets the precision and scale. |
ColumnBuilder |
NVARCHAR(int length)
Sets the Column's DataType to NVARCHAR and the variable-length. |
ColumnBuilder |
REAL()
Sets the Column's DataType to REAL. |
ColumnBuilder |
SMALLINT()
Sets the Column's DataType to SMALLINT. |
ColumnBuilder |
TIME()
Sets the Column's DataType to TIME. |
ColumnBuilder |
TIMESTAMP()
Sets the Column's DataType to TIMESTAMP. |
ColumnBuilder |
TIMESTAMPTZ()
Sets the Column's DataType to TIMESTAMPTZ. |
ColumnBuilder |
TIMETZ()
Sets the Column's DataType to TIMETZ. |
ColumnBuilder |
VARCHAR(int length)
Sets the Column's DataType to VARCHAR and the variable-length. |
ColumnBuilder |
VBIT(int length)
Sets the Column's DataType to VBIT and the variable-length. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Column column
protected final TableBuilder tableBuilder
Constructor Detail |
---|
protected ColumnBuilder(java.lang.String name, TableBuilder tableBuilder)
name
- The name of the Column to create.tableBuilder
- A TableBuilder for the Table to which the new Column should belong.Method Detail |
---|
public TableBuilder done()
TableBuilder
public ColumnBuilder comment(java.lang.String comment)
comment
- The comment string.
public ColumnBuilder NULL()
public ColumnBuilder NOTNULL()
public ColumnBuilder CHAR(int length)
length
- The length of the strings allowed in the Column.
DataType
public ColumnBuilder VARCHAR(int length)
length
- The maximum length of the strings allowed in the Column.
DataType
public ColumnBuilder NCHAR(int length)
length
- The length of the strings allowed in the Column.
DataType
public ColumnBuilder NVARCHAR(int length)
length
- The maximum length of the strings allowed in the Column.
DataType
public ColumnBuilder BIT(int length)
length
- The length of the bit array datatype.
DataType
public ColumnBuilder VBIT(int length)
length
- The maximum length of the bit array datatype.
DataType
public ColumnBuilder INT()
DataType
public ColumnBuilder SMALLINT()
DataType
public ColumnBuilder FLOAT()
DataType
public ColumnBuilder REAL()
DataType
public ColumnBuilder DOUBLE()
DataType
public ColumnBuilder NUMERIC(int precision, int scale)
precision
- the total number of digits allowed in the valuescale
- the number of decimal digits. should be less than precision.
DataType
public ColumnBuilder DECIMAL(int precision, int scale)
precision
- the total number of digits allowed in the valuescale
- the number of decimal digits. should be less than precision.
DataType
public ColumnBuilder DATE()
DataType
public ColumnBuilder TIME()
DataType
public ColumnBuilder TIMETZ()
DataType
public ColumnBuilder TIMESTAMP()
DataType
public ColumnBuilder TIMESTAMPTZ()
DataType
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |