Column. See TableBuilder for example usage. Additionally, a
Column can be added to an existing Table using the addToTable(Table) method.
TableBuilder
| Modifier and Type | Field and Description |
|---|---|
| private boolean | autoNumber
whether or not the column is auto-number |
| private boolean | calculated
whether or not the column is calculated |
| private short | columnId
id for the new column, or |
| private short | columnNumber
0-based column number |
| private boolean | compressedUnicode
whether or not the column allows compressed unicode |
| private boolean | hyperlink
whether or not the column is a hyperlink (memo only) |
| private Short | length
optional length for the new column |
| private String | name
name of the new column |
| private Byte | precision
optional precision for the new column |
| private Map | props
table properties (if any) |
| private Byte | scale
optional scale for the new column |
| private ColumnImpl. | sortOrder
the collating sort order for a text field |
| private DataType | type
the type of the new column |
| private static final short | UNSET_COLUMN_ID
marks a column id which has not been assigned yet |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Column | addToTable(Table table)
Adds a new Column to the given Table with the currently configured attributes. |
| public Column | addToTableDefinition(TableDefinition table)
Adds a new Column to the given TableDefinition with the currently configured attributes. |
| public ColumnBuilder | |
| public short | Returns: the column idReturns the id of the new column, which defaults to the column number. |
| public short | |
| public int | |
| public short | |
| public String | |
| public byte | |
| public Map | |
| private PropertyMap. | |
| public byte | |
| public ColumnImpl. | |
| public DataType | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public void | |
| private void | |
| public void | |
| public boolean | |
| public ColumnBuilder | |
| public String | |
| public void | |
| public ColumnBuilder | |
| public ColumnBuilder | |
| public ColumnBuilder | withCalculatedInfo(String expression)
Convenience method to set the various info for a calculated type (flag, result type property and expression) |
| public ColumnBuilder | withCompressedUnicode(boolean newCompressedUnicode)
Sets whether of not the new column allows unicode compression. |
| private String | |
| public ColumnBuilder | withFromColumn(Column template)
Sets all attributes except name from the given Column template (including all column properties except GUID). |
| public ColumnBuilder | withFromColumn(ColumnBuilder template)
Sets all attributes except name from the given Column template. |
| public ColumnBuilder | |
| public ColumnBuilder | |
| public ColumnBuilder | |
| public ColumnBuilder | |
| public ColumnBuilder | |
| public ColumnBuilder | |
| public ColumnBuilder | |
| public ColumnBuilder | withProperty(String propName, Object value)
Sets the column property with the given name to the given value. |
| public ColumnBuilder | withProperty(String propName, DataType propType, Object value)
Sets the column property with the given name and type to the given value. |
| public ColumnBuilder | |
| public ColumnBuilder | |
| public ColumnBuilder | withSqlType(int sqlType, int lengthInUnits)
Sets the type for the new column based on the given SQL type and target data length (in type specific units). |
| public ColumnBuilder | withSqlType(int sqlType, int lengthInUnits, Database.
Sets the type for the new column based on the given SQL type, target data length (in type specific units), and target FileFormat. |
| public ColumnBuilder |
| autoNumber | back to summary |
|---|---|
| private boolean autoNumber whether or not the column is auto-number | |
| calculated | back to summary |
|---|---|
| private boolean calculated whether or not the column is calculated | |
| columnId | back to summary |
|---|---|
| private short columnId id for the new column, or | |
| columnNumber | back to summary |
|---|---|
| private short columnNumber 0-based column number | |
| compressedUnicode | back to summary |
|---|---|
| private boolean compressedUnicode whether or not the column allows compressed unicode | |
| hyperlink | back to summary |
|---|---|
| private boolean hyperlink whether or not the column is a hyperlink (memo only) | |
| length | back to summary |
|---|---|
| private Short length optional length for the new column | |
| name | back to summary |
|---|---|
| private String name name of the new column | |
| precision | back to summary |
|---|---|
| private Byte precision optional precision for the new column | |
| props | back to summary |
|---|---|
| private Map<String, PropertyMap. table properties (if any) | |
| scale | back to summary |
|---|---|
| private Byte scale optional scale for the new column | |
| sortOrder | back to summary |
|---|---|
| private ColumnImpl. the collating sort order for a text field | |
| type | back to summary |
|---|---|
| private DataType type the type of the new column | |
| UNSET_COLUMN_ID | back to summary |
|---|---|
| private static final short UNSET_COLUMN_ID marks a column id which has not been assigned yet | |
| ColumnBuilder | back to summary |
|---|---|
| public ColumnBuilder(String name) | |
| ColumnBuilder | back to summary |
|---|---|
| public ColumnBuilder(String name, DataType type) | |
| addToTable | back to summary |
|---|---|
| public Column addToTable(Table table) throws IOException Adds a new Column to the given Table with the currently configured attributes. | |
| addToTableDefinition | back to summary |
|---|---|
| public Column addToTableDefinition(TableDefinition table) throws IOException Adds a new Column to the given TableDefinition with the currently configured attributes. | |
| escapeName | back to summary |
|---|---|
| public ColumnBuilder escapeName() Escapes the new column's name using | |
| getColumnId | back to summary |
|---|---|
| public short getColumnId() Returns the id of the new column, which defaults to the column number.
| |
| getColumnNumber | back to summary |
|---|---|
| public short getColumnNumber() | |
| getFixedDataSize | back to summary |
|---|---|
| public int getFixedDataSize() | |
| getLength | back to summary |
|---|---|
| public short getLength() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getPrecision | back to summary |
|---|---|
| public byte getPrecision() | |
| getProperties | back to summary |
|---|---|
| public Map | |
| getProperty | back to summary |
|---|---|
| private PropertyMap. | |
| getScale | back to summary |
|---|---|
| public byte getScale() | |
| getTextSortOrder | back to summary |
|---|---|
| public ColumnImpl. | |
| getType | back to summary |
|---|---|
| public DataType getType() | |
| isAutoNumber | back to summary |
|---|---|
| public boolean isAutoNumber() | |
| isCalculated | back to summary |
|---|---|
| public boolean isCalculated() | |
| isCompressedUnicode | back to summary |
|---|---|
| public boolean isCompressedUnicode() | |
| isHyperlink | back to summary |
|---|---|
| public boolean isHyperlink() | |
| isVariableLength | back to summary |
|---|---|
| public boolean isVariableLength() | |
| setColumnId | back to summary |
|---|---|
| public void setColumnId(short newColumnId) Sets the id of the new column. Access never reuses or renumbers column ids.
| |
| setColumnNumber | back to summary |
|---|---|
| public void setColumnNumber(short newColumnNumber) | |
| setProperty | back to summary |
|---|---|
| private void setProperty(String propName, PropertyMap. | |
| setTextSortOrder | back to summary |
|---|---|
| public void setTextSortOrder(ColumnImpl. | |
| storeInNullMask | back to summary |
|---|---|
| public boolean storeInNullMask() | |
| toColumn | back to summary |
|---|---|
| public ColumnBuilder toColumn() Creates a new Column with the currently configured attributes. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| validate | back to summary |
|---|---|
| public void validate(JetFormat format) Checks that this column definition is valid.
| |
| withAutoNumber | back to summary |
|---|---|
| public ColumnBuilder withAutoNumber(boolean newAutoNumber) Sets whether of not the new column is an auto-number column. | |
| withCalculated | back to summary |
|---|---|
| public ColumnBuilder withCalculated(boolean newCalculated) Sets whether of not the new column is a calculated column. | |
| withCalculatedInfo | back to summary |
|---|---|
| public ColumnBuilder withCalculatedInfo(String expression) Convenience method to set the various info for a calculated type (flag, result type property and expression) | |
| withCompressedUnicode | back to summary |
|---|---|
| public ColumnBuilder withCompressedUnicode(boolean newCompressedUnicode) Sets whether of not the new column allows unicode compression. | |
| withErrorContext | back to summary |
|---|---|
| private String withErrorContext(String msg) | |
| withFromColumn | back to summary |
|---|---|
| public ColumnBuilder withFromColumn(Column template) throws IOException Sets all attributes except name from the given Column template (including all column properties except GUID). | |
| withFromColumn | back to summary |
|---|---|
| public ColumnBuilder withFromColumn(ColumnBuilder template) Sets all attributes except name from the given Column template. | |
| withHyperlink | back to summary |
|---|---|
| public ColumnBuilder withHyperlink(boolean newHyperlink) Sets whether of not the new column allows unicode compression. | |
| withLength | back to summary |
|---|---|
| public ColumnBuilder withLength(int newLength) Sets the length (in bytes) for the new column. | |
| withLengthInUnits | back to summary |
|---|---|
| public ColumnBuilder withLengthInUnits(int unitLength) Sets the length (in type specific units) for the new column. | |
| withMaxLength | back to summary |
|---|---|
| public ColumnBuilder withMaxLength() Sets the length for the new column to the max length for the type. Does nothing for types which are not variable length. | |
| withMaxPrecision | back to summary |
|---|---|
| public ColumnBuilder withMaxPrecision() Sets the precision for the new column to the max length for the type. Does nothing for types which do not have a precision. | |
| withMaxScale | back to summary |
|---|---|
| public ColumnBuilder withMaxScale() Sets the scale for the new column to the max length for the type. Does nothing for types which do not have a scale. | |
| withPrecision | back to summary |
|---|---|
| public ColumnBuilder withPrecision(int newPrecision) Sets the precision for the new column. | |
| withProperty | back to summary |
|---|---|
| public ColumnBuilder withProperty(String propName, Object value) Sets the column property with the given name to the given value. Attempts to determine the type of the property
(see | |
| withProperty | back to summary |
|---|---|
| public ColumnBuilder withProperty(String propName, DataType propType, Object value) Sets the column property with the given name and type to the given value. | |
| withScale | back to summary |
|---|---|
| public ColumnBuilder withScale(int newScale) Sets the scale for the new column. | |
| withSqlType | back to summary |
|---|---|
| public ColumnBuilder withSqlType(int sqlType) throws IOException Sets the type for the new column based on the given SQL type. | |
| withSqlType | back to summary |
|---|---|
| public ColumnBuilder withSqlType(int sqlType, int lengthInUnits) throws IOException Sets the type for the new column based on the given SQL type and target data length (in type specific units). | |
| withSqlType | back to summary |
|---|---|
| public ColumnBuilder withSqlType(int sqlType, int lengthInUnits, Database. Sets the type for the new column based on the given SQL type, target data length (in type specific units), and target FileFormat. | |
| withType | back to summary |
|---|---|
| public ColumnBuilder withType(DataType newType) Sets the type for the new column. | |