|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.healthmarketscience.jackcess.Index
public abstract class Index
Access table index
Nested Class Summary | |
---|---|
static class |
Index.ColumnDescriptor
Information about the columns in an index. |
static class |
Index.Entry
A single leaf entry in an index (points to a single row) |
class |
Index.EntryCursor
Utility class to traverse the entries in the Index. |
static class |
Index.EntryType
type attributes for Entries which simplify comparisons |
Field Summary | |
---|---|
static Index.Entry |
FIRST_ENTRY
special entry which is less than any other entry |
static Index.Entry |
LAST_ENTRY
special entry which is greater than any other entry |
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,java.lang.Object> 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. |
Index.EntryCursor |
cursor()
Gets a new cursor for this index. |
Index.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<Index.ColumnDescriptor> |
getColumns()
Returns the Columns for this index (unmodifiable) |
JetFormat |
getFormat()
|
byte |
getIndexFlags()
|
int |
getIndexNumber()
|
java.lang.String |
getName()
|
PageChannel |
getPageChannel()
|
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 |
read(java.nio.ByteBuffer tableBuffer,
java.util.List<Column> availableColumns)
Read the index info from a tableBuffer |
void |
setIndexNumber(int indexNumber)
|
void |
setIndexType(byte indexType)
|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Index.Entry FIRST_ENTRY
public static final Index.Entry LAST_ENTRY
Method Detail |
---|
public Table getTable()
public JetFormat getFormat()
public PageChannel getPageChannel()
public void setIndexNumber(int indexNumber)
public int getIndexNumber()
public void setIndexType(byte indexType)
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 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<Index.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 read(java.nio.ByteBuffer tableBuffer, java.util.List<Column> availableColumns) throws java.io.IOException
tableBuffer
- table definition buffer to read from initial infoavailableColumns
- Columns that this index may use
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 Index.EntryCursor cursor() throws java.io.IOException
Forces index initialization.
java.io.IOException
public Index.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,java.lang.Object> 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>
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |