org.objectweb.speedo.query.lib
Class SpeedoCompiledQuery

java.lang.Object
  extended byorg.objectweb.speedo.query.lib.SpeedoCompiledQuery
All Implemented Interfaces:
CompiledQuery

public class SpeedoCompiledQuery
extends java.lang.Object
implements CompiledQuery

SpeedoCompiledQuery object represents a query. This object is created when a new query is created, and can be used several times. A list of SpeedoCompiledQuery is managed with a SpeedoQueryManager object. When a user creates a new JDO Query object (SpeedoQuery), a SpeedoCompiledQuery object is associated to the SpeedoQuery object which is used to delegate some methods.


Field Summary
static boolean prefetchResult
           
 
Fields inherited from interface org.objectweb.speedo.query.api.CompiledQuery
COMPILED, DEFINED, UNDEFINED
 
Constructor Summary
SpeedoCompiledQuery()
           
 
Method Summary
 boolean accept(State ce)
           
 void compile()
          compile the current SpeedoCompiledQuery.
 void defineQuery(QueryDefinition _qd)
           
 java.util.Collection execute(java.util.Map m, ProxyManager pm)
          evaluate the query with a single parameter which is a Map of object parameters.
 java.util.Collection execute(java.lang.Object[] a, ProxyManager pm)
          evaluate the query with a single parameter which is a array of object parameters.
 void fixCe()
           
 long getCeAge()
           
 int getCeFixCount()
           
 java.lang.Object getCeIdentifier()
           
 java.lang.Object getCeObject()
           
 PMapper getMapper()
           
 short getStatus()
           
 void init(Logger l, Logger logParserVar, Logger logParserFil, PMapper m, JormFactory jf)
           
 void setCeAge(long age)
           
 void setJormFactory(JormFactory jf)
           
 void setMapper(PMapper m)
           
 void unfixCe()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefetchResult

public static boolean prefetchResult
Constructor Detail

SpeedoCompiledQuery

public SpeedoCompiledQuery()
Method Detail

init

public void init(Logger l,
                 Logger logParserVar,
                 Logger logParserFil,
                 PMapper m,
                 JormFactory jf)

getMapper

public PMapper getMapper()

setMapper

public void setMapper(PMapper m)

setJormFactory

public void setJormFactory(JormFactory jf)

defineQuery

public void defineQuery(QueryDefinition _qd)

getCeAge

public long getCeAge()

setCeAge

public void setCeAge(long age)

fixCe

public void fixCe()

unfixCe

public void unfixCe()
             throws UnFixProtocolException
Throws:
UnFixProtocolException

getCeFixCount

public int getCeFixCount()

getCeObject

public java.lang.Object getCeObject()

getCeIdentifier

public java.lang.Object getCeIdentifier()

compile

public void compile()
             throws SpeedoException,
                    MedorException,
                    ExpressionException
compile the current SpeedoCompiledQuery. The query is prepared to be executed. The PersistenceManager is set (even if there was a previous definition of a PersistenceManager.

Specified by:
compile in interface CompiledQuery
Throws:
SpeedoException
MedorException
ExpressionException

execute

public java.util.Collection execute(java.lang.Object[] a,
                                    ProxyManager pm)
                             throws SpeedoException,
                                    MedorException,
                                    ExpressionException
evaluate the query with a single parameter which is a array of object parameters.

Specified by:
execute in interface CompiledQuery
Parameters:
a - the array parameter of the query
pm - the persistence manager object
Returns:
a Collection of result objects
Throws:
org.objectweb.medor.api.EvaluationException
org.objectweb.medor.api.MedorException
SpeedoException
MedorException
ExpressionException

execute

public java.util.Collection execute(java.util.Map m,
                                    ProxyManager pm)
                             throws SpeedoException,
                                    MedorException,
                                    ExpressionException
evaluate the query with a single parameter which is a Map of object parameters.

Specified by:
execute in interface CompiledQuery
Parameters:
m - the map parameter of the query
pm - the persistence manager object
Returns:
a Collection of result objects
Throws:
org.objectweb.medor.api.EvaluationException
org.objectweb.medor.api.MedorException
SpeedoException
MedorException
ExpressionException

getStatus

public short getStatus()
Specified by:
getStatus in interface CompiledQuery

accept

public boolean accept(State ce)