public class QueryResult extends DefaultOperationObserver
| Modifier and Type | Field and Description |
|---|---|
protected Map |
queries |
globalExceptions, queryExceptions| Constructor and Description |
|---|
QueryResult() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears any previously collected information.
|
List |
getFirstRows(Query query)
Returns the first results for the query.
|
int |
getFirstUpdateCount(Query query)
Returns the first update count for the query.
|
int[] |
getFirstUpdateCounts(Query query)
Returns the first update count.
|
Iterator |
getQueries()
Returns an iterator over all executed queries in the order they were executed.
|
List |
getResults(Query query)
Returns a list of all results of a given query.
|
List<?> |
getRows(Query query)
Returns a List that itself contains Lists of data rows for each ResultSet returned
by the query.
|
List |
getUpdates(Query query)
Returns a List that contains java.lang.Integer objects for each one of the update
counts returned by the query.
|
boolean |
isIteratedResult()
Always returns
false, iterated results are not supported. |
void |
nextBatchCount(Query query,
int[] resultCount)
Callback method invoked after a batch update is executed.
|
void |
nextCount(Query query,
int resultCount)
Callback method invoked after an updating query is executed.
|
void |
nextGlobalException(Exception ex)
Overrides superclass implementation to rethrow an exception immediately.
|
void |
nextQueryException(Query query,
Exception ex)
Overrides superclass implementation to rethrow an exception immediately.
|
void |
nextRows(Query query,
List<?> dataRows)
Callback method invoked for each processed ResultSet.
|
void |
nextRows(Query q,
ResultIterator it)
Closes ResultIterator without reading its data.
|
getGlobalExceptions, getQueryExceptions, hasExceptions, nextGeneratedRows, printExceptionsprotected Map queries
public void clear()
public Iterator getQueries()
public List getResults(Query query)
public int getFirstUpdateCount(Query query)
(Integer)getUpdates(query).get(0), kind of like Google's "I'm feeling lucky".
Returns -1 if no update count is found for the query.public int[] getFirstUpdateCounts(Query query)
public List getFirstRows(Query query)
(List)getRows(query).get(0), kind of like Google's "I'm feeling lucky".public List<?> getRows(Query query)
public List getUpdates(Query query)
public void nextQueryException(Query query, Exception ex)
nextQueryException in interface OperationObservernextQueryException in class DefaultOperationObserverpublic void nextGlobalException(Exception ex)
nextGlobalException in interface OperationObservernextGlobalException in class DefaultOperationObserverpublic boolean isIteratedResult()
false, iterated results are not supported.isIteratedResult in interface OperationHintsisIteratedResult in class DefaultOperationObserverpublic void nextBatchCount(Query query, int[] resultCount)
OperationObservernextBatchCount in interface OperationObservernextBatchCount in class DefaultOperationObserverpublic void nextCount(Query query, int resultCount)
OperationObservernextCount in interface OperationObservernextCount in class DefaultOperationObserverpublic void nextRows(Query query, List<?> dataRows)
OperationObservernextRows in interface OperationObservernextRows in class DefaultOperationObserverpublic void nextRows(Query q, ResultIterator it)
DefaultOperationObservernextRows in interface OperationObservernextRows in class DefaultOperationObserverCopyright © 2001–2018 Apache Cayenne. All rights reserved.