APIdia Launch Partner
Top Description Methods
io.github.spannm.jackcess

public Interface IndexCursor

extends Cursor
Known Direct Implementers
io.github.spannm.jackcess.impl.IndexCursorImpl
Imports
io.github.spannm.jackcess.util.EntryIterableBuilder, java.io.IOException

Cursor backed by an Index with extended traversal options. Table traversal will be in the order defined by the backing index. Lookups which utilize the columns of the index will be fast.

Method Summary

Modifier and TypeMethod and Description
public boolean
currentRowMatchesEntry(Object...
the column values for the index's columns.
entryValues
)

Returns true if the current row matches the given index entries.

public void
findClosestRowByEntry(Object...
the column values for the index's columns.
entryValues
)

Moves to the first row (as defined by the cursor) where the index entries are >= the given values.

public boolean

Returns:

true if a valid row was found with the given values, false if no row was found
findFirstRowByEntry
(Object...
the column values for the index's columns.
entryValues
)

Moves to the first row (as defined by the cursor) where the index entries match the given values.

public Row

Returns:

the matching row or null if a match could not be found.
findRowByEntry
(Object...
the column values for the index's columns.
entryValues
)

Finds the first row (as defined by the cursor) where the index entries match the given values.

public Index
public EntryIterableBuilder
newEntryIterable(Object...
the column values for the index's columns.
entryValues
)

Convenience method for constructing a new EntryIterableBuilder for this cursor.

Inherited from io.github.spannm.jackcess.Cursor:
afterLastbeforeFirstcurrentRowMatchescurrentRowMatchesdeleteCurrentRowfindFirstRowfindFirstRowfindNextRowfindNextRowfindRowgetColumnMatchergetCurrentRowgetCurrentRowgetCurrentRowValuegetErrorHandlergetIdgetNextRowgetNextRowgetPreviousRowgetPreviousRowgetSavepointgetTableisAfterLastisBeforeFirstisCurrentRowDeletediteratormoveNextRowsmovePreviousRowsmoveToNextRowmoveToPreviousRownewIterableresetrestoreSavepointsetColumnMatchersetCurrentRowValuesetErrorHandlerstreamupdateCurrentRowupdateCurrentRowFromMap

Method Detail

currentRowMatchesEntryback to summary
public boolean currentRowMatchesEntry(Object... entryValues) throws IOException

Returns true if the current row matches the given index entries.

Parameters
entryValues:Object[]

the column values for the index's columns.

findClosestRowByEntryback to summary
public void findClosestRowByEntry(Object... entryValues) throws IOException

Moves to the first row (as defined by the cursor) where the index entries are >= the given values. If a an exception is thrown, the cursor is restored to its previous state.

Parameters
entryValues:Object[]

the column values for the index's columns.

findFirstRowByEntryback to summary
public boolean findFirstRowByEntry(Object... entryValues) throws IOException

Moves to the first row (as defined by the cursor) where the index entries match the given values. If a match is not found (or an exception is thrown), the cursor is restored to its previous state.

Warning, this method always starts searching from the beginning of the Table (you cannot use it to find successive matches).

Parameters
entryValues:Object[]

the column values for the index's columns.

Returns:boolean

true if a valid row was found with the given values, false if no row was found

findRowByEntryback to summary
public Row findRowByEntry(Object... entryValues) throws IOException

Finds the first row (as defined by the cursor) where the index entries match the given values. If a match is not found (or an exception is thrown), the cursor is restored to its previous state.

Parameters
entryValues:Object[]

the column values for the index's columns.

Returns:Row

the matching row or null if a match could not be found.

getIndexback to summary
public Index getIndex()
newEntryIterableback to summary
public EntryIterableBuilder newEntryIterable(Object... entryValues)

Convenience method for constructing a new EntryIterableBuilder for this cursor. An EntryIterableBuilder provides a variety of options for more flexible iteration based on a specific index entry.

Parameters
entryValues:Object[]

the column values for the index's columns.