public interface GenericRawResults<T> extends CloseableWrappedIterable<T>
Dao.queryRaw(String, String...)which returns results as a String,
Dao.queryRaw(String, RawRowMapper, String...)which returns results mapped by the caller to an Object, and
Dao.queryRaw(String, DataType, String...)which returns each results as a Object.
You must access the results one of three ways using this object. You can call the
getResults() method which
will extract all results into a list which is returned, you can get the first result only with
getFirstResult(), or you can call the
Iterable.iterator() method either directly or with the for... Java
statement. The iterator allows you to page through the results and is more appropriate for queries which will return
a large number of results.
NOTE: If you access the
Iterable.iterator() method, you must call
when you are done otherwise the underlying SQL statement and connection may be kept open.
|Modifier and Type||Method and Description|
Close any open database connections associated with the GenericRawResults.
Return the array of column names for each result row.
Return the first result only.
Return the number of columns in each result row.
Return a list of all of the results.
forEach, iterator, spliterator
List<T> getResults() throws SQLException
Iterable.iterator()method will allow your to process the results page-by-page.
T getFirstResult() throws SQLException
void close() throws Exception
Dao.iterator()or another iterator method was called.
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.