Class SqlJetTableDataCursor
java.lang.Object
org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
org.tmatesoft.sqljet.core.internal.table.SqlJetRowNumCursor
org.tmatesoft.sqljet.core.internal.table.SqlJetTableDataCursor
- All Implemented Interfaces:
ISqlJetCursor
- Direct Known Subclasses:
SqlJetIndexOrderCursor
Implementation of cursor which allow access to all table's rows.
- Author:
- TMate Software Ltd., Sergey Scherbina (sergey.scherbina@gmail.com)
-
Field Summary
Fields inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
btreeTable, db -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes the current record.byte[]getBlobAsArray(String fieldName) Returns specified field's value as BLOB.getBlobAsStream(String fieldName) Returns specified field's value as BLOB.booleangetBoolean(String fieldName) Returns specified field's value as boolean.protected ISqlJetBtreeDataTablegetFieldType(String fieldName) Returns field type.doubleReturns specified field's value as float.longgetInteger(String fieldName) Returns specified field's value as integer.longgetRowId()Gets row Id of the current record.Object[]Returns all field values of current row.Returns specified field's value as String.Returns value of the field with the specified name in the current row.booleangoTo(long rowId) Goes to the record with the specified row Id.booleanTests field value for null.voidUpdates the current record.voidupdateByFieldNames(Map<String, Object> values) Updates the current record.voidupdateByFieldNamesOr(SqlJetConflictAction onConflict, Map<String, Object> values) Updates the current record.voidupdateOr(SqlJetConflictAction onConflict, Object... values) Updates the current record.longupdateWithRowId(long rowId, Object... values) Updates rowId and values in the current record.longupdateWithRowIdOr(SqlJetConflictAction onConflict, long rowId, Object... values) Updates rowId and values in the current record.Methods inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetRowNumCursor
computeRows, eof, first, firstRowNum, getLimit, getRowCount, getRowIndex, goToRow, last, lastRowNum, next, nextRowNum, previous, previousRowNum, setLimitMethods inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
close, getBlobAsArray, getBlobAsStream, getBoolean, getFieldsCount, getFieldType, getFloat, getInteger, getString, getValue, isNull, reverse
-
Constructor Details
-
SqlJetTableDataCursor
- Throws:
SqlJetException
-
-
Method Details
-
getBtreeDataTable
-
getRowId
Description copied from interface:ISqlJetCursorGets row Id of the current record.- Returns:
- row Id of the current record.
- Throws:
SqlJetException
-
goTo
Description copied from interface:ISqlJetCursorGoes to the record with the specified row Id.- Parameters:
rowId- row Id- Returns:
- true if cursor was moved successfully.
- Throws:
SqlJetException
-
getFieldType
Description copied from interface:ISqlJetCursorReturns field type.- Parameters:
fieldName- name of the field- Returns:
- type of field
- Throws:
SqlJetException
-
isNull
Description copied from interface:ISqlJetCursorTests field value for null.- Returns:
- true if field value is null
- Throws:
SqlJetException
-
getString
Description copied from interface:ISqlJetCursorReturns specified field's value as String.- Parameters:
fieldName- name of the field- Returns:
- field's value as string
- Throws:
SqlJetException
-
getInteger
Description copied from interface:ISqlJetCursorReturns specified field's value as integer.- Parameters:
fieldName- name of the field- Throws:
SqlJetException
-
getFloat
Description copied from interface:ISqlJetCursorReturns specified field's value as float.- Parameters:
fieldName- name of the field- Throws:
SqlJetException
-
getBlobAsArray
Description copied from interface:ISqlJetCursorReturns specified field's value as BLOB.- Parameters:
fieldName- name of the field- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getBlobAsStream
Description copied from interface:ISqlJetCursorReturns specified field's value as BLOB.- Parameters:
fieldName- name of the field- Returns:
- field's value as BLOB
- Throws:
SqlJetException
-
getValue
Description copied from interface:ISqlJetCursorReturns value of the field with the specified name in the current row.- Parameters:
fieldName- name of the field- Throws:
SqlJetException
-
getBoolean
Description copied from interface:ISqlJetCursorReturns specified field's value as boolean.- Parameters:
fieldName- name of the field- Returns:
- field value
- Throws:
SqlJetException
-
update
Description copied from interface:ISqlJetCursorUpdates the current record.- Parameters:
values- New record values.- Throws:
SqlJetException
-
updateOr
Description copied from interface:ISqlJetCursorUpdates the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction.- Parameters:
onConflict-SqlJetConflictAction.values- New record values.- Throws:
SqlJetException
-
updateWithRowId
Description copied from interface:ISqlJetCursorUpdates rowId and values in the current record.- Parameters:
values- New record values.- Throws:
SqlJetException
-
updateWithRowIdOr
public long updateWithRowIdOr(SqlJetConflictAction onConflict, long rowId, Object... values) throws SqlJetException Description copied from interface:ISqlJetCursorUpdates rowId and values in the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction.- Parameters:
onConflict-SqlJetConflictAction.values- New record values.- Throws:
SqlJetException
-
updateByFieldNames
Description copied from interface:ISqlJetCursorUpdates the current record.- Parameters:
values- New record values mapped by field names.- Throws:
SqlJetException
-
updateByFieldNamesOr
public void updateByFieldNamesOr(SqlJetConflictAction onConflict, Map<String, Object> values) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorUpdates the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction.- Parameters:
onConflict-SqlJetConflictAction.values- New record values mapped by field names.- Throws:
SqlJetException
-
delete
Description copied from interface:ISqlJetCursorDeletes the current record.- Specified by:
deletein interfaceISqlJetCursor- Overrides:
deletein classSqlJetRowNumCursor- Throws:
SqlJetException
-
getRowValues
Description copied from interface:ISqlJetCursorReturns all field values of current row.- Returns:
- field values array
- Throws:
SqlJetException
-