|
|||||||||
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.util.SelectObserver
public class SelectObserver
OperationObserver that accumulates select query results provided by callback methods.
Later the results can be retrieved via different getResults
methods.
Also supports instantiating DataObjects within a provided DataContext.
This class is used as a default OperationObserver by DataContext. Also it can serve as a helper for classes that work with DataNode directly, bypassing DataContext.
If exceptions happen during the execution, they are immediately rethrown.
For more information see Cayenne User Guide.
QueryResult
Field Summary | |
---|---|
protected java.util.Map |
results
Deprecated. |
protected int |
selectCount
Deprecated. |
Fields inherited from class org.apache.cayenne.access.util.DefaultOperationObserver |
---|
DEFAULT_LOG_LEVEL, globalExceptions, queryExceptions |
Constructor Summary | |
---|---|
SelectObserver()
Deprecated. |
|
SelectObserver(org.apache.log4j.Level logLevel)
Deprecated. since 1.2 |
Method Summary | |
---|---|
void |
clear()
Deprecated. Clears fetched objects stored in an internal list. |
java.util.Map |
getResults()
Deprecated. Returns query results accumulated during query execution with this object as an operation observer. |
java.util.List |
getResults(Query q)
Deprecated. Returns a list of result snapshots for the specified query, or null if this query has never produced any results. |
java.util.List |
getResultsAsObjects(DataContext dataContext,
Query rootQuery)
Deprecated. since 1.2. Note that this implementation no longer resolves prefetches properly. |
int |
getSelectCount()
Deprecated. Returns a count of select queries that returned results since the last time "clear" was called, or since this object was created. |
void |
nextDataRows(Query query,
java.util.List dataRows)
Deprecated. Stores all objects in dataRows in an internal result list. |
void |
nextGlobalException(java.lang.Exception ex)
Deprecated. Overrides superclass implementation to rethrow an exception immediately. |
void |
nextQueryException(Query query,
java.lang.Exception ex)
Deprecated. Overrides super implementation to rethrow an exception immediately. |
Methods inherited from class org.apache.cayenne.access.util.DefaultOperationObserver |
---|
getGlobalExceptions, getLoggingLevel, getQueryExceptions, hasExceptions, isIteratedResult, nextBatchCount, nextCount, nextDataRows, nextGeneratedDataRows, printExceptions, setLoggingLevel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map results
protected int selectCount
Constructor Detail |
---|
public SelectObserver()
public SelectObserver(org.apache.log4j.Level logLevel)
Method Detail |
---|
public int getSelectCount()
public java.util.List getResults(Query q)
public java.util.Map getResults()
public void clear()
public void nextDataRows(Query query, java.util.List dataRows)
dataRows
in an internal result list.
nextDataRows
in interface OperationObserver
nextDataRows
in class DefaultOperationObserver
public java.util.List getResultsAsObjects(DataContext dataContext, Query rootQuery)
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |