|
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
public abstract class Cursor
Manages iteration for a Table. Different cursors provide different methods of traversing a table. Cursors should be fairly robust in the face of table modification during traversal (although depending on how the table is traversed, row updates may or may not be seen). Multiple cursors may traverse the same table simultaneously.
The Cursor provides a variety of static utility methods to construct cursors with given
characteristics or easily search for specific values. For even friendlier and more flexible
construction, see CursorBuilder
.
Is not thread-safe.
Nested Class Summary | |
---|---|
protected class |
Cursor.BaseIterator
Base implementation of iterator for this cursor, modifiable. |
protected class |
Cursor.DirHandler
Handles moving the cursor in a given direction. |
static class |
Cursor.Id
Identifier for a cursor. |
static class |
Cursor.Position
Value object which maintains the current position of the cursor. |
static class |
Cursor.Savepoint
Value object which represents a complete save state of the cursor. |
Field Summary | |
---|---|
protected ColumnMatcher |
_columnMatcher
ColumnMatcher to be used when matching column values |
protected Cursor.Position |
_curPos
the current row |
protected Cursor.Position |
_prevPos
the previous row |
static boolean |
MOVE_FORWARD
boolean value indicating forward movement |
static boolean |
MOVE_REVERSE
boolean value indicating reverse movement |
Constructor Summary | |
---|---|
protected |
Cursor(Cursor.Id id,
Table table,
Cursor.Position firstPos,
Cursor.Position lastPos)
|
Method Summary | |
---|---|
void |
afterLast()
Resets this cursor for reverse traversal (sets cursor to after the last row). |
void |
beforeFirst()
Resets this cursor for forward traversal (sets cursor to before the first row). |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
columnMatchIterable(java.util.Collection<java.lang.String> columnNames,
Column columnPattern,
java.lang.Object valuePattern)
Returns an Iterable whose iterator() method returns the result of a call to columnMatchIterator(Collection,Column,Object) |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
columnMatchIterable(Column columnPattern,
java.lang.Object valuePattern)
Returns an Iterable whose iterator() method returns the result of a call to columnMatchIterable(Column,Object) |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
columnMatchIterator(java.util.Collection<java.lang.String> columnNames,
Column columnPattern,
java.lang.Object valuePattern)
Calls beforeFirst on this table and returns a modifiable Iterator which will
iterate through all the rows of this table which match the given column pattern, returning
only the given columns. |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
columnMatchIterator(Column columnPattern,
java.lang.Object valuePattern)
Calls beforeFirst on this cursor and returns a modifiable Iterator which will
iterate through all the rows of this table which match the given column pattern. |
static Cursor |
createCursor(Table table)
Creates a normal, un-indexed cursor for the given table. |
static Cursor |
createIndexCursor(Table table,
Index index)
Creates an indexed cursor for the given table. |
static Cursor |
createIndexCursor(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 Cursor |
createIndexCursor(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 |
currentRowMatches(Column columnPattern,
java.lang.Object valuePattern)
Returns true if the current row matches the given pattern. |
boolean |
currentRowMatches(java.util.Map<java.lang.String,?> rowPattern)
Returns true if the current row matches the given pattern. |
void |
deleteCurrentRow()
Delete the current row. |
protected abstract 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 . |
boolean |
findFirstRow(Column columnPattern,
java.lang.Object valuePattern)
Moves to the first row (as defined by the cursor) where the given column has the given value. |
boolean |
findFirstRow(java.util.Map<java.lang.String,?> rowPattern)
Moves to the first row (as defined by the cursor) where the given columns have the given values. |
boolean |
findNextRow(Column columnPattern,
java.lang.Object valuePattern)
Moves to the next row (as defined by the cursor) where the given column has the given value. |
boolean |
findNextRow(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. |
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 |
findRow(Column columnPattern,
java.lang.Object valuePattern)
Deprecated. renamed to findFirstRow(Column,Object) to be more clear |
boolean |
findRow(java.util.Map<java.lang.String,?> rowPattern)
Deprecated. renamed to findFirstRow(Map) to be more clear |
static java.util.Map<java.lang.String,java.lang.Object> |
findRow(Table table,
Index index,
java.util.Map<java.lang.String,?> rowPattern)
Convenience method for finding a specific row in an indexed table which matches a given row "pattern". |
static java.util.Map<java.lang.String,java.lang.Object> |
findRow(Table table,
java.util.Map<java.lang.String,?> rowPattern)
Convenience method for finding a specific row in a table which matches a given row "pattern". |
static java.lang.Object |
findValue(Table table,
Column column,
Column columnPattern,
java.lang.Object valuePattern)
Convenience method for finding a specific row in a table which matches a given row "pattern". |
static java.lang.Object |
findValue(Table table,
Index index,
Column column,
Column columnPattern,
java.lang.Object valuePattern)
Convenience method for finding a specific row in a table which matches a given row "pattern". |
ColumnMatcher |
getColumnMatcher()
Returns the currently configured ColumnMatcher, always non- null . |
java.util.Map<java.lang.String,java.lang.Object> |
getCurrentRow()
Returns the current row in this cursor (Column name -> Column value). |
java.util.Map<java.lang.String,java.lang.Object> |
getCurrentRow(java.util.Collection<java.lang.String> columnNames)
Returns the current row in this cursor (Column name -> Column value). |
java.lang.Object |
getCurrentRowValue(Column column)
Returns the given column from the current row. |
protected ColumnMatcher |
getDefaultColumnMatcher()
Returns the default ColumnMatcher for this Cursor. |
protected abstract Cursor.DirHandler |
getDirHandler(boolean moveForward)
Returns the DirHandler for the given movement direction. |
ErrorHandler |
getErrorHandler()
Gets the currently configured ErrorHandler (always non- null ). |
protected Cursor.Position |
getFirstPosition()
Returns the first row id (exclusive) as defined by this cursor. |
JetFormat |
getFormat()
|
Cursor.Id |
getId()
|
protected Cursor.Position |
getLastPosition()
Returns the last row id (exclusive) as defined by this cursor. |
java.util.Map<java.lang.String,java.lang.Object> |
getNextRow()
Moves to the next row in the table and returns it. |
java.util.Map<java.lang.String,java.lang.Object> |
getNextRow(java.util.Collection<java.lang.String> columnNames)
Moves to the next row in the table and returns it. |
PageChannel |
getPageChannel()
|
java.util.Map<java.lang.String,java.lang.Object> |
getPreviousRow()
Moves to the previous row in the table and returns it. |
java.util.Map<java.lang.String,java.lang.Object> |
getPreviousRow(java.util.Collection<java.lang.String> columnNames)
Moves to the previous row in the table and returns it. |
Cursor.Savepoint |
getSavepoint()
Returns the current state of the cursor which can be restored at a future point in time by a call to restoreSavepoint(com.healthmarketscience.jackcess.Cursor.Savepoint) . |
Table |
getTable()
|
boolean |
isAfterLast()
Returns true if the cursor is currently positioned after the last row, false
otherwise. |
boolean |
isBeforeFirst()
Returns true if the cursor is currently positioned before the first row,
false otherwise. |
boolean |
isCurrentRowDeleted()
Returns true if the row at which the cursor is currently positioned is deleted,
false otherwise (including invalid rows). |
protected boolean |
isUpToDate()
Returns true if this cursor is up-to-date with respect to the relevant table and
related table objects, false otherwise. |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
iterable(java.util.Collection<java.lang.String> columnNames)
Returns an Iterable whose iterator() method returns the result of a call to iterator(Collection) |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
iterator()
Calls beforeFirst on this cursor and returns a modifiable Iterator which will
iterate through all the rows of this table. |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
iterator(java.util.Collection<java.lang.String> columnNames)
Calls beforeFirst on this table and returns a modifiable Iterator which will
iterate through all the rows of this table, returning only the given columns. |
int |
moveNextRows(int numRows)
Moves forward as many rows as possible up to the given number of rows. |
int |
movePreviousRows(int numRows)
Moves backward as many rows as possible up to the given number of rows. |
boolean |
moveToNextRow()
Moves to the next row as defined by this cursor. |
boolean |
moveToPreviousRow()
Moves to the previous row as defined by this cursor. |
void |
reset()
Resets this cursor for forward traversal. |
protected void |
reset(boolean moveForward)
Resets this cursor for traversing the given direction. |
protected void |
restorePosition(Cursor.Position curPos)
Restores a current position for the cursor (current position becomes previous position). |
protected void |
restorePosition(Cursor.Position curPos,
Cursor.Position prevPos)
Restores a current and previous position for the cursor if the given positions are different from the current positions. |
protected void |
restorePositionImpl(Cursor.Position curPos,
Cursor.Position prevPos)
Restores a current and previous position for the cursor. |
void |
restoreSavepoint(Cursor.Savepoint savepoint)
Moves the cursor to a savepoint previously returned from getSavepoint() . |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
reverseIterable()
Returns an Iterable whose iterator() method calls afterLast on this cursor and
returns a modifiable Iterator which will iterate through all the rows of this table in
reverse order. |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
reverseIterable(java.util.Collection<java.lang.String> columnNames)
Returns an Iterable whose iterator() method calls afterLast on this table and
returns a modifiable Iterator which will iterate through all the rows of this table in
reverse order, returning only the given columns. |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
rowMatchIterable(java.util.Collection<java.lang.String> columnNames,
java.util.Map<java.lang.String,?> rowPattern)
Returns an Iterable whose iterator() method returns the result of a call to rowMatchIterator(Collection,Map) |
java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> |
rowMatchIterable(java.util.Map<java.lang.String,?> rowPattern)
Returns an Iterable whose iterator() method returns the result of a call to rowMatchIterator(Map) |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
rowMatchIterator(java.util.Collection<java.lang.String> columnNames,
java.util.Map<java.lang.String,?> rowPattern)
Calls beforeFirst on this table and returns a modifiable Iterator which will
iterate through all the rows of this table which match the given row pattern, returning only
the given columns. |
java.util.Iterator<java.util.Map<java.lang.String,java.lang.Object>> |
rowMatchIterator(java.util.Map<java.lang.String,?> rowPattern)
Calls beforeFirst on this cursor and returns a modifiable Iterator which will
iterate through all the rows of this table which match the given row pattern. |
void |
setColumnMatcher(ColumnMatcher columnMatcher)
Sets a new ColumnMatcher. |
void |
setCurrentRowValue(Column column,
java.lang.Object value)
Updates a single value in the current row. |
void |
setErrorHandler(ErrorHandler newErrorHandler)
Sets a new ErrorHandler. |
java.lang.String |
toString()
|
void |
updateCurrentRow(java.lang.Object... row)
Update the current row. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean MOVE_FORWARD
public static final boolean MOVE_REVERSE
protected Cursor.Position _prevPos
protected Cursor.Position _curPos
protected ColumnMatcher _columnMatcher
Constructor Detail |
---|
protected Cursor(Cursor.Id id, Table table, Cursor.Position firstPos, Cursor.Position lastPos)
Method Detail |
---|
public static Cursor createCursor(Table table)
table
- the table over which this cursor will traversepublic static Cursor createIndexCursor(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 Cursor createIndexCursor(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 Cursor createIndexCursor(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 static java.util.Map<java.lang.String,java.lang.Object> findRow(Table table, java.util.Map<java.lang.String,?> rowPattern) throws java.io.IOException
findFirstRow(Map)
for details on the rowPattern.
Warning, this method always starts searching from the beginning of the Table (you cannot use it to find successive matches).
table
- the table to searchrowPattern
- pattern to be used to find the row
null
if a match could not be found.
java.io.IOException
public static java.lang.Object findValue(Table table, Column column, Column columnPattern, java.lang.Object valuePattern) throws java.io.IOException
findFirstRow(Column,Object)
for details on the pattern.
Note, a null
result value is ambiguous in that it could imply no match or a matching
row with null
for the desired value. If distinguishing this situation is important,
you will need to use a Cursor directly instead of this convenience method.
table
- the table to searchcolumn
- column whose value should be returnedcolumnPattern
- column being matched by the valuePatternvaluePattern
- value from the columnPattern which will match the desired row
null
if a match could not be found.
java.io.IOException
public static java.util.Map<java.lang.String,java.lang.Object> findRow(Table table, Index index, java.util.Map<java.lang.String,?> rowPattern) throws java.io.IOException
findFirstRow(Map)
for details on the rowPattern.
Warning, this method always starts searching from the beginning of the Table (you cannot use it to find successive matches).
table
- the table to searchindex
- index to assist the searchrowPattern
- pattern to be used to find the row
null
if a match could not be found.
java.io.IOException
public static java.lang.Object findValue(Table table, Index index, Column column, Column columnPattern, java.lang.Object valuePattern) throws java.io.IOException
findFirstRow(Column,Object)
for details on the pattern.
Note, a null
result value is ambiguous in that it could imply no match or a matching
row with null
for the desired value. If distinguishing this situation is important,
you will need to use a Cursor directly instead of this convenience method.
table
- the table to searchindex
- index to assist the searchcolumn
- column whose value should be returnedcolumnPattern
- column being matched by the valuePatternvaluePattern
- value from the columnPattern which will match the desired row
null
if a match could not be found.
java.io.IOException
public Cursor.Id getId()
public Table getTable()
public JetFormat getFormat()
public PageChannel getPageChannel()
public ErrorHandler getErrorHandler()
null
). This will be used to
handle all errors.
public void setErrorHandler(ErrorHandler newErrorHandler)
null
, resets to using the ErrorHandler configured at the
Table level.
public ColumnMatcher getColumnMatcher()
null
.
public void setColumnMatcher(ColumnMatcher columnMatcher)
null
, resets to using the default matcher,
SimpleColumnMatcher.INSTANCE
.
protected ColumnMatcher getDefaultColumnMatcher()
public Cursor.Savepoint getSavepoint()
restoreSavepoint(com.healthmarketscience.jackcess.Cursor.Savepoint)
.
Savepoints may be used across different cursor instances for the same table, but they must
have the same Cursor.Id
.
public void restoreSavepoint(Cursor.Savepoint savepoint) throws java.io.IOException
getSavepoint()
.
java.lang.IllegalArgumentException
- if the given savepoint does not have a cursorId equal to this cursor's id
java.io.IOException
protected Cursor.Position getFirstPosition()
protected Cursor.Position getLastPosition()
public void reset()
beforeFirst()
.
public void beforeFirst()
public void afterLast()
public boolean isBeforeFirst() throws java.io.IOException
true
if the cursor is currently positioned before the first row,
false
otherwise.
java.io.IOException
public boolean isAfterLast() throws java.io.IOException
true
if the cursor is currently positioned after the last row, false
otherwise.
java.io.IOException
public boolean isCurrentRowDeleted() throws java.io.IOException
true
if the row at which the cursor is currently positioned is deleted,
false
otherwise (including invalid rows).
java.io.IOException
protected void reset(boolean moveForward)
public java.lang.Iterable<java.util.Map<java.lang.String,java.lang.Object>> reverseIterable()
afterLast
on this cursor and
returns a modifiable Iterator which will iterate through all the rows of this table in
reverse order. Use of the Iterator follows the same restrictions as a call to
getPreviousRow
.
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>> reverseIterable(java.util.Collection<java.lang.String> columnNames)
afterLast
on this table and
returns a modifiable Iterator which will iterate through all the rows of this table in
reverse order, returning only the given columns. Use of the Iterator follows the same
restrictions as a call to getPreviousRow
.
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>> iterator()
beforeFirst
on this cursor and returns a modifiable Iterator which will
iterate through all the rows of this table. Use of the Iterator follows the same restrictions
as a call to getNextRow
.
iterator
in interface java.lang.Iterable<java.util.Map<java.lang.String,java.lang.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>> iterable(java.util.Collection<java.lang.String> columnNames)
iterator(Collection)
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>> iterator(java.util.Collection<java.lang.String> columnNames)
beforeFirst
on this table and returns a modifiable Iterator which will
iterate through all the rows of this table, returning only the given columns. Use of the
Iterator follows the same restrictions as a call to getNextRow
.
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>> columnMatchIterable(Column columnPattern, java.lang.Object valuePattern)
columnMatchIterable(Column,Object)
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>> columnMatchIterator(Column columnPattern, java.lang.Object valuePattern)
beforeFirst
on this cursor and returns a modifiable Iterator which will
iterate through all the rows of this table which match the given column pattern. Use of the
Iterator follows the same restrictions as a call to getNextRow
. See
findFirstRow(Column,Object)
for details on the columnPattern.
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>> columnMatchIterable(java.util.Collection<java.lang.String> columnNames, Column columnPattern, java.lang.Object valuePattern)
columnMatchIterator(Collection,Column,Object)
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>> columnMatchIterator(java.util.Collection<java.lang.String> columnNames, Column columnPattern, java.lang.Object valuePattern)
beforeFirst
on this table and returns a modifiable Iterator which will
iterate through all the rows of this table which match the given column pattern, returning
only the given columns. Use of the Iterator follows the same restrictions as a call to
getNextRow
. See findFirstRow(Column,Object)
for details on the
columnPattern.
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>> rowMatchIterable(java.util.Map<java.lang.String,?> rowPattern)
rowMatchIterator(Map)
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>> rowMatchIterator(java.util.Map<java.lang.String,?> rowPattern)
beforeFirst
on this cursor and returns a modifiable Iterator which will
iterate through all the rows of this table which match the given row pattern. Use of the
Iterator follows the same restrictions as a call to getNextRow
. See
findFirstRow(Map)
for details on the rowPattern.
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>> rowMatchIterable(java.util.Collection<java.lang.String> columnNames, java.util.Map<java.lang.String,?> rowPattern)
rowMatchIterator(Collection,Map)
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>> rowMatchIterator(java.util.Collection<java.lang.String> columnNames, java.util.Map<java.lang.String,?> rowPattern)
beforeFirst
on this table and returns a modifiable Iterator which will
iterate through all the rows of this table which match the given row pattern, returning only
the given columns. Use of the Iterator follows the same restrictions as a call to
getNextRow
. See findFirstRow(Map)
for details on the rowPattern.
java.lang.IllegalStateException
- if an IOException is thrown by one of the operations, the actual exception will
be contained withinpublic void deleteCurrentRow() throws java.io.IOException
java.lang.IllegalStateException
- if the current row is not valid (at beginning or end of table), or already
deleted.
java.io.IOException
public void updateCurrentRow(java.lang.Object... row) throws java.io.IOException
java.lang.IllegalStateException
- if the current row is not valid (at beginning or end of table), or deleted.
java.io.IOException
public java.util.Map<java.lang.String,java.lang.Object> getNextRow() throws java.io.IOException
null
if no next
row is found
java.io.IOException
public java.util.Map<java.lang.String,java.lang.Object> getNextRow(java.util.Collection<java.lang.String> columnNames) throws java.io.IOException
columnNames
- Only column names in this collection will be returned
null
if no next
row is found
java.io.IOException
public java.util.Map<java.lang.String,java.lang.Object> getPreviousRow() throws java.io.IOException
null
if no
previous row is found
java.io.IOException
public java.util.Map<java.lang.String,java.lang.Object> getPreviousRow(java.util.Collection<java.lang.String> columnNames) throws java.io.IOException
columnNames
- Only column names in this collection will be returned
null
if no
previous row is found
java.io.IOException
public boolean moveToNextRow() throws java.io.IOException
true
if a valid next row was found, false
otherwise
java.io.IOException
public boolean moveToPreviousRow() throws java.io.IOException
true
if a valid previous row was found, false
otherwise
java.io.IOException
protected void restorePosition(Cursor.Position curPos) throws java.io.IOException
java.io.IOException
protected final void restorePosition(Cursor.Position curPos, Cursor.Position prevPos) throws java.io.IOException
java.io.IOException
protected void restorePositionImpl(Cursor.Position curPos, Cursor.Position prevPos) throws java.io.IOException
java.io.IOException
@Deprecated public boolean findRow(Column columnPattern, java.lang.Object valuePattern) throws java.io.IOException
findFirstRow(Column,Object)
to be more clear
java.io.IOException
public boolean findFirstRow(Column columnPattern, java.lang.Object valuePattern) throws java.io.IOException
Warning, this method always starts searching from the beginning of the Table (you cannot use it to find successive matches).
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
public boolean findNextRow(Column columnPattern, java.lang.Object valuePattern) throws java.io.IOException
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
@Deprecated public boolean findRow(java.util.Map<java.lang.String,?> rowPattern) throws java.io.IOException
findFirstRow(Map)
to be more clear
java.io.IOException
public boolean findFirstRow(java.util.Map<java.lang.String,?> rowPattern) throws java.io.IOException
Warning, this method always starts searching from the beginning of the Table (you cannot use it to find successive matches).
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
public boolean findNextRow(java.util.Map<java.lang.String,?> rowPattern) throws java.io.IOException
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
public boolean currentRowMatches(Column columnPattern, java.lang.Object valuePattern) throws java.io.IOException
true
if the current row matches the given pattern.
columnPattern
- column from the table for this cursor which is being matched by the valuePatternvaluePattern
- value which is tested for equality with the corresponding value in the current row
java.io.IOException
public boolean currentRowMatches(java.util.Map<java.lang.String,?> rowPattern) throws java.io.IOException
true
if the current row matches the given pattern.
rowPattern
- column names and values which must be equal to the corresponding values in the
current row
java.io.IOException
protected boolean findNextRowImpl(Column columnPattern, java.lang.Object valuePattern) throws java.io.IOException
Default implementation scans the table from beginning to end.
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 findNextRowImpl(java.util.Map<java.lang.String,?> rowPattern) throws java.io.IOException
Default implementation scans the table from beginning to end.
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
public int moveNextRows(int numRows) throws java.io.IOException
java.io.IOException
public int movePreviousRows(int numRows) throws java.io.IOException
java.io.IOException
public java.util.Map<java.lang.String,java.lang.Object> getCurrentRow() throws java.io.IOException
java.io.IOException
public java.util.Map<java.lang.String,java.lang.Object> getCurrentRow(java.util.Collection<java.lang.String> columnNames) throws java.io.IOException
columnNames
- Only column names in this collection will be returned
java.io.IOException
public java.lang.Object getCurrentRowValue(Column column) throws java.io.IOException
java.io.IOException
public void setCurrentRowValue(Column column, java.lang.Object value) throws java.io.IOException
java.lang.IllegalStateException
- if the current row is not valid (at beginning or end of table), or deleted.
java.io.IOException
protected boolean isUpToDate()
true
if this cursor is up-to-date with respect to the relevant table and
related table objects, false
otherwise.
public java.lang.String toString()
toString
in class java.lang.Object
protected abstract Cursor.Position findAnotherPosition(Table.RowState rowState, Cursor.Position curPos, boolean moveForward) throws java.io.IOException
false
. If there
are no more rows, the returned rowId should equal the value returned by
getLastPosition()
if moving forward and getFirstPosition()
if moving backward.
java.io.IOException
protected abstract Cursor.DirHandler getDirHandler(boolean moveForward)
|
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 |