org.objectweb.speedo.query.ejb
Class EJBCompiledQuery

java.lang.Object
  extended by org.objectweb.speedo.query.lib.AbstractCompiledQuery
      extended by org.objectweb.speedo.query.ejb.EJBCompiledQuery
All Implemented Interfaces:
CacheEntry, FixableCacheEntry, ReplaceableCacheEntry, StateFilter, CompiledQuery

public class EJBCompiledQuery
extends AbstractCompiledQuery


Field Summary
 
Fields inherited from class org.objectweb.speedo.query.lib.AbstractCompiledQuery
age, classLoader, fixCount, jf, logger, mapper, pncParams, prefetchBufferFactory, status, userCache, userCacheIndexes
 
Fields inherited from interface org.objectweb.speedo.query.api.CompiledQuery
COMPILED, DEFINED, UNDEFINED
 
Constructor Summary
EJBCompiledQuery()
           
 
Method Summary
 void compile()
          Compiles the query if it is not already done.
 void defineQuery(EJBQueryDefinitionImpl _qd)
           
 java.lang.Object execute(java.util.Map parameters, POManagerItf pm, QueryDefinition qd)
           
 java.lang.Object execute(java.lang.Object[] parameters, POManagerItf pm, QueryDefinition qd)
          Executes the compiled query.
 java.lang.Object getCeIdentifier()
           
 QueryDefinition getDefinition()
           
 void setMapper(org.objectweb.jorm.api.PMapper m)
           
 
Methods inherited from class org.objectweb.speedo.query.lib.AbstractCompiledQuery
accept, assignMapper, fixCe, getCeAge, getCeFixCount, getCeObject, getFieldComparaison, getLogger, getMapper, getPrefetchBufferFactory, getPType, getStatus, init, setCeAge, setJormFactory, unfixCe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBCompiledQuery

public EJBCompiledQuery()
Method Detail

setMapper

public void setMapper(org.objectweb.jorm.api.PMapper m)
Specified by:
setMapper in class AbstractCompiledQuery

getCeIdentifier

public java.lang.Object getCeIdentifier()

getDefinition

public QueryDefinition getDefinition()
Returns:
the definition of the query if it is defined, null value otherwise.

defineQuery

public void defineQuery(EJBQueryDefinitionImpl _qd)

compile

public void compile()
             throws SpeedoException,
                    MedorException,
                    org.objectweb.medor.expression.api.ExpressionException
Description copied from interface: CompiledQuery
Compiles the query if it is not already done.

Throws:
SpeedoException
MedorException
org.objectweb.medor.expression.api.ExpressionException

execute

public java.lang.Object execute(java.lang.Object[] parameters,
                                POManagerItf pm,
                                QueryDefinition qd)
                         throws SpeedoException,
                                MedorException,
                                org.objectweb.medor.expression.api.ExpressionException
Description copied from interface: CompiledQuery
Executes the compiled query.

Parameters:
parameters - is the JDO parameters of query (does not contains internal parameter). The order of parameter must match the parameter declaration.
pm - is the po manager representing the execution context. It also used to load the instance in the result collection.
qd - TODO
Returns:
a list or one persistent instance depending on the unique flag. The result can be null only if the result is unique.
Throws:
SpeedoException
MedorException
org.objectweb.medor.expression.api.ExpressionException

execute

public java.lang.Object execute(java.util.Map parameters,
                                POManagerItf pm,
                                QueryDefinition qd)
                         throws SpeedoException,
                                MedorException,
                                org.objectweb.medor.expression.api.ExpressionException
Throws:
SpeedoException
MedorException
org.objectweb.medor.expression.api.ExpressionException