|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.healthmarketscience.jackcess.Column
public class Column
Access database column definition
Nested Class Summary | |
---|---|
class |
Column.AutoNumberGenerator
Base class for the supported autonumber types. |
static class |
Column.SortOrder
Information about the sort order (collation) for a textual column. |
Field Summary | |
---|---|
static java.lang.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. |
static byte |
AUTO_NUMBER_FLAG_MASK
mask for the auto number bit |
static byte |
AUTO_NUMBER_GUID_FLAG_MASK
mask for the auto number guid bit |
static byte |
FIXED_LEN_FLAG_MASK
mask for the fixed len bit |
static Column.SortOrder |
GENERAL_LEGACY_SORT_ORDER
the "general" text sort order, legacy version (access 2000-2007) |
static Column.SortOrder |
GENERAL_SORT_ORDER
the "general" text sort order, latest version (access 2010+) |
static java.lang.Object |
KEEP_VALUE
Meaningless placeholder object for updating rows which indicates that a given column should keep its existing value. |
static byte |
UNKNOWN_FLAG_MASK
mask for the unknown bit (possible "can be null"?) |
Constructor Summary | |
---|---|
Column()
|
|
Column(JetFormat format)
|
|
Column(Table table,
java.nio.ByteBuffer buffer,
int offset,
int displayIndex)
Read a column definition in from a buffer |
Method Summary | |
---|---|
protected static java.lang.Object |
booleanToInteger(java.lang.Object obj)
Treat booleans as integers (C-style). |
int |
compareTo(Column other)
Orders Columns by column number. |
static short |
countNonLongVariableLength(java.util.List<Column> columns)
|
static short |
countVariableLength(java.util.List<Column> columns)
|
static java.lang.String |
decodeUncompressedText(byte[] textBytes,
java.nio.charset.Charset charset)
|
static java.nio.ByteBuffer |
encodeUncompressedText(java.lang.CharSequence text,
java.nio.charset.Charset charset)
|
Column.AutoNumberGenerator |
getAutoNumberGenerator()
Returns the AutoNumberGenerator for this column if this is an autonumber column, null
otherwise. |
protected java.nio.charset.Charset |
getCharset()
|
int |
getColumnIndex()
|
short |
getColumnNumber()
|
ComplexColumnInfo<? extends ComplexValue> |
getComplexInfo()
Returns extended functionality for "complex" columns. |
Database |
getDatabase()
|
int |
getDisplayIndex()
|
int |
getFixedDataOffset()
|
JetFormat |
getFormat()
|
short |
getLength()
|
short |
getLengthInUnits()
|
java.lang.String |
getName()
|
PageChannel |
getPageChannel()
|
byte |
getPrecision()
|
PropertyMap |
getProperties()
|
java.lang.Object |
getRowValue(java.util.Map<java.lang.String,?> rowMap)
|
java.lang.Object |
getRowValue(java.lang.Object[] rowArray)
|
byte |
getScale()
|
int |
getSQLType()
|
Table |
getTable()
|
short |
getTextCodePage()
|
Column.SortOrder |
getTextSortOrder()
|
protected java.util.TimeZone |
getTimeZone()
|
DataType |
getType()
|
int |
getVarLenTableIndex()
|
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 |
isCompressedUnicode()
|
boolean |
isVariableLength()
|
java.lang.Object |
read(byte[] data)
Deserialize a raw byte value for this column into an Object |
java.lang.Object |
read(byte[] data,
java.nio.ByteOrder order)
Deserialize a raw byte value for this column into an Object |
void |
setAutoNumber(boolean autoNumber)
|
void |
setColumnIndex(int newColumnIndex)
|
void |
setColumnNumber(short newColumnNumber)
|
void |
setCompressedUnicode(boolean newCompessedUnicode)
|
void |
setFixedDataOffset(int newOffset)
|
void |
setLength(short length)
|
void |
setLengthInUnits(short unitLength)
|
void |
setName(java.lang.String name)
|
void |
setPrecision(byte newPrecision)
|
java.lang.Object |
setRowValue(java.util.Map<java.lang.String,java.lang.Object> rowMap,
java.lang.Object value)
|
java.lang.Object |
setRowValue(java.lang.Object[] rowArray,
java.lang.Object value)
|
void |
setScale(byte newScale)
|
void |
setSQLType(int type)
|
void |
setSQLType(int type,
int lengthInUnits)
|
void |
setTextSortOrder(Column.SortOrder newTextSortOrder)
|
void |
setType(DataType type)
Also sets the length and the variable length flag, inferred from the type. |
void |
setVariableLength(boolean variableLength)
|
void |
setVarLenTableIndex(int idx)
|
void |
setVersionHistoryColumn(Column versionHistoryCol)
|
static boolean |
toBooleanValue(java.lang.Object obj)
Interpret a boolean value (null == false) |
static byte[] |
toByteArray(java.lang.Object value)
|
static java.lang.CharSequence |
toCharSequence(java.lang.Object value)
|
java.lang.String |
toString()
|
void |
validate(JetFormat format)
Checks that this column definition is valid. |
java.nio.ByteBuffer |
write(java.lang.Object obj,
int remainingRowLength)
Serialize an Object into a raw byte value for this column in little endian order |
java.nio.ByteBuffer |
write(java.lang.Object obj,
int remainingRowLength,
java.nio.ByteOrder order)
Serialize an Object into a raw byte value for this column |
protected static void |
writeDefinitions(com.healthmarketscience.jackcess.TableCreator creator,
java.nio.ByteBuffer buffer)
Writes the column definitions into a table definition buffer. |
java.nio.ByteBuffer |
writeFixedLengthField(java.lang.Object obj,
java.nio.ByteOrder order)
Serialize an Object into a raw byte value for this column |
java.nio.ByteBuffer |
writeLongValue(byte[] value,
int remainingRowLength)
Write an LVAL column into a ByteBuffer inline if it fits, otherwise in other data page(s). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Object AUTO_NUMBER
public static final java.lang.Object KEEP_VALUE
public static final byte FIXED_LEN_FLAG_MASK
public static final byte AUTO_NUMBER_FLAG_MASK
public static final byte AUTO_NUMBER_GUID_FLAG_MASK
public static final byte UNKNOWN_FLAG_MASK
public static final Column.SortOrder GENERAL_LEGACY_SORT_ORDER
public static final Column.SortOrder GENERAL_SORT_ORDER
Constructor Detail |
---|
public Column()
public Column(JetFormat format)
public Column(Table table, java.nio.ByteBuffer buffer, int offset, int displayIndex) throws java.io.IOException
table
- owning tablebuffer
- Buffer containing column definitionoffset
- Offset in the buffer at which the column definition starts
java.io.IOException
Method Detail |
---|
public Table getTable()
public Database getDatabase()
public JetFormat getFormat()
public PageChannel getPageChannel()
public java.lang.String getName()
public void setName(java.lang.String name)
public boolean isVariableLength()
public void setVariableLength(boolean variableLength)
public boolean isAutoNumber()
public void setAutoNumber(boolean autoNumber)
public short getColumnNumber()
public void setColumnNumber(short newColumnNumber)
public int getColumnIndex()
public void setColumnIndex(int newColumnIndex)
public int getDisplayIndex()
public void setType(DataType type)
public DataType getType()
public int getSQLType() throws java.sql.SQLException
java.sql.SQLException
public void setSQLType(int type) throws java.sql.SQLException
java.sql.SQLException
public void setSQLType(int type, int lengthInUnits) throws java.sql.SQLException
java.sql.SQLException
public boolean isCompressedUnicode()
public void setCompressedUnicode(boolean newCompessedUnicode)
public byte getPrecision()
public void setPrecision(byte newPrecision)
public byte getScale()
public void setScale(byte newScale)
public Column.SortOrder getTextSortOrder()
public void setTextSortOrder(Column.SortOrder newTextSortOrder)
public short getTextCodePage()
public void setLength(short length)
public short getLength()
public void setLengthInUnits(short unitLength)
public short getLengthInUnits()
public void setVarLenTableIndex(int idx)
public int getVarLenTableIndex()
public void setFixedDataOffset(int newOffset)
public int getFixedDataOffset()
protected java.nio.charset.Charset getCharset()
protected java.util.TimeZone getTimeZone()
public boolean isAppendOnly()
public Column getVersionHistoryColumn()
public void setVersionHistoryColumn(Column versionHistoryCol)
public ComplexColumnInfo<? extends ComplexValue> getComplexInfo()
public Column.AutoNumberGenerator getAutoNumberGenerator()
null
otherwise.
public PropertyMap getProperties() throws java.io.IOException
java.io.IOException
public void validate(JetFormat format)
java.lang.IllegalArgumentException
- if this column definition is invalid.public java.lang.Object setRowValue(java.lang.Object[] rowArray, java.lang.Object value)
public java.lang.Object setRowValue(java.util.Map<java.lang.String,java.lang.Object> rowMap, java.lang.Object value)
public java.lang.Object getRowValue(java.lang.Object[] rowArray)
public java.lang.Object getRowValue(java.util.Map<java.lang.String,?> rowMap)
public java.lang.Object read(byte[] data) throws java.io.IOException
data
- The raw byte value
java.io.IOException
public java.lang.Object read(byte[] data, java.nio.ByteOrder order) throws java.io.IOException
data
- The raw byte valueorder
- Byte order in which the raw value is stored
java.io.IOException
public java.nio.ByteBuffer writeLongValue(byte[] value, int remainingRowLength) throws java.io.IOException
value
- Value of the LVAL column
java.io.IOException
public java.nio.ByteBuffer write(java.lang.Object obj, int remainingRowLength) throws java.io.IOException
obj
- Object to serialize
java.io.IOException
public java.nio.ByteBuffer write(java.lang.Object obj, int remainingRowLength, java.nio.ByteOrder order) throws java.io.IOException
obj
- Object to serializeorder
- Order in which to serialize
java.io.IOException
public java.nio.ByteBuffer writeFixedLengthField(java.lang.Object obj, java.nio.ByteOrder order) throws java.io.IOException
obj
- Object to serializeorder
- Order in which to serialize
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String decodeUncompressedText(byte[] textBytes, java.nio.charset.Charset charset)
textBytes
- bytes of text to decodecharset
- relevant charset
public static java.nio.ByteBuffer encodeUncompressedText(java.lang.CharSequence text, java.nio.charset.Charset charset)
text
- Text to encodecharset
- database charset
public int compareTo(Column other)
compareTo
in interface java.lang.Comparable<Column>
public static short countVariableLength(java.util.List<Column> columns)
columns
- A list of columns in a table definition
public static short countNonLongVariableLength(java.util.List<Column> columns)
columns
- A list of columns in a table definition
public static java.lang.CharSequence toCharSequence(java.lang.Object value) throws java.io.IOException
java.io.IOException
public static byte[] toByteArray(java.lang.Object value) throws java.io.IOException
java.io.IOException
public static boolean toBooleanValue(java.lang.Object obj)
protected static java.lang.Object booleanToInteger(java.lang.Object obj)
protected static void writeDefinitions(com.healthmarketscience.jackcess.TableCreator creator, java.nio.ByteBuffer buffer) throws java.io.IOException
buffer
- Buffer to write tocolumns
- List of Columns to write definitions for
java.io.IOException
|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |