ResultSet, SharedResultSetpublic abstract class AbsSharedResultSet extends AbsResultSet implements SharedResultSet
SharedResultSet class.
This class implements some basic functions of SharedResultSet.
SystemCapability.Data#DATA_APPDATAMGRResultSet.ColumnType| 限定符和类型 | 字段 | 说明 |
|---|---|---|
protected SharedBlock |
sharedBlock |
The SharedBlock owned by this AbsSharedResultSet.
|
DEFAULT_POS, isClosed, pos| 构造器 | 说明 |
|---|---|
AbsSharedResultSet(String name) |
AbsSharedResultSet construction method.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
protected void |
checkState(int columnIndex) |
Check current status.
|
protected void |
clearBlock() |
Clears data in a shared block that is not empty in this
AbsSharedResultSet object. |
void |
close() |
Closes the result set.
|
protected void |
closeBlock() |
Closes a shared block that is not empty in this
AbsSharedResultSet object. |
void |
fillBlock(int startRowIndex,
SharedBlock block) |
Adds the data of a
SharedResultSet to a SharedBlock. |
protected void |
finalize() |
Release the native shared block resources.
|
byte[] |
getBlob(int columnIndex) |
Obtains the value of the specified column in the current row as a byte array.
|
SharedBlock |
getBlock() |
Get current shared block.
|
ResultSet.ColumnType |
getColumnTypeForIndex(int columnIndex) |
Obtains the data type based on the specified column index.
|
double |
getDouble(int columnIndex) |
Obtains the value of the specified column in the current row as a double.
|
float |
getFloat(int columnIndex) |
Obtains the value of the specified column in the current row as a float.
|
int |
getInt(int columnIndex) |
Obtains the value of the specified column in the current row as an int.
|
long |
getLong(int columnIndex) |
Obtains the value of the specified column in the current row as a long.
|
short |
getShort(int columnIndex) |
Obtains the value of the specified column in the current row as a short.
|
String |
getString(int columnIndex) |
Obtains the value of the specified column in the current row as a string.
|
boolean |
goToRow(int rowIndex) |
Go to the specified row of the result set.
|
boolean |
hasBlock() |
Checks whether an
AbsSharedResultSet object contains shared blocks. |
boolean |
isColumnNull(int columnIndex) |
Checks whether the value of the specified column in the current row is null.
|
boolean |
onGo(int oldRowIndex,
int newRowIndex) |
Called when the position of the result set changes.
|
void |
setBlock(SharedBlock block) |
Allocates a new shared block to an
AbsSharedResultSet. |
getAffectedByUris, getAllColumnNames, getColumnCount, getColumnIndexForName, getColumnNameForIndex, getExtensions, getRowCount, getRowIndex, goTo, goToFirstRow, goToLastRow, goToNextRow, goToPreviousRow, isAtFirstRow, isAtLastRow, isClosed, isEnded, isStarted, notifyChange, registerObserver, setAffectedByUris, setExtensions, unregisterObserverclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAffectedByUris, getAllColumnNames, getColumnCount, getColumnIndexForName, getColumnNameForIndex, getExtensions, getRowCount, getRowIndex, goTo, goToFirstRow, goToLastRow, goToNextRow, goToPreviousRow, isAtFirstRow, isAtLastRow, isClosed, isEnded, isStarted, registerObserver, setAffectedByUris, setExtensions, unregisterObserverprotected SharedBlock sharedBlock
public AbsSharedResultSet(String name)
name - Name of shared block.public byte[] getBlob(int columnIndex)
ResultSetThe implementation class determines whether to throw an exception if the value of the specified column in the current row is null or the specified column is not of the Blob type.
getBlob 在接口中 ResultSetgetBlob 在类中 AbsResultSetcolumnIndex - Indicates the specified column index, which starts from 0.public String getString(int columnIndex)
ResultSetThe implementation class determines whether to throw an exception if the value of the specified column in the current row is null or the specified column is not of the string type.
getString 在接口中 ResultSetgetString 在类中 AbsResultSetcolumnIndex - Indicates the specified column index, which starts from 0.public short getShort(int columnIndex)
ResultSet
he implementation class determines whether to throw an exception if the value of the specified column
in the current row is null, the specified column is not of the integer type, or the integer is beyond
the range [Short.MIN_VALUE, Short.MAX_VALUE].
getShort 在接口中 ResultSetgetShort 在类中 AbsResultSetcolumnIndex - Indicates the specified column index, which starts from 0.public int getInt(int columnIndex)
ResultSet
The implementation class determines whether to throw an exception if the value of the specified column
in the current row is null, the specified column is not of the integer type, or the integer is beyond
the range [Integer.MIN_VALUE, Integer.MAX_VALUE].
getInt 在接口中 ResultSetgetInt 在类中 AbsResultSetcolumnIndex - Indicates the specified column index, which starts from 0.public long getLong(int columnIndex)
ResultSetThe implementation class determines whether to throw an exception if the value of the specified column
in the current row is null, the specified column is not of the integer type, or the integer is beyond the
range [Long.MIN_VALUE, Long.MAX_VALUE].
getLong 在接口中 ResultSetgetLong 在类中 AbsResultSetcolumnIndex - Indicates the specified column index, which starts from 0.public float getFloat(int columnIndex)
ResultSetThe implementation class determines whether to throw an exception if the value of the specified column in
the current row is null, the specified column is not of the floating-point type, or the floating-point value
cannot be represented by a float.
getFloat 在接口中 ResultSetgetFloat 在类中 AbsResultSetcolumnIndex - Indicates the specified column index, which starts from 0.public double getDouble(int columnIndex)
ResultSetThe implementation class determines whether to throw an exception if the value of the specified column
in the current row is null, the specified column is not of the floating-point type, or the floating-point
value cannot be represented by a double.
getDouble 在接口中 ResultSetgetDouble 在类中 AbsResultSetcolumnIndex - Indicates the specified column index, which starts from 0.public boolean isColumnNull(int columnIndex)
ResultSetisColumnNull 在接口中 ResultSetisColumnNull 在类中 AbsResultSetcolumnIndex - Indicates the specified column index, which starts from 0.true if the value of the specified column in the current row is null;
returns false otherwise.public ResultSet.ColumnType getColumnTypeForIndex(int columnIndex)
ResultSetThe return value is of the enumeration type, which can be an integer, float, String, Blob, or null.
getColumnTypeForIndex 在接口中 ResultSetcolumnIndex - Indicates the specified column index.protected void checkState(int columnIndex)
columnIndex - The index of the column to check.public boolean onGo(int oldRowIndex,
int newRowIndex)
SharedResultSetWhen the result set is moved to a new position, this method is called to notify the child class of
the move result. If false is returned,
the result set will be moved to the beforeFirst position.
onGo 在接口中 SharedResultSetoldRowIndex - Indicates the original position of the result set.newRowIndex - Indicates the new position of the result set.true if the result set is moved successfully; returns false otherwise.public void fillBlock(int startRowIndex,
SharedBlock block)
SharedResultSetSharedResultSet to a SharedBlock.
This method is used to add the data of a SharedResultSet (starting from the
startRowIndex position) to a SharedBlock until all data of the SharedResultSet is
added to the SharedBlock or the SharedBlock space is insufficient.
fillBlock 在接口中 SharedResultSetstartRowIndex - Indicates the index in the SharedResultSet. The index starts
from 0, indicating the first row.block - Indicates the block whose data is to be added to the SharedResultSet.public SharedBlock getBlock()
getBlock 在接口中 SharedResultSetpublic void setBlock(SharedBlock block)
AbsSharedResultSet.
The allocated shared block will replace the existing shared block in the AbsSharedResultSet,
and the replaced shared block will be released.
block - Indicates the shared block to allocate.public boolean hasBlock()
AbsSharedResultSet object contains shared blocks.true if the AbsSharedResultSet contains shared blocks;
returns false otherwise.protected void closeBlock()
AbsSharedResultSet object.protected void clearBlock()
AbsSharedResultSet object.public final boolean goToRow(int rowIndex)
ResultSetgoToRow 在接口中 ResultSetgoToRow 在类中 AbsResultSetrowIndex - Indicates the index of the specified row, which starts from 0.true if the result set is moved successfully; returns false otherwise.public void close()
ResultSetCalling this method on the result set will release all of its resources and makes it ineffective.
close 在接口中 ResultSetclose 在类中 AbsResultSetResultSet.isClosed()protected void finalize()
finalize 在类中 AbsResultSetWeakReference,
PhantomReference