com.j256.ormlite.stmt
Class RawResultsImpl<T>
java.lang.Object
com.j256.ormlite.stmt.RawResultsImpl<T>
- All Implemented Interfaces:
- CloseableIterable<T>, GenericRawResults<T>, Iterable<T>
public class RawResultsImpl<T>
- extends Object
- implements GenericRawResults<T>
Handler for our raw results objects which does the conversion for various different results: String[], Object[], and
user defined .
- Author:
- graywatson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rowMapper
protected final GenericRowMapper<T> rowMapper
iterator
protected SelectIterator<T,Void> iterator
columnNames
protected final String[] columnNames
RawResultsImpl
public RawResultsImpl(ConnectionSource connectionSource,
DatabaseConnection connection,
String query,
Class<?> clazz,
CompiledStatement compiledStmt,
String[] columnNames,
GenericRowMapper<T> rowMapper)
throws SQLException
- Throws:
SQLException
getNumberColumns
public int getNumberColumns()
- Description copied from interface:
GenericRawResults
- Return the number of columns in each result row.
- Specified by:
getNumberColumns
in interface GenericRawResults<T>
getColumnNames
public String[] getColumnNames()
- Description copied from interface:
GenericRawResults
- Return the array of column names for each result row.
- Specified by:
getColumnNames
in interface GenericRawResults<T>
getResults
public List<T> getResults()
throws SQLException
- Description copied from interface:
GenericRawResults
- Return a list of all of the results. For large queries, this should not be used since the
CloseableIterable.iterator()
method will allow your to process the results page-by-page.
- Specified by:
getResults
in interface GenericRawResults<T>
- Throws:
SQLException
iterator
public CloseableIterator<T> iterator()
- Description copied from interface:
CloseableIterable
- Returns an iterator over a set of elements of type T.
- Specified by:
iterator
in interface CloseableIterable<T>
- Specified by:
iterator
in interface Iterable<T>
- Returns:
- an CloseableIterator.
close
public void close()
throws SQLException
- Description copied from interface:
GenericRawResults
- Close any open database connections associated with the RawResults. This is only applicable if the
Dao.iteratorRaw(String)
or another iterator method was called.
- Specified by:
close
in interface GenericRawResults<T>
- Throws:
SQLException
Copyright © 2011. All Rights Reserved.