|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.access.util.DefaultOperationObserver
org.apache.cayenne.access.QueryResult
public class QueryResult
QueryResult encapsulates a result of execution of zero or more queries using QueryEngine. QueryResult supports queries with multiple mixed selects and updates, such as ProcedureQueries.
Field Summary | |
---|---|
protected java.util.Map |
queries
|
Fields inherited from class org.apache.cayenne.access.util.DefaultOperationObserver |
---|
globalExceptions, queryExceptions |
Constructor Summary | |
---|---|
QueryResult()
|
Method Summary | |
---|---|
void |
clear()
Clears any previously collected information. |
java.util.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. |
java.util.Iterator |
getQueries()
Returns an iterator over all executed queries in the order they were executed. |
java.util.List |
getResults(Query query)
Returns a list of all results of a given query. |
java.util.List<?> |
getRows(Query query)
Returns a List that itself contains Lists of data rows for each ResultSet returned by the query. |
java.util.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(java.lang.Exception ex)
Overrides superclass implementation to rethrow an exception immediately. |
void |
nextQueryException(Query query,
java.lang.Exception ex)
Overrides superclass implementation to rethrow an exception immediately. |
void |
nextRows(Query query,
java.util.List<?> dataRows)
Callback method invoked for each processed ResultSet. |
void |
nextRows(Query q,
ResultIterator it)
Closes ResultIterator without reading its data. |
Methods inherited from class org.apache.cayenne.access.util.DefaultOperationObserver |
---|
getGlobalExceptions, getQueryExceptions, hasExceptions, nextGeneratedRows, printExceptions |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map queries
Constructor Detail |
---|
public QueryResult()
Method Detail |
---|
public void clear()
public java.util.Iterator getQueries()
public java.util.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 java.util.List getFirstRows(Query query)
(List)getRows(query).get(0), kind of like Google's "I'm feeling lucky".
public java.util.List<?> getRows(Query query)
public java.util.List getUpdates(Query query)
public void nextQueryException(Query query, java.lang.Exception ex)
nextQueryException
in interface OperationObserver
nextQueryException
in class DefaultOperationObserver
public void nextGlobalException(java.lang.Exception ex)
nextGlobalException
in interface OperationObserver
nextGlobalException
in class DefaultOperationObserver
public boolean isIteratedResult()
false
, iterated results are not supported.
isIteratedResult
in interface OperationHints
isIteratedResult
in class DefaultOperationObserver
public void nextBatchCount(Query query, int[] resultCount)
OperationObserver
nextBatchCount
in interface OperationObserver
nextBatchCount
in class DefaultOperationObserver
public void nextCount(Query query, int resultCount)
OperationObserver
nextCount
in interface OperationObserver
nextCount
in class DefaultOperationObserver
public void nextRows(Query query, java.util.List<?> dataRows)
OperationObserver
nextRows
in interface OperationObserver
nextRows
in class DefaultOperationObserver
public void nextRows(Query q, ResultIterator it)
DefaultOperationObserver
nextRows
in interface OperationObserver
nextRows
in class DefaultOperationObserver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |