ResultRow.FunctionSpec, ResultRow.op| Constructor and Description |
|---|
SqliteResultRow(int position,
com.j256.ormlite.support.DatabaseResults results)
Construct a SqliteResultRow object
|
| Modifier and Type | Method and Description |
|---|---|
void |
copyStringToBuffer(int columnIndex,
StringBuffer buffer)
Retrieves the requested column text and stores it in the buffer provided.
|
byte[] |
getBlob(int columnIndex)
Returns the value of the requested column as a byte array.
|
int |
getColumnCount()
Return total number of columns
|
int |
getColumnIndex(String columnName)
Returns the zero-based index for the given column name, or -1 if the column doesn't exist.
|
String |
getColumnName(int columnIndex)
Returns the zero-based index for the given column name, or throws
IllegalArgumentException if the column doesn't exist. |
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.
|
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 |
getPosition()
Returns the current position of the cursor in the row set.
|
short |
getShort(int columnIndex)
Returns the value of the requested column as a short.
|
String |
getString(int columnIndex)
Returns the value of the requested column as a String.
|
boolean |
isNull(int columnIndex)
Returns
true if the last object returned with the column index is null. |
public SqliteResultRow(int position,
com.j256.ormlite.support.DatabaseResults results)
position - Current position of the cursor in the row setresults - DatabaseResults objectpublic int getPosition()
getPosition in interface ResultRowpublic int getColumnIndex(String columnName)
getColumnIndex in interface ResultRowcolumnName - The name of the target column.public String getColumnName(int columnIndex)
IllegalArgumentException if the column doesn't exist. If you're not sure if
a column will exist or not use getColumnIndex(String) and check for -1, which
is more efficient than catching the exceptions.getColumnName in interface ResultRowcolumnIndex - The zero-based column indexIllegalArgumentException - if the column does not existgetColumnIndex(String)public String[] getColumnNames()
getColumnNames in interface ResultRowpublic int getColumnCount()
getColumnCount in interface ResultRowpublic byte[] getBlob(int columnIndex)
The 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 String getString(int columnIndex)
public void copyStringToBuffer(int columnIndex,
StringBuffer buffer)
copyStringToBuffer in interface ResultRowcolumnIndex - The zero-based index of the target column.
if the target column is null, return bufferbuffer - the buffer to copy the text into.public short getShort(int columnIndex)
public int getInt(int columnIndex)
public long getLong(int columnIndex)
public float getFloat(int columnIndex)
public double getDouble(int columnIndex)
This documentation is licensed by Andrew Bowley under the GPLv3 License.