public class BaseCursor
extends android.database.CursorWrapper
getXxxByName(String columnName)
.Constructor and Description |
---|
BaseCursor(android.database.Cursor cursor)
Constructor that just calls
super(cursor) . |
Modifier and Type | Method and Description |
---|---|
void |
copyStringToBufferByName(String columnName,
android.database.CharArrayBuffer buffer)
Copy the value of the requested column to the given buffer.
|
byte[] |
getBlobByName(String columnName)
Get the value of the requested column as a byte array.
|
boolean |
getBoolean(int columnIndex)
Get the value of the requested column as a boolean.
|
boolean |
getBooleanByName(String columnName)
Get the value of the requested column as a boolean.
|
double |
getDoubleByName(String columnName)
Get the value of the requested column as a double.
|
float |
getFloatByName(String columnName)
Get the value of the requested column as a float.
|
int |
getIntByName(String columnName)
Get the value of the requested column as an int.
|
long |
getLongByName(String columnName)
Get the value of the requested column as a long.
|
short |
getShortByName(String columnName)
Get the value of the requested column as a short.
|
String |
getStringByName(String columnName)
Get the value of the requested column as a String.
|
boolean |
isNullByName(String columnName)
Check if the value of the requested column is null.
|
boolean |
join()
Wait until this cursor finishes fetching data from the database.
|
close, copyStringToBuffer, deactivate, getBlob, getColumnCount, getColumnIndex, getColumnIndexOrThrow, getColumnName, getColumnNames, getCount, getDouble, getExtras, getFloat, getInt, getLong, getPosition, getShort, getString, getWantsAllOnMoveCalls, isAfterLast, isBeforeFirst, isClosed, isFirst, isLast, isNull, move, moveToFirst, moveToLast, moveToNext, moveToPosition, moveToPrevious, registerContentObserver, registerDataSetObserver, requery, respond, setNotificationUri, unregisterContentObserver, unregisterDataSetObserver
public BaseCursor(android.database.Cursor cursor)
super(cursor)
.cursor
- The wrapped cursor.public void copyStringToBufferByName(String columnName, android.database.CharArrayBuffer buffer)
columnName
- Column name.buffer
- Destination buffer to copy data to.public byte[] getBlobByName(String columnName)
This method is equivalent to getBlob
(
getColumnIndex
(columnName))
.
columnName
- Column name.public double getDoubleByName(String columnName)
This method is equivalent to getDouble
(
getColumnIndex
(columnName))
.
columnName
- Column name.public float getFloatByName(String columnName)
This method is equivalent to getFloat
(
getColumnIndex
(columnName))
.
columnName
- Column name.public int getIntByName(String columnName)
This method is equivalent to getInt
(
getColumnIndex
(columnName))
.
columnName
- Column name.public long getLongByName(String columnName)
This method is equivalent to getLong
(
getColumnIndex
(columnName))
.
columnName
- Column name.public short getShortByName(String columnName)
This method is equivalent to getShort
(
getColumnIndex
(columnName))
.
columnName
- Column name.public String getStringByName(String columnName)
This method is equivalent to getString
(
getColumnIndex
(columnName))
.
columnName
- Column name.public boolean isNullByName(String columnName)
This method is equivalent to isNull
(
getColumnIndex
(columnName))
.
columnName
- Column name.public boolean getBoolean(int columnIndex)
This method is equivalent to Boolean.valueOf(
getString
(columnIndex)).booleanValue()
.
columnIndex
- Column index.public boolean getBooleanByName(String columnName)
This method is equivalent to getBoolean
(
getColumnIndex
(columnName))
.
columnName
- Column name.public boolean join()
The specification allows data fetch to be performed asynchronously.
As a matter of fact, the cursor implementation for SQLite may behave
asynchronously. Asynchronous implementations of Cursor.getCount()
return a negative value instead of 0 until they finish fetching data.
Copyright © 2016. All rights reserved.