org.jaffa.persistence.engines.jdbcengine.interceptor
Class QueryInterceptor

java.lang.Object
  extended byorg.jaffa.persistence.engines.jdbcengine.interceptor.AbstractInterceptor
      extended byorg.jaffa.persistence.engines.jdbcengine.interceptor.QueryInterceptor

public class QueryInterceptor
extends AbstractInterceptor

This is the Interceptor which queries the database.


Constructor Summary
QueryInterceptor()
           
 
Method Summary
 Object invoke(PersistentTransaction pt)
          Performs the logic associated with querying the database.
 
Methods inherited from class org.jaffa.persistence.engines.jdbcengine.interceptor.AbstractInterceptor
getNextInterceptor, setNextInterceptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryInterceptor

public QueryInterceptor()
Method Detail

invoke

public Object invoke(PersistentTransaction pt)
              throws UOWException
Performs the logic associated with querying the database. It will perform queries for each Criteria object in the PersistentTransaction's QUERY collection. Ideally there will be just one Criteria object in the collection. Control will be passed to the next interceptor in the chain, if any, else a Collection will be returned containing the Results of the last query.

Specified by:
invoke in class AbstractInterceptor
Parameters:
pt - The PersistentTransaction object, on which the Interceptor is to be executed.
Returns:
the output from the next Interceptor in the chain, if any, else a Collection will be returned containing the Results of the last query. However, for a Criteria having a StoredProcedure, the output will be null.
Throws:
UOWException - if any error occurs.


Copyright © 2002-2004 JAFFA Project.