|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.healthmarketscience.jackcess.ColumnBuilder
public class ColumnBuilder
Builder style class for constructing a Column.
| Constructor Summary | |
|---|---|
ColumnBuilder(String name)
|
|
ColumnBuilder(String name,
DataType type)
|
|
| Method Summary | |
|---|---|
ColumnBuilder |
setAutoNumber(boolean autoNumber)
Sets whether of not the new column is an auto-number column. |
ColumnBuilder |
setFromColumn(Column template)
Sets all attributes except name from the given Column template. |
ColumnBuilder |
setLength(int length)
Sets the length (in bytes) for the new column. |
ColumnBuilder |
setLengthInUnits(int unitLength)
Sets the length (in type specific units) for the new column. |
ColumnBuilder |
setMaxLength()
Sets the length for the new column to the max length for the type. |
ColumnBuilder |
setPrecision(int newPrecision)
Sets the precision for the new column. |
ColumnBuilder |
setScale(int newScale)
Sets the scale for the new column. |
ColumnBuilder |
setSQLType(int type)
Sets the type for the new column based on the given SQL type. |
ColumnBuilder |
setSQLType(int type,
int lengthInUnits)
Sets the type for the new column based on the given SQL type and target data length (in type specific units). |
ColumnBuilder |
setType(DataType type)
Sets the type for the new column. |
Column |
toColumn()
Creates a new Column with the currently configured attributes. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColumnBuilder(String name)
public ColumnBuilder(String name,
DataType type)
| Method Detail |
|---|
public ColumnBuilder setType(DataType type)
public ColumnBuilder setSQLType(int type)
throws SQLException
SQLException
public ColumnBuilder setSQLType(int type,
int lengthInUnits)
throws SQLException
SQLExceptionpublic ColumnBuilder setPrecision(int newPrecision)
public ColumnBuilder setScale(int newScale)
public ColumnBuilder setLength(int length)
public ColumnBuilder setLengthInUnits(int unitLength)
public ColumnBuilder setMaxLength()
public ColumnBuilder setAutoNumber(boolean autoNumber)
public ColumnBuilder setFromColumn(Column template)
public Column toColumn()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||