| java.lang.Object com.healthmarketscience.jackcess.Column
Column | public class Column implements Comparable<Column>(Code) | | Access database column definition
author: Tim McCune |
Method Summary | |
public int | compareTo(Column other) | public static short | countNonLongVariableLength(List<Column> columns) | public static short | countVariableLength(List<Column> columns) | public static String | decodeUncompressedText(byte[] textBytes, JetFormat format) | public static ByteBuffer | encodeUncompressedText(CharSequence text, JetFormat format) | public int | getColumnIndex() | public short | getColumnNumber() | public int | getFixedDataOffset() | public JetFormat | getFormat() | public short | getLength() | public short | getLengthInUnits() | public String | getName() | public PageChannel | getPageChannel() | public byte | getPrecision() | public int | getSQLType() | public byte | getScale() | public Table | getTable() | public DataType | getType() | public int | getVarLenTableIndex() | public boolean | isAutoNumber() | public boolean | isCompressedUnicode() | public boolean | isVariableLength() | public Object | read(byte[] data) | public Object | read(byte[] data, ByteOrder order) | public void | setAutoNumber(boolean autoNumber) | public void | setColumnIndex(int newColumnIndex) | public void | setColumnNumber(short newColumnNumber) | public void | setFixedDataOffset(int newOffset) | public void | setLength(short length) | public void | setLengthInUnits(short unitLength) | public void | setName(String name) | public void | setPrecision(byte newPrecision) | public void | setSQLType(int type) | public void | setSQLType(int type, int lengthInUnits) | public void | setScale(byte newScale) | public void | setType(DataType type) Also sets the length and the variable length flag, inferred from the
type. | public void | setVarLenTableIndex(int idx) | public void | setVariableLength(boolean variableLength) | public static boolean | toBooleanValue(Object obj) | public static CharSequence | toCharSequence(Object value) | public String | toString() | public void | validate(JetFormat format) Checks that this column definition is valid. | public ByteBuffer | write(Object obj, int remainingRowLength) | public ByteBuffer | write(Object obj, int remainingRowLength, ByteOrder order) | public ByteBuffer | writeFixedLengthField(Object obj, ByteOrder order) | public ByteBuffer | writeLongValue(byte[] value, int remainingRowLength) Write an LVAL column into a ByteBuffer inline if it fits, otherwise in
other data page(s). |
AUTO_NUMBER | final public static Object AUTO_NUMBER(Code) | | 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.
|
AUTO_NUMBER_FLAG_MASK | final public static byte AUTO_NUMBER_FLAG_MASK(Code) | | mask for the auto number bit
|
FIXED_LEN_FLAG_MASK | final public static byte FIXED_LEN_FLAG_MASK(Code) | | mask for the fixed len bit
|
UNKNOWN_FLAG_MASK | final public static byte UNKNOWN_FLAG_MASK(Code) | | mask for the unknown bit
|
Column | Column(boolean testing)(Code) | | Only used by unit tests
|
Column | public Column(Table table, ByteBuffer buffer, int offset) throws IOException(Code) | | Read a column definition in from a buffer
Parameters: table - owning table Parameters: buffer - Buffer containing column definition Parameters: offset - Offset in the buffer at which the column definition starts |
countNonLongVariableLength | public static short countNonLongVariableLength(List<Column> columns)(Code) | | Parameters: columns - A list of columns in a table definition The number of variable length columns which are not long valuesfound in the list |
countVariableLength | public static short countVariableLength(List<Column> columns)(Code) | | Parameters: columns - A list of columns in a table definition The number of variable length columns found in the list |
decodeUncompressedText | public static String decodeUncompressedText(byte[] textBytes, JetFormat format)(Code) | | Parameters: textBytes - bytes of text to decode Parameters: format - relevant db format the decoded string |
encodeUncompressedText | public static ByteBuffer encodeUncompressedText(CharSequence text, JetFormat format)(Code) | | Parameters: text - Text to encode Parameters: format - relevant db format A buffer with the text encoded |
getColumnIndex | public int getColumnIndex()(Code) | | |
getColumnNumber | public short getColumnNumber()(Code) | | |
getFixedDataOffset | public int getFixedDataOffset()(Code) | | |
getLength | public short getLength()(Code) | | |
getLengthInUnits | public short getLengthInUnits()(Code) | | |
getPrecision | public byte getPrecision()(Code) | | |
getScale | public byte getScale()(Code) | | |
getVarLenTableIndex | public int getVarLenTableIndex()(Code) | | |
isAutoNumber | public boolean isAutoNumber()(Code) | | |
isCompressedUnicode | public boolean isCompressedUnicode()(Code) | | |
isVariableLength | public boolean isVariableLength()(Code) | | |
read | public Object read(byte[] data) throws IOException(Code) | | Deserialize a raw byte value for this column into an Object
Parameters: data - The raw byte value The deserialized Object |
read | public Object read(byte[] data, ByteOrder order) throws IOException(Code) | | Deserialize a raw byte value for this column into an Object
Parameters: data - The raw byte value Parameters: order - Byte order in which the raw value is stored The deserialized Object |
setAutoNumber | public void setAutoNumber(boolean autoNumber)(Code) | | |
setColumnIndex | public void setColumnIndex(int newColumnIndex)(Code) | | |
setColumnNumber | public void setColumnNumber(short newColumnNumber)(Code) | | |
setFixedDataOffset | public void setFixedDataOffset(int newOffset)(Code) | | |
setLength | public void setLength(short length)(Code) | | |
setLengthInUnits | public void setLengthInUnits(short unitLength)(Code) | | |
setPrecision | public void setPrecision(byte newPrecision)(Code) | | |
setScale | public void setScale(byte newScale)(Code) | | |
setType | public void setType(DataType type)(Code) | | Also sets the length and the variable length flag, inferred from the
type. For types with scale/precision, sets the scale and precision to
default values.
|
setVarLenTableIndex | public void setVarLenTableIndex(int idx)(Code) | | |
setVariableLength | public void setVariableLength(boolean variableLength)(Code) | | |
toBooleanValue | public static boolean toBooleanValue(Object obj)(Code) | | Interpret a boolean value (null == false)
|
toCharSequence | public static CharSequence toCharSequence(Object value)(Code) | | an appropriate CharSequence representation of the given object. |
write | public ByteBuffer write(Object obj, int remainingRowLength) throws IOException(Code) | | Serialize an Object into a raw byte value for this column in little endian order
Parameters: obj - Object to serialize A buffer containing the bytes |
write | public ByteBuffer write(Object obj, int remainingRowLength, ByteOrder order) throws IOException(Code) | | Serialize an Object into a raw byte value for this column
Parameters: obj - Object to serialize Parameters: order - Order in which to serialize A buffer containing the bytes |
writeFixedLengthField | public ByteBuffer writeFixedLengthField(Object obj, ByteOrder order) throws IOException(Code) | | Serialize an Object into a raw byte value for this column
Parameters: obj - Object to serialize Parameters: order - Order in which to serialize A buffer containing the bytes |
writeLongValue | public ByteBuffer writeLongValue(byte[] value, int remainingRowLength) throws IOException(Code) | | Write an LVAL column into a ByteBuffer inline if it fits, otherwise in
other data page(s).
Parameters: value - Value of the LVAL column A buffer containing the LVAL definition and (possibly) the columnvalue (unless written to other pages) |
|
|