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 TypeMethodDescriptionvoid
delete()
Deletes the current record.byte[]
getBlobAsArray
(java.lang.String fieldName) Returns specified field's value as BLOB.java.io.InputStream
getBlobAsStream
(java.lang.String fieldName) Returns specified field's value as BLOB.boolean
getBoolean
(java.lang.String fieldName) Returns specified field's value as boolean.protected ISqlJetBtreeDataTable
getFieldType
(java.lang.String fieldName) Returns field type.double
getFloat
(java.lang.String fieldName) Returns specified field's value as float.long
getInteger
(java.lang.String fieldName) Returns specified field's value as integer.long
getRowId()
Gets row Id of the current record.java.lang.Object[]
Returns all field values of current row.java.lang.String
getString
(java.lang.String fieldName) Returns specified field's value as String.java.lang.Object
getValue
(java.lang.String fieldName) Returns value of the field with the specified name in the current row.boolean
goTo
(long rowId) Goes to the record with the specified row Id.boolean
isNull
(java.lang.String fieldName) Tests field value for null.void
update
(java.lang.Object... values) Updates the current record.void
updateByFieldNames
(java.util.Map<java.lang.String, java.lang.Object> values) Updates the current record.void
updateByFieldNamesOr
(SqlJetConflictAction onConflict, java.util.Map<java.lang.String, java.lang.Object> values) Updates the current record.void
updateOr
(SqlJetConflictAction onConflict, java.lang.Object... values) Updates the current record.long
updateWithRowId
(long rowId, java.lang.Object... values) Updates rowId and values in the current record.long
updateWithRowIdOr
(SqlJetConflictAction onConflict, long rowId, java.lang.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, setLimit
Methods inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
close, getBlobAsArray, getBlobAsStream, getBoolean, getFieldsCount, getFieldType, getFloat, getInteger, getString, getValue, isNull, reverse
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SqlJetTableDataCursor
- Throws:
SqlJetException
-
-
Method Details
-
getBtreeDataTable
-
getRowId
Description copied from interface:ISqlJetCursor
Gets row Id of the current record.- Returns:
- row Id of the current record.
- Throws:
SqlJetException
-
goTo
Description copied from interface:ISqlJetCursor
Goes 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:ISqlJetCursor
Returns field type.- Parameters:
fieldName
- name of the field- Returns:
- type of field
- Throws:
SqlJetException
-
isNull
Description copied from interface:ISqlJetCursor
Tests field value for null.- Returns:
- true if field value is null
- Throws:
SqlJetException
-
getString
Description copied from interface:ISqlJetCursor
Returns 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:ISqlJetCursor
Returns specified field's value as integer.- Parameters:
fieldName
- name of the field- Throws:
SqlJetException
-
getFloat
Description copied from interface:ISqlJetCursor
Returns specified field's value as float.- Parameters:
fieldName
- name of the field- Throws:
SqlJetException
-
getBlobAsArray
Description copied from interface:ISqlJetCursor
Returns 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:ISqlJetCursor
Returns 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:ISqlJetCursor
Returns 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:ISqlJetCursor
Returns specified field's value as boolean.- Parameters:
fieldName
- name of the field- Returns:
- field value
- Throws:
SqlJetException
-
update
Description copied from interface:ISqlJetCursor
Updates the current record.- Parameters:
values
- New record values.- Throws:
SqlJetException
-
updateOr
public void updateOr(SqlJetConflictAction onConflict, java.lang.Object... values) throws SqlJetException Description copied from interface:ISqlJetCursor
Updates the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction
.- Parameters:
onConflict
-SqlJetConflictAction
.values
- New record values.- Throws:
SqlJetException
-
updateWithRowId
Description copied from interface:ISqlJetCursor
Updates rowId and values in the current record.values
- New record values.- Throws:
SqlJetException
-
updateWithRowIdOr
public long updateWithRowIdOr(SqlJetConflictAction onConflict, long rowId, java.lang.Object... values) throws SqlJetException Description copied from interface:ISqlJetCursor
Updates rowId and values in the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction
.- Parameters:
onConflict
-SqlJetConflictAction
.values
- New record values.- Throws:
SqlJetException
-
updateByFieldNames
public void updateByFieldNames(java.util.Map<java.lang.String, java.lang.Object> values) throws SqlJetExceptionDescription copied from interface:ISqlJetCursor
Updates the current record.- Parameters:
values
- New record values mapped by field names.- Throws:
SqlJetException
-
updateByFieldNamesOr
public void updateByFieldNamesOr(SqlJetConflictAction onConflict, java.util.Map<java.lang.String, java.lang.Object> values) throws SqlJetExceptionDescription copied from interface:ISqlJetCursor
Updates 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:ISqlJetCursor
Deletes the current record.- Specified by:
delete
in interfaceISqlJetCursor
- Overrides:
delete
in classSqlJetRowNumCursor
- Throws:
SqlJetException
-
getRowValues
Description copied from interface:ISqlJetCursor
Returns all field values of current row.- Returns:
- field values array
- Throws:
SqlJetException
-