FIELD_TYPE_BLOB, FIELD_TYPE_FLOAT, FIELD_TYPE_INTEGER, FIELD_TYPE_NULL, FIELD_TYPE_STRING| Constructor and Description |
|---|
SQLiteQueryCursor(SQLiteQuery query) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the Cursor, releasing all of its resources and making it completely invalid.
|
byte[] |
getBlob(int columnIndex)
Returns the value of the requested column as a byte array.
|
int |
getColumnIndex(java.lang.String columnName)
Returns the zero-based index for the given column name, or -1 if the column doesn't exist.
|
int |
getColumnIndexOrThrow(java.lang.String columnName)
Returns the zero-based index for the given column name, or throws
IllegalArgumentException if the column doesn't exist. |
java.lang.String |
getColumnName(int columnIndex)
Returns the column name at the given zero-based column index.
|
double |
getDouble(int columnIndex)
Returns the value of the requested column as a double.
|
float |
getFloat(int columnIndex)
Returns the value of the requested column as a float.
|
int |
getInt(int columnIndex)
Returns the value of the requested column as an int.
|
long |
getLong(int columnIndex)
Returns the value of the requested column as a long.
|
int |
getShort(int columnIndex)
Returns the value of the requested column as a short.
|
java.lang.String |
getString(int columnIndex)
Returns the value of the requested column as a String.
|
boolean |
isAfterLast()
Returns whether the cursor is pointing to the position after the last
row.
|
boolean |
isNull(int columnIndex)
Returns
true if the value in the indicated column is null. |
boolean |
moveToNext()
Move the cursor to the next row.
|
public SQLiteQueryCursor(SQLiteQuery query)
public boolean moveToNext()
CursorThis method will return false if the cursor is already past the last entry in the result set.
moveToNext in interface Cursorpublic boolean isAfterLast()
CursorisAfterLast in interface Cursorpublic int getColumnIndex(java.lang.String columnName)
CursorCursor.getColumnIndexOrThrow(String) instead, which
will make the error more clear.getColumnIndex in interface CursorcolumnName - the name of the target column.Cursor.getColumnIndexOrThrow(String)public int getColumnIndexOrThrow(java.lang.String columnName)
throws java.lang.IllegalArgumentException
CursorIllegalArgumentException if the column doesn't exist. If you're not sure if
a column will exist or not use Cursor.getColumnIndex(String) and check for -1, which
is more efficient than catching the exceptions.getColumnIndexOrThrow in interface CursorcolumnName - the name of the target column.java.lang.IllegalArgumentException - if the column does not existCursor.getColumnIndex(String)public java.lang.String getColumnName(int columnIndex)
CursorgetColumnName in interface CursorcolumnIndex - the zero-based index of the target column.public java.lang.String getString(int columnIndex)
CursorThe 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.
public int getShort(int columnIndex)
CursorThe 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.
public int getInt(int columnIndex)
CursorThe 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.
public long getLong(int columnIndex)
CursorThe 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.
public float getFloat(int columnIndex)
CursorThe 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.
public double getDouble(int columnIndex)
CursorThe 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.
public byte[] getBlob(int columnIndex)
CursorThe result and whether this method throws an exception when the column value is null or the column type is not a blob type is implementation-defined.
public boolean isNull(int columnIndex)
Cursortrue if the value in the indicated column is null.