|
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.Cursor
com.healthmarketscience.jackcess.IndexCursor
public class IndexCursor
Cursor backed by an index with extended traversal options.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.healthmarketscience.jackcess.Cursor |
---|
Cursor.BaseIterator, Cursor.DirHandler, Cursor.Id, Cursor.Position, Cursor.Savepoint |
Field Summary |
---|
Fields inherited from class com.healthmarketscience.jackcess.Cursor |
---|
_columnMatcher, _curPos, _prevPos, MOVE_FORWARD, MOVE_REVERSE |
Method Summary | |
---|---|
static IndexCursor |
createCursor(Table table,
Index index)
Creates an indexed cursor for the given table. |
static IndexCursor |
createCursor(Table table,
Index index,
java.lang.Object[] startRow,
boolean startInclusive,
java.lang.Object[] endRow,
boolean endInclusive)
Creates an indexed cursor for the given table, narrowed to the given range. |
static IndexCursor |
createCursor(Table table,
Index index,
java.lang.Object[] startRow,
java.lang.Object[] endRow)
Creates an indexed cursor for the given table, narrowed to the given range. |
boolean |
currentRowMatchesEntry(java.lang.Object... entryValues)
Returns true if the current row matches the given index entries. |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
entryIterable(java.util.Collection<java.lang.String> columnNames,
java.lang.Object... entryValues)
Returns an Iterable whose iterator() method returns the result of a call to entryIterator(Collection,Object...) |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
entryIterable(java.lang.Object... entryValues)
Returns an Iterable whose iterator() method returns the result of a call to entryIterator(Object...) |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
entryIterator(java.util.Collection<java.lang.String> columnNames,
java.lang.Object... entryValues)
Returns a modifiable Iterator which will iterate through all the rows of this table which match the given index entries, returning only the given columns. |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
entryIterator(java.lang.Object... entryValues)
Returns a modifiable Iterator which will iterate through all the rows of this table which match the given index entries. |
protected Cursor.Position |
findAnotherPosition(Table.RowState rowState,
Cursor.Position curPos,
boolean moveForward)
Finds the next non-deleted row after the given row (as defined by this cursor) and returns the id of the row, where "next" may be backwards if moveForward is false . |
void |
findClosestRowByEntry(java.lang.Object... entryValues)
Moves to the first row (as defined by the cursor) where the index entries are >= the given values. |
boolean |
findFirstRowByEntry(java.lang.Object... entryValues)
Moves to the first row (as defined by the cursor) where the index entries match the given values. |
protected boolean |
findFirstRowByEntryImpl(java.lang.Object[] rowValues,
boolean requireMatch)
Moves to the first row (as defined by the cursor) where the index entries match the given values. |
protected boolean |
findNextRowImpl(Column columnPattern,
java.lang.Object valuePattern)
Moves to the next row (as defined by the cursor) where the given column has the given value. |
protected boolean |
findNextRowImpl(java.util.Map<java.lang.String,?> rowPattern)
Moves to the next row (as defined by the cursor) where the given columns have the given values. |
boolean |
findRowByEntry(java.lang.Object... entryValues)
Deprecated. renamed to findFirstRowByEntry(Object...) to be more clear |
protected ColumnMatcher |
getDefaultColumnMatcher()
Returns the default ColumnMatcher for this Cursor. |
protected com.healthmarketscience.jackcess.IndexCursor.IndexDirHandler |
getDirHandler(boolean moveForward)
Returns the DirHandler for the given movement direction. |
Index |
getIndex()
|
protected boolean |
isUpToDate()
Returns true if this cursor is up-to-date with respect to the relevant table and
related table objects, false otherwise. |
protected void |
reset(boolean moveForward)
Resets this cursor for traversing the given direction. |
protected void |
restorePositionImpl(Cursor.Position curPos,
Cursor.Position prevPos)
Restores a current and previous position for the cursor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static IndexCursor createCursor(Table table, Index index) throws java.io.IOException
Note, index based table traversal may not include all rows, as certain types of indexes do
not include all entries (namely, some indexes ignore null entries, see
Index.shouldIgnoreNulls()
).
table
- the table over which this cursor will traverseindex
- index for the table which will define traversal order as well as enhance certain
lookups
java.io.IOException
public static IndexCursor createCursor(Table table, Index index, java.lang.Object[] startRow, java.lang.Object[] endRow) throws java.io.IOException
Note, index based table traversal may not include all rows, as certain types of indexes do
not include all entries (namely, some indexes ignore null entries, see
Index.shouldIgnoreNulls()
).
table
- the table over which this cursor will traverseindex
- index for the table which will define traversal order as well as enhance certain
lookupsstartRow
- the first row of data for the cursor (inclusive), or null
for the first
entryendRow
- the last row of data for the cursor (inclusive), or null
for the last
entry
java.io.IOException
public static IndexCursor createCursor(Table table, Index index, java.lang.Object[] startRow, boolean startInclusive, java.lang.Object[] endRow, boolean endInclusive) throws java.io.IOException
Note, index based table traversal may not include all rows, as certain types of indexes do
not include all entries (namely, some indexes ignore null entries, see
Index.shouldIgnoreNulls()
).
table
- the table over which this cursor will traverseindex
- index for the table which will define traversal order as well as enhance certain
lookupsstartRow
- 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 Index getIndex()
@Deprecated public boolean findRowByEntry(java.lang.Object... entryValues) throws java.io.IOException
findFirstRowByEntry(Object...)
to be more clear
java.io.IOException
public boolean findFirstRowByEntry(java.lang.Object... entryValues) throws java.io.IOException
Warning, this method always starts searching from the beginning of the Table (you cannot use it to find successive matches).
entryValues
- the column values for the index's columns.
true
if a valid row was found with the given values, false
if no row
was found
java.io.IOException
public void findClosestRowByEntry(java.lang.Object... entryValues) throws java.io.IOException
entryValues
- the column values for the index's columns.
java.io.IOException
public boolean currentRowMatchesEntry(java.lang.Object... entryValues) throws java.io.IOException
true
if the current row matches the given index entries.
entryValues
- the column values for the index's columns.
java.io.IOException
public java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> entryIterator(java.lang.Object... entryValues)
java.lang.IllegalStateException
- if an IOException is thrown by one of the operations, the actual exception will
be contained withinpublic java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> entryIterator(java.util.Collection<java.lang.String> columnNames, java.lang.Object... entryValues)
java.lang.IllegalStateException
- if an IOException is thrown by one of the operations, the actual exception will
be contained withinpublic java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> entryIterable(java.lang.Object... entryValues)
entryIterator(Object...)
java.lang.IllegalStateException
- if an IOException is thrown by one of the operations, the actual exception will
be contained withinpublic java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> entryIterable(java.util.Collection<java.lang.String> columnNames, java.lang.Object... entryValues)
entryIterator(Collection,Object...)
java.lang.IllegalStateException
- if an IOException is thrown by one of the operations, the actual exception will
be contained withinprotected com.healthmarketscience.jackcess.IndexCursor.IndexDirHandler getDirHandler(boolean moveForward)
Cursor
getDirHandler
in class Cursor
protected boolean isUpToDate()
Cursor
true
if this cursor is up-to-date with respect to the relevant table and
related table objects, false
otherwise.
isUpToDate
in class Cursor
protected void reset(boolean moveForward)
Cursor
reset
in class Cursor
protected void restorePositionImpl(Cursor.Position curPos, Cursor.Position prevPos) throws java.io.IOException
Cursor
restorePositionImpl
in class Cursor
java.io.IOException
protected boolean findNextRowImpl(Column columnPattern, java.lang.Object valuePattern) throws java.io.IOException
Cursor
Default implementation scans the table from beginning to end.
findNextRowImpl
in class Cursor
columnPattern
- column from the table for this cursor which is being matched by the valuePatternvaluePattern
- value which is equal to the corresponding value in the matched row
true
if a valid row was found with the given value, false
if no row
was found
java.io.IOException
protected boolean findFirstRowByEntryImpl(java.lang.Object[] rowValues, boolean requireMatch) throws java.io.IOException
rowValues
- the column values built from the index column valuesrequireMatch
- whether or not an exact match is found
true
if a valid row was found with the given values, false
if no row
was found
java.io.IOException
protected boolean findNextRowImpl(java.util.Map<java.lang.String,?> rowPattern) throws java.io.IOException
Cursor
Default implementation scans the table from beginning to end.
findNextRowImpl
in class Cursor
rowPattern
- column names and values which must be equal to the corresponding values in the
matched row
true
if a valid row was found with the given values, false
if no row
was found
java.io.IOException
protected Cursor.Position findAnotherPosition(Table.RowState rowState, Cursor.Position curPos, boolean moveForward) throws java.io.IOException
Cursor
false
. If there
are no more rows, the returned rowId should equal the value returned by
Cursor.getLastPosition()
if moving forward and Cursor.getFirstPosition()
if moving backward.
findAnotherPosition
in class Cursor
java.io.IOException
protected ColumnMatcher getDefaultColumnMatcher()
Cursor
getDefaultColumnMatcher
in class Cursor
|
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 |