com.healthmarketscience.jackcess
Interface Column

All Known Implementing Classes:
ColumnImpl

public interface Column

Access database column definition. A Table has a list of Column instances describing the table schema.

A Column instance is not thread-safe (see Database for more thread-safety details).

Author:
James Ahlborn

Field Summary
static Object AUTO_NUMBER
          Meaningless placeholder object for inserting values in an autonumber column.
static Object KEEP_VALUE
          Meaningless placeholder object for updating rows which indicates that a given column should keep its existing value.
 
Method Summary
 int getColumnIndex()
           
 ColumnValidator getColumnValidator()
          Gets currently configured ColumnValidator (always non-null).
 ComplexColumnInfo<? extends ComplexValue> getComplexInfo()
          Returns extended functionality for "complex" columns.
 Database getDatabase()
           
 short getLength()
           
 short getLengthInUnits()
           
 String getName()
           
 byte getPrecision()
           
 PropertyMap getProperties()
           
 Object getRowValue(Map<String,?> rowMap)
           
 Object getRowValue(Object[] rowArray)
           
 byte getScale()
           
 int getSQLType()
           
 Table getTable()
           
 DataType getType()
           
 Column getVersionHistoryColumn()
          Returns the column which tracks the version history for an "append only" column.
 boolean isAppendOnly()
          Whether or not this column is "append only" (its history is tracked by a separate version history column).
 boolean isAutoNumber()
           
 boolean isCalculated()
          Returns whether or not this is a calculated column.
 boolean isCompressedUnicode()
           
 boolean isHyperlink()
          Returns whether or not this is a hyperlink column (only possible for columns of type MEMO).
 boolean isVariableLength()
           
 void setColumnValidator(ColumnValidator newValidator)
          Sets a new ColumnValidator.
 Object setRowValue(Map<String,Object> rowMap, Object value)
           
 Object setRowValue(Object[] rowArray, Object value)
           
 

Field Detail

AUTO_NUMBER

static final Object AUTO_NUMBER
Meaningless placeholder object for inserting values in an autonumber column. it is not required that this value be used (any passed in value is ignored), but using this placeholder may make code more obvious.


KEEP_VALUE

static final Object KEEP_VALUE
Meaningless placeholder object for updating rows which indicates that a given column should keep its existing value.

Method Detail

getTable

Table getTable()

getDatabase

Database getDatabase()

getName

String getName()

isVariableLength

boolean isVariableLength()

isAutoNumber

boolean isAutoNumber()

getColumnIndex

int getColumnIndex()

getType

DataType getType()

getSQLType

int getSQLType()
               throws SQLException
Throws:
SQLException

isCompressedUnicode

boolean isCompressedUnicode()

getPrecision

byte getPrecision()

getScale

byte getScale()

getLength

short getLength()

getLengthInUnits

short getLengthInUnits()

isAppendOnly

boolean isAppendOnly()
Whether or not this column is "append only" (its history is tracked by a separate version history column).


isHyperlink

boolean isHyperlink()
Returns whether or not this is a hyperlink column (only possible for columns of type MEMO).


isCalculated

boolean isCalculated()
Returns whether or not this is a calculated column. Note that jackess won't interpret the calculation expression (but the field can be written directly).


getComplexInfo

ComplexColumnInfo<? extends ComplexValue> getComplexInfo()
Returns extended functionality for "complex" columns.


getProperties

PropertyMap getProperties()
                          throws IOException
Returns:
the properties for this column
Throws:
IOException

getVersionHistoryColumn

Column getVersionHistoryColumn()
Returns the column which tracks the version history for an "append only" column.


getColumnValidator

ColumnValidator getColumnValidator()
Gets currently configured ColumnValidator (always non-null).


setColumnValidator

void setColumnValidator(ColumnValidator newValidator)
Sets a new ColumnValidator. If null, resets to the value returned from the Database's ColumnValidatorFactory (if the factory returns null, then the default is used). Autonumber columns cannot have a validator instance other than the default.

Throws:
IllegalArgumentException - if an attempt is made to set a non-null ColumnValidator instance on an autonumber column

setRowValue

Object setRowValue(Object[] rowArray,
                   Object value)

setRowValue

Object setRowValue(Map<String,Object> rowMap,
                   Object value)

getRowValue

Object getRowValue(Object[] rowArray)

getRowValue

Object getRowValue(Map<String,?> rowMap)


Copyright © 2005-2017 Health Market Science. All Rights Reserved.