|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.healthmarketscience.jackcess.impl.IndexImpl
public class IndexImpl
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 |
IndexImpl.ForeignKeyReference
Information about a foreign key reference defined in an index (when referential integrity should be enforced). |
| Nested classes/interfaces inherited from interface com.healthmarketscience.jackcess.Index |
|---|
Index.Column |
| Field Summary | |
|---|---|
static byte |
FOREIGN_KEY_INDEX_TYPE
index type for foreign key indexes |
static byte |
PRIMARY_KEY_INDEX_TYPE
index type for primary key indexes |
| Method Summary | |
|---|---|
int |
compareTo(IndexImpl other)
|
Object[] |
constructIndexRow(Map<String,?> row)
Constructs an array of values appropriate for this index from the given column values. |
Object[] |
constructIndexRow(String colName,
Object value)
Constructs an array of values appropriate for this index from the given column value. |
Object[] |
constructIndexRowFromEntry(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(Object[] startRow,
boolean startInclusive,
Object[] endRow,
boolean endInclusive)
Gets a new cursor for this index, narrowed to the range defined by the given startRow and endRow. |
List<IndexData.ColumnDescriptor> |
getColumns()
|
JetFormat |
getFormat()
|
IndexData |
getIndexData()
|
byte |
getIndexFlags()
|
int |
getIndexNumber()
|
String |
getName()
|
PageChannel |
getPageChannel()
|
IndexImpl.ForeignKeyReference |
getReference()
|
IndexImpl |
getReferencedIndex()
|
TableImpl |
getTable()
|
int |
getUniqueEntryCount()
|
int |
getUniqueEntryCountOffset()
|
void |
initialize()
Forces initialization of this index (actual parsing of index pages). |
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. |
CursorBuilder |
newCursor()
Convenience method for constructing a new CursorBuilder for this Index. |
boolean |
shouldIgnoreNulls()
Whether or not null values are actually recorded in the index. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final byte PRIMARY_KEY_INDEX_TYPE
public static final byte FOREIGN_KEY_INDEX_TYPE
| Method Detail |
|---|
public IndexData getIndexData()
public TableImpl getTable()
getTable in interface Indexpublic JetFormat getFormat()
public PageChannel getPageChannel()
public int getIndexNumber()
public byte getIndexFlags()
public int getUniqueEntryCount()
public int getUniqueEntryCountOffset()
public String getName()
getName in interface Indexpublic boolean isPrimaryKey()
isPrimaryKey in interface Indexpublic boolean isForeignKey()
isForeignKey in interface Indexpublic IndexImpl.ForeignKeyReference getReference()
public IndexImpl getReferencedIndex()
throws IOException
getReferencedIndex in interface Indexnull.
IOExceptionpublic boolean shouldIgnoreNulls()
Indexnull values are actually recorded in the index.
shouldIgnoreNulls in interface Indexpublic boolean isUnique()
IndexSome notes about uniqueness:
null entries
invalid for a unique index
isUnique in interface Indexpublic List<IndexData.ColumnDescriptor> getColumns()
getColumns in interface Indexpublic CursorBuilder newCursor()
Index
newCursor in interface Indexpublic boolean isInitialized()
public void initialize()
throws IOException
IOException
public IndexData.EntryCursor cursor()
throws IOException
Forces index initialization.
IOException
public IndexData.EntryCursor cursor(Object[] startRow,
boolean startInclusive,
Object[] endRow,
boolean endInclusive)
throws 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
IOExceptionpublic Object[] constructIndexRowFromEntry(Object... values)
IllegalArgumentException - if the wrong number of values are
provided
public Object[] constructIndexRow(String colName,
Object value)
null if not all
columns for this index were providedpublic Object[] constructIndexRow(Map<String,?> row)
null if not all
columns for this index were providedpublic String toString()
toString in class Objectpublic int compareTo(IndexImpl other)
compareTo in interface Comparable<IndexImpl>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||