public class SimpleCursor extends Object implements Cursor, Iterable<SimpleRow>
SimpleDatabase.rows method.
For detailed documentation of each member, see the documentation of the Cursor interface.
FIELD_TYPE_BLOB, FIELD_TYPE_FLOAT, FIELD_TYPE_INTEGER, FIELD_TYPE_NULL, FIELD_TYPE_STRING| Constructor and Description |
|---|
SimpleCursor(Cursor cursor)
Constructs a new simple cursor to wrap the given cursor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this stream and releases any system resources associated
with it.
|
void |
copyStringToBuffer(int columnIndex,
CharArrayBuffer buffer) |
void |
deactivate() |
<T> T |
get(int columnIndex)
Returns a column's value of any type.
|
<T> T |
get(String columnName)
Returns a column's value of any type.
|
byte[] |
getBlob(int columnIndex) |
byte[] |
getBlob(String columnName)
Returns a blob from a column with the given name.
|
int |
getColumnCount() |
int |
getColumnIndex(String columnName) |
int |
getColumnIndexOrThrow(String columnName) |
String |
getColumnName(int columnIndex) |
String[] |
getColumnNames() |
int |
getCount() |
double |
getDouble(int columnIndex) |
double |
getDouble(String columnName)
Returns a double from a column with the given name.
|
Bundle |
getExtras() |
float |
getFloat(int columnIndex) |
float |
getFloat(String columnName)
Returns a float from a column with the given name.
|
int |
getInt(int columnIndex) |
int |
getInt(String columnName)
Returns an int from a column with the given name.
|
long |
getLong(int columnIndex) |
long |
getLong(String columnName)
Returns a long from a column with the given name.
|
Uri |
getNotificationUri() |
int |
getPosition() |
short |
getShort(int columnIndex) |
String |
getString(int columnIndex) |
String |
getString(String columnName)
Returns a string from a column with the given name.
|
int |
getType(int columnIndex) |
boolean |
getWantsAllOnMoveCalls() |
boolean |
isAfterLast() |
boolean |
isBeforeFirst() |
boolean |
isClosed() |
boolean |
isFirst() |
boolean |
isLast() |
boolean |
isNull(int columnIndex) |
Iterator<SimpleRow> |
iterator()
Returns an iterator over elements of type
T. |
boolean |
move(int offset) |
boolean |
moveToFirst() |
boolean |
moveToLast() |
boolean |
moveToNext() |
boolean |
moveToPosition(int position) |
boolean |
moveToPrevious() |
void |
registerContentObserver(ContentObserver observer) |
void |
registerDataSetObserver(DataSetObserver observer) |
boolean |
requery() |
Bundle |
respond(Bundle extras) |
void |
setExtras(Bundle extras) |
void |
setNotificationUri(ContentResolver cr,
Uri uri) |
void |
unregisterContentObserver(ContentObserver observer) |
void |
unregisterDataSetObserver(DataSetObserver observer) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic SimpleCursor(Cursor cursor)
public int getInt(String columnName)
public long getLong(String columnName)
public float getFloat(String columnName)
public double getDouble(String columnName)
public String getString(String columnName)
public byte[] getBlob(String columnName)
public <T> T get(int columnIndex)
public <T> T get(String columnName)
public Iterator<SimpleRow> iterator()
java.lang.IterableT.public int getPosition()
getPosition in interface Cursorpublic boolean moveToPosition(int position)
moveToPosition in interface Cursorpublic boolean moveToFirst()
moveToFirst in interface Cursorpublic boolean moveToLast()
moveToLast in interface Cursorpublic boolean moveToNext()
moveToNext in interface Cursorpublic boolean moveToPrevious()
moveToPrevious in interface Cursorpublic boolean isBeforeFirst()
isBeforeFirst in interface Cursorpublic boolean isAfterLast()
isAfterLast in interface Cursorpublic int getColumnIndex(String columnName)
getColumnIndex in interface Cursorpublic int getColumnIndexOrThrow(String columnName) throws IllegalArgumentException
getColumnIndexOrThrow in interface CursorIllegalArgumentExceptionpublic String getColumnName(int columnIndex)
getColumnName in interface Cursorpublic String[] getColumnNames()
getColumnNames in interface Cursorpublic int getColumnCount()
getColumnCount in interface Cursorpublic void copyStringToBuffer(int columnIndex,
CharArrayBuffer buffer)
copyStringToBuffer in interface Cursorpublic void deactivate()
deactivate in interface Cursorpublic void close()
java.io.Closeable As noted in AutoCloseable.close(), cases where the
close may fail require careful attention. It is strongly advised
to relinquish the underlying resources and to internally
mark the Closeable as closed, prior to throwing
the IOException.
public void registerContentObserver(ContentObserver observer)
registerContentObserver in interface Cursorpublic void unregisterContentObserver(ContentObserver observer)
unregisterContentObserver in interface Cursorpublic void registerDataSetObserver(DataSetObserver observer)
registerDataSetObserver in interface Cursorpublic void unregisterDataSetObserver(DataSetObserver observer)
unregisterDataSetObserver in interface Cursorpublic void setNotificationUri(ContentResolver cr, Uri uri)
setNotificationUri in interface Cursorpublic Uri getNotificationUri()
getNotificationUri in interface Cursorpublic boolean getWantsAllOnMoveCalls()
getWantsAllOnMoveCalls in interface Cursor