public class RawResultsImpl<T> extends Object implements GenericRawResults<T>
Constructor and Description |
---|
RawResultsImpl(ConnectionSource connectionSource,
DatabaseConnection connection,
Class<?> clazz,
CompiledStatement compiledStmt,
GenericRowMapper<T> rowMapper,
ObjectCache objectCache) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close any open database connections associated with the GenericRawResults.
|
CloseableIterator<T> |
closeableIterator()
Returns an iterator over a set of elements of type T which can be closed.
|
String[] |
getColumnNames()
Return the array of column names for each result row.
|
T |
getFirstResult()
Return the first result only.
|
int |
getNumberColumns()
Return the number of columns in each result row.
|
List<T> |
getResults()
Return a list of all of the results.
|
CloseableIterator<T> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public RawResultsImpl(ConnectionSource connectionSource, DatabaseConnection connection, Class<?> clazz, CompiledStatement compiledStmt, GenericRowMapper<T> rowMapper, ObjectCache objectCache) throws SQLException
SQLException
public int getNumberColumns()
GenericRawResults
getNumberColumns
in interface GenericRawResults<T>
public String[] getColumnNames()
GenericRawResults
getColumnNames
in interface GenericRawResults<T>
public List<T> getResults() throws SQLException
GenericRawResults
Iterable.iterator()
method will allow your to process the results page-by-page.getResults
in interface GenericRawResults<T>
SQLException
public T getFirstResult() throws SQLException
GenericRawResults
GenericRawResults.getResults()
.getFirstResult
in interface GenericRawResults<T>
SQLException
public CloseableIterator<T> iterator()
public CloseableIterator<T> closeableIterator()
CloseableIterable
closeableIterator
in interface CloseableIterable<T>
public void close() throws Exception
GenericRawResults
Dao.iterator()
or another iterator method was called.close
in interface CloseableWrappedIterable<T>
close
in interface GenericRawResults<T>
close
in interface AutoCloseable
Exception
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.