|
|||||||||
| Home >> All >> org >> objectstyle >> cayenne >> access >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.objectstyle.cayenne.access.util
Class SelectObserver

java.lang.Objectorg.objectstyle.cayenne.access.util.DefaultOperationObserver
org.objectstyle.cayenne.access.util.SelectObserver
- All Implemented Interfaces:
- org.objectstyle.cayenne.access.OperationHints, org.objectstyle.cayenne.access.OperationObserver
- Direct Known Subclasses:
- ContextSelectObserver
- public class SelectObserver
- extends DefaultOperationObserver
OperationObserver that accumulates select query results provided
by callback methods. Later the results can be retrieved
via different getResults methods.
This class can serve as a helper for classes that work with DataNode directly, bypassing DataContext. Also it is used by DataContext to implement "data rows" functionality - retrieving data without instantiating and registering DataObjects.
If exceptions happen during the execution, they are immediately rethrown.
For more information see Cayenne User Guide.
| Field Summary | |
protected java.util.Map |
results
|
protected int |
selectCount
|
| Fields inherited from class org.objectstyle.cayenne.access.util.DefaultOperationObserver |
DEFAULT_LOG_LEVEL, globalExceptions, loggingLevel, queryExceptions, transactionCommitted, transactionRolledback |
| Constructor Summary | |
SelectObserver()
|
|
SelectObserver(org.apache.log4j.Level logLevel)
|
|
| Method Summary | |
void |
clear()
Clears fetched objects stored in an internal list. |
java.util.Map |
getResults()
Returns query results accumulated during query execution with this object as an operation observer. |
java.util.List |
getResults(org.objectstyle.cayenne.query.Query q)
Returns a list of result snapshots for the specified query, or null if this query has never produced any results. |
int |
getSelectCount()
Returns a count of select queries that returned results since the last time "clear" was called, or since this object was created. |
void |
nextDataRows(org.objectstyle.cayenne.query.Query query,
java.util.List dataRows)
Stores all objects in dataRows in an internal
result list. |
void |
nextGlobalException(java.lang.Exception ex)
Overrides superclass implementation to rethrow an exception immediately. |
void |
nextQueryException(org.objectstyle.cayenne.query.Query query,
java.lang.Exception ex)
Overrides superclass implementation to rethrow an exception immediately. |
| Methods inherited from class org.objectstyle.cayenne.access.util.DefaultOperationObserver |
getGlobalExceptions, getLoggingLevel, getQueryExceptions, hasExceptions, isIteratedResult, isTransactionCommitted, isTransactionRolledback, nextBatchCount, nextCount, nextDataRows, printExceptions, setLoggingLevel, transactionCommitted, transactionRolledback, useAutoCommit |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
results
protected java.util.Map results
selectCount
protected int selectCount
| Constructor Detail |
SelectObserver
public SelectObserver()
SelectObserver
public SelectObserver(org.apache.log4j.Level logLevel)
| Method Detail |
getSelectCount
public int getSelectCount()
- Returns a count of select queries that returned results
since the last time "clear" was called, or since this object
was created.
getResults
public java.util.List getResults(org.objectstyle.cayenne.query.Query q)
- Returns a list of result snapshots for the specified query,
or null if this query has never produced any results.
getResults
public java.util.Map getResults()
- Returns query results accumulated during query execution with this
object as an operation observer.
clear
public void clear()
- Clears fetched objects stored in an internal list.
nextDataRows
public void nextDataRows(org.objectstyle.cayenne.query.Query query, java.util.List dataRows)
- Stores all objects in
dataRowsin an internal result list.- Specified by:
nextDataRowsin interfaceorg.objectstyle.cayenne.access.OperationObserver- Overrides:
nextDataRowsin classDefaultOperationObserver
nextQueryException
public void nextQueryException(org.objectstyle.cayenne.query.Query query, java.lang.Exception ex)
- Overrides superclass implementation to rethrow an exception
immediately.
- Specified by:
nextQueryExceptionin interfaceorg.objectstyle.cayenne.access.OperationObserver- Overrides:
nextQueryExceptionin classDefaultOperationObserver
nextGlobalException
public void nextGlobalException(java.lang.Exception ex)
- Overrides superclass implementation to rethrow an exception
immediately.
- Specified by:
nextGlobalExceptionin interfaceorg.objectstyle.cayenne.access.OperationObserver- Overrides:
nextGlobalExceptionin classDefaultOperationObserver
|
|||||||||
| Home >> All >> org >> objectstyle >> cayenne >> access >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC