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
public class SqlJetTableDataCursor extends SqlJetRowNumCursor
Implementation of cursor which allow access to all table's rows.
-
-
Field Summary
-
Fields inherited from class org.tmatesoft.sqljet.core.internal.table.SqlJetCursor
btreeTable, db
-
-
Constructor Summary
Constructors Constructor Description SqlJetTableDataCursor(ISqlJetBtreeDataTable table, SqlJetDb db)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()Deletes the current record.byte[]getBlobAsArray(java.lang.String fieldName)Returns specified field's value as BLOB.java.io.InputStreamgetBlobAsStream(java.lang.String fieldName)Returns specified field's value as BLOB.booleangetBoolean(java.lang.String fieldName)Returns specified field's value as boolean.protected ISqlJetBtreeDataTablegetBtreeDataTable()SqlJetValueTypegetFieldType(java.lang.String fieldName)Returns field type.doublegetFloat(java.lang.String fieldName)Returns specified field's value as float.longgetInteger(java.lang.String fieldName)Returns specified field's value as integer.longgetRowId()Gets row Id of the current record.java.lang.Object[]getRowValues()Returns all field values of current row.java.lang.StringgetString(java.lang.String fieldName)Returns specified field's value as String.java.lang.ObjectgetValue(java.lang.String fieldName)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.booleanisNull(java.lang.String fieldName)Tests field value for null.voidupdate(java.lang.Object... values)Updates the current record.voidupdateByFieldNames(java.util.Map<java.lang.String,java.lang.Object> values)Updates the current record.voidupdateByFieldNamesOr(SqlJetConflictAction onConflict, java.util.Map<java.lang.String,java.lang.Object> values)Updates the current record.voidupdateOr(SqlJetConflictAction onConflict, java.lang.Object... values)Updates the current record.longupdateWithRowId(long rowId, java.lang.Object... values)Updates rowId and values in the current record.longupdateWithRowIdOr(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
-
-
-
-
Constructor Detail
-
SqlJetTableDataCursor
public SqlJetTableDataCursor(ISqlJetBtreeDataTable table, SqlJetDb db) throws SqlJetException
- Throws:
SqlJetException
-
-
Method Detail
-
getBtreeDataTable
protected ISqlJetBtreeDataTable getBtreeDataTable()
-
getRowId
public long getRowId() throws SqlJetExceptionDescription copied from interface:ISqlJetCursorGets row Id of the current record.- Returns:
- row Id of the current record.
- Throws:
SqlJetException
-
goTo
public boolean goTo(long rowId) throws SqlJetExceptionDescription 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
public SqlJetValueType getFieldType(java.lang.String fieldName) throws SqlJetException
Description copied from interface:ISqlJetCursorReturns field type.- Parameters:
fieldName- name of the field- Returns:
- type of field
- Throws:
SqlJetException
-
isNull
public boolean isNull(java.lang.String fieldName) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorTests field value for null.- Returns:
- true if field value is null
- Throws:
SqlJetException
-
getString
public java.lang.String getString(java.lang.String fieldName) throws SqlJetExceptionDescription 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
public long getInteger(java.lang.String fieldName) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorReturns specified field's value as integer.- Parameters:
fieldName- name of the field- Throws:
SqlJetException
-
getFloat
public double getFloat(java.lang.String fieldName) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorReturns specified field's value as float.- Parameters:
fieldName- name of the field- Throws:
SqlJetException
-
getBlobAsArray
public byte[] getBlobAsArray(java.lang.String fieldName) throws SqlJetExceptionDescription 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
public java.io.InputStream getBlobAsStream(java.lang.String fieldName) throws SqlJetExceptionDescription 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
public java.lang.Object getValue(java.lang.String fieldName) throws SqlJetExceptionDescription 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
public boolean getBoolean(java.lang.String fieldName) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorReturns specified field's value as boolean.- Parameters:
fieldName- name of the field- Returns:
- field value
- Throws:
SqlJetException
-
update
public void update(java.lang.Object... values) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorUpdates 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:ISqlJetCursorUpdates the current record. Implements ON CONFLICT clause. SeeSqlJetConflictAction.- Parameters:
onConflict-SqlJetConflictAction.values- New record values.- Throws:
SqlJetException
-
updateWithRowId
public long updateWithRowId(long rowId, java.lang.Object... values) throws SqlJetExceptionDescription copied from interface:ISqlJetCursorUpdates 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:ISqlJetCursorUpdates 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:ISqlJetCursorUpdates 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 SqlJetException
Description 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
public void delete() throws SqlJetExceptionDescription copied from interface:ISqlJetCursorDeletes the current record.- Specified by:
deletein interfaceISqlJetCursor- Overrides:
deletein classSqlJetRowNumCursor- Throws:
SqlJetException
-
getRowValues
public java.lang.Object[] getRowValues() throws SqlJetExceptionDescription copied from interface:ISqlJetCursorReturns all field values of current row.- Returns:
- field values array
- Throws:
SqlJetException
-
-