public class RootCursorWrapper extends AbstractCursor
AbstractCursor.SelfContentObserver
Modifier and Type | Field and Description |
---|---|
static String |
COLUMN_AUTHORITY |
static String |
COLUMN_ROOT_ID |
mClosed, mContentResolver, mCurrentRowID, mPos, mRowIdColumnIndex, mUpdatedRows
FIELD_TYPE_BLOB, FIELD_TYPE_FLOAT, FIELD_TYPE_INTEGER, FIELD_TYPE_NULL, FIELD_TYPE_STRING
Constructor and Description |
---|
RootCursorWrapper(String authority,
String rootId,
Cursor cursor,
int maxCount) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the Cursor, releasing all of its resources and making it completely invalid.
|
String[] |
getColumnNames()
Returns a string array holding the names of all of the columns in the
result set in the order in which they were listed in the result.
|
int |
getCount()
Returns the numbers of rows in the cursor.
|
double |
getDouble(int column)
Returns the value of the requested column as a double.
|
Bundle |
getExtras()
Returns a bundle of extra values.
|
float |
getFloat(int column)
Returns the value of the requested column as a float.
|
int |
getInt(int column)
Returns the value of the requested column as an int.
|
long |
getLong(int column)
Returns the value of the requested column as a long.
|
short |
getShort(int column)
Returns the value of the requested column as a short.
|
String |
getString(int column)
Returns the value of the requested column as a String.
|
int |
getType(int column)
Returns data type of the given column's value.
|
boolean |
isNull(int column)
Returns
true if the value in the indicated column is null. |
boolean |
onMove(int oldPosition,
int newPosition)
This function is called every time the cursor is successfully scrolled
to a new position, giving the subclass a chance to update any state it
may have.
|
checkPosition, copyStringToBuffer, deactivate, fillWindow, finalize, getBlob, getColumnCount, getColumnIndex, getColumnIndexOrThrow, getColumnName, getNotificationUri, getPosition, getUpdatedField, getWantsAllOnMoveCalls, getWindow, isAfterLast, isBeforeFirst, isClosed, isFieldUpdated, isFirst, isLast, move, moveToFirst, moveToLast, moveToNext, moveToPosition, moveToPrevious, onChange, onDeactivateOrClose, registerContentObserver, registerDataSetObserver, requery, respond, setExtras, setNotificationUri, setNotificationUri, unregisterContentObserver, unregisterDataSetObserver
public static final String COLUMN_AUTHORITY
public static final String COLUMN_ROOT_ID
public Bundle getExtras()
Cursor
These values may only change when requery is called.
getExtras
in interface Cursor
getExtras
in class AbstractCursor
Bundle.EMPTY
if there
are no values. Never null
.public void close()
Cursor
Cursor.deactivate()
a call to Cursor.requery()
will not make the Cursor valid
again.close
in interface Cursor
close
in interface Closeable
close
in interface AutoCloseable
close
in class AbstractCursor
public boolean onMove(int oldPosition, int newPosition)
AbstractCursor
onMove
in interface CrossProcessCursor
onMove
in class AbstractCursor
oldPosition
- the position that we're moving fromnewPosition
- the position that we're moving topublic String[] getColumnNames()
Cursor
getColumnNames
in interface Cursor
getColumnNames
in class AbstractCursor
public int getCount()
Cursor
getCount
in interface Cursor
getCount
in class AbstractCursor
public double getDouble(int column)
Cursor
The result and whether this method throws an exception when the
column value is null, the column type is not a floating-point type, or the
floating-point value is not representable as a double
value is
implementation-defined.
getDouble
in interface Cursor
getDouble
in class AbstractCursor
column
- the zero-based index of the target column.public float getFloat(int column)
Cursor
The result and whether this method throws an exception when the
column value is null, the column type is not a floating-point type, or the
floating-point value is not representable as a float
value is
implementation-defined.
getFloat
in interface Cursor
getFloat
in class AbstractCursor
column
- the zero-based index of the target column.public int getInt(int column)
Cursor
The result and whether this method throws an exception when the
column value is null, the column type is not an integral type, or the
integer value is outside the range [Integer.MIN_VALUE
,
Integer.MAX_VALUE
] is implementation-defined.
getInt
in interface Cursor
getInt
in class AbstractCursor
column
- the zero-based index of the target column.public long getLong(int column)
Cursor
The result and whether this method throws an exception when the
column value is null, the column type is not an integral type, or the
integer value is outside the range [Long.MIN_VALUE
,
Long.MAX_VALUE
] is implementation-defined.
getLong
in interface Cursor
getLong
in class AbstractCursor
column
- the zero-based index of the target column.public short getShort(int column)
Cursor
The result and whether this method throws an exception when the
column value is null, the column type is not an integral type, or the
integer value is outside the range [Short.MIN_VALUE
,
Short.MAX_VALUE
] is implementation-defined.
getShort
in interface Cursor
getShort
in class AbstractCursor
column
- the zero-based index of the target column.public String getString(int column)
Cursor
The result and whether this method throws an exception when the column value is null or the column type is not a string type is implementation-defined.
getString
in interface Cursor
getString
in class AbstractCursor
column
- the zero-based index of the target column.public int getType(int column)
Cursor
Cursor.getInt(int)
, Cursor.getFloat(int)
etc.
Returned column types are
getType
in interface Cursor
getType
in class AbstractCursor
column
- the zero-based index of the target column.public boolean isNull(int column)
Cursor
true
if the value in the indicated column is null.isNull
in interface Cursor
isNull
in class AbstractCursor
column
- the zero-based index of the target column.