|
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.Index
public class Index
Access table (logical) index. Logical indexes are backed for IndexData, where one or more logical indexes could be backed by the same data.
Nested Class Summary | |
---|---|
static class |
Index.ForeignKeyReference
Information about a foreign key reference defined in an index (when referential integrity should be enforced). |
Field Summary | |
---|---|
protected static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
---|---|
protected |
Index(java.nio.ByteBuffer tableBuffer,
java.util.List<IndexData> indexDatas,
JetFormat format)
|
Method Summary | |
---|---|
void |
addRow(java.lang.Object[] row,
RowId rowId)
Adds a row to this index Forces index initialization. |
int |
compareTo(Index other)
|
java.lang.Object[] |
constructIndexRow(java.util.Map<java.lang.String,?> row)
Constructs an array of values appropriate for this index from the given column values. |
java.lang.Object[] |
constructIndexRow(java.lang.String colName,
java.lang.Object value)
Constructs an array of values appropriate for this index from the given column value. |
java.lang.Object[] |
constructIndexRowFromEntry(java.lang.Object... values)
Constructs an array of values appropriate for this index from the given column values, expected to match the columns for this index. |
IndexData.EntryCursor |
cursor()
Gets a new cursor for this index. |
IndexData.EntryCursor |
cursor(java.lang.Object[] startRow,
boolean startInclusive,
java.lang.Object[] endRow,
boolean endInclusive)
Gets a new cursor for this index, narrowed to the range defined by the given startRow and endRow. |
void |
deleteRow(java.lang.Object[] row,
RowId rowId)
Removes a row from this index Forces index initialization. |
java.util.List<IndexData.ColumnDescriptor> |
getColumns()
Returns the Columns for this index (unmodifiable) |
JetFormat |
getFormat()
|
IndexData |
getIndexData()
|
byte |
getIndexFlags()
|
int |
getIndexNumber()
|
java.lang.String |
getName()
|
PageChannel |
getPageChannel()
|
Index.ForeignKeyReference |
getReference()
|
Index |
getReferencedIndex()
|
Table |
getTable()
|
int |
getUniqueEntryCount()
|
int |
getUniqueEntryCountOffset()
|
void |
initialize()
Forces initialization of this index (actual parsing of index pages). normally, the index will not be initialized until the entries are actually needed. |
boolean |
isForeignKey()
|
boolean |
isInitialized()
Whether or not the complete index state has been read. |
boolean |
isPrimaryKey()
|
boolean |
isUnique()
Whether or not index entries must be unique. |
void |
setName(java.lang.String name)
|
boolean |
shouldIgnoreNulls()
Whether or not null values are actually recorded in the index. |
java.lang.String |
toString()
|
void |
update()
Writes the current index state to the database. |
protected static void |
writeDefinitions(com.healthmarketscience.jackcess.TableCreator creator,
java.nio.ByteBuffer buffer)
Writes the logical index definitions into a table definition buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.commons.logging.Log LOG
Constructor Detail |
---|
protected Index(java.nio.ByteBuffer tableBuffer, java.util.List<IndexData> indexDatas, JetFormat format) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public IndexData getIndexData()
public Table getTable()
public JetFormat getFormat()
public PageChannel getPageChannel()
public int getIndexNumber()
public byte getIndexFlags()
public int getUniqueEntryCount()
public int getUniqueEntryCountOffset()
public java.lang.String getName()
public void setName(java.lang.String name)
public boolean isPrimaryKey()
public boolean isForeignKey()
public Index.ForeignKeyReference getReference()
public Index getReferencedIndex() throws java.io.IOException
null
.
java.io.IOException
public boolean shouldIgnoreNulls()
null
values are actually recorded in the index.
public boolean isUnique()
Some notes about uniqueness:
null
entries invalid for a unique index
public java.util.List<IndexData.ColumnDescriptor> getColumns()
public boolean isInitialized()
public void initialize() throws java.io.IOException
java.io.IOException
public void update() throws java.io.IOException
Forces index initialization.
java.io.IOException
public void addRow(java.lang.Object[] row, RowId rowId) throws java.io.IOException
Forces index initialization.
row
- Row to addrowId
- rowId of the row to be added
java.io.IOException
public void deleteRow(java.lang.Object[] row, RowId rowId) throws java.io.IOException
Forces index initialization.
row
- Row to removerowId
- rowId of the row to be removed
java.io.IOException
public IndexData.EntryCursor cursor() throws java.io.IOException
Forces index initialization.
java.io.IOException
public IndexData.EntryCursor cursor(java.lang.Object[] startRow, boolean startInclusive, java.lang.Object[] endRow, boolean endInclusive) throws java.io.IOException
Forces index initialization.
startRow
- the first row of data for the cursor, or null
for the first entrystartInclusive
- whether or not startRow is inclusive or exclusiveendRow
- the last row of data for the cursor, or null
for the last entryendInclusive
- whether or not endRow is inclusive or exclusive
java.io.IOException
public java.lang.Object[] constructIndexRowFromEntry(java.lang.Object... values)
java.lang.IllegalArgumentException
- if the wrong number of values are providedpublic java.lang.Object[] constructIndexRow(java.lang.String colName, java.lang.Object value)
null
if not all columns for this
index were providedpublic java.lang.Object[] constructIndexRow(java.util.Map<java.lang.String,?> row)
null
if not all columns for this
index were providedpublic java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(Index other)
compareTo
in interface java.lang.Comparable<Index>
protected static void writeDefinitions(com.healthmarketscience.jackcess.TableCreator creator, java.nio.ByteBuffer buffer) throws java.io.IOException
buffer
- Buffer to write toindexes
- List of IndexBuilders 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 |