T
- Type that the mapRow returns.public interface RawRowObjectMapper<T>
GenericRawResults
and returns a T. Is used in the
Dao.queryRaw(String, DataType[], RawRowObjectMapper, String...)
method.
NOTE: If you need to map Strings instead then consider using the RawRowMapper
with the
Dao.queryRaw(String, RawRowMapper, String...)
method which allows you to iterate over the raw results as
String[].
Modifier and Type | Method and Description |
---|---|
T |
mapRow(String[] columnNames,
DataType[] dataTypes,
Object[] resultColumns)
Used to convert a raw results row to an object.
|
T mapRow(String[] columnNames, DataType[] dataTypes, Object[] resultColumns) throws SQLException
NOTE: If you are using the StatementBuilder.prepareStatementString()
to build your query, it may have
added the id column to the selected column list if the Dao object has an id you did not include it in the columns
you selected. So the results might have one more column than you are expecting.
columnNames
- Array of names of columns.dataTypes
- Array of the DataTypes of each of the columns as passed into the
Dao.queryRaw(String, DataType[], RawRowObjectMapper, String...)
resultColumns
- Array of result columns.SQLException
- If there is any critical error with the data and you want to stop the paging.This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.