public class SqlQueryResult extends Object implements QueryResult
| Modifier and Type | Field and Description | 
|---|---|
private Collection<String> | 
_columnNames
The column names. 
 | 
protected Query.ResultType | 
_resultType
The result type. 
 | 
protected List<QueryResultRow> | 
_rows
The result rows. 
 | 
| Constructor and Description | 
|---|
SqlQueryResult(ResultSet resultSet)
Constructs a query result around a ResultSet. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
_extractResults(ResultSet resultSet)
Extract the column names and results from a JDBC result set. 
 | 
void | 
close()
Close and cleanup the underlying objects and resources (resultset if SQL, LDAP resources...) if needed. 
 | 
Collection<String> | 
getColumnNames()
Get the column names. 
 | 
int | 
getSize()
Get size 
 | 
Query.ResultType | 
getType()
Get the type of the result. 
 | 
Iterator<QueryResultRow> | 
iterator()  | 
void | 
setType(Query.ResultType resultType)
Set the result type. 
 | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected Query.ResultType _resultType
protected List<QueryResultRow> _rows
private Collection<String> _columnNames
public SqlQueryResult(ResultSet resultSet)
resultSet - the result setpublic Query.ResultType getType()
QueryResultgetType in interface QueryResultpublic int getSize()
QueryResultgetSize in interface QueryResultpublic void setType(Query.ResultType resultType)
resultType - the result type.public Collection<String> getColumnNames() throws DataInclusionException
QueryResultgetColumnNames in interface QueryResultDataInclusionException - if an error occurs while manipulating the data sourcespublic Iterator<QueryResultRow> iterator()
iterator in interface Iterable<QueryResultRow>public void close()
QueryResultclose in interface QueryResultprotected void _extractResults(ResultSet resultSet) throws SQLException
resultSet - the JDBC result set.SQLException - if an error occurs when manipulating the result set