org.objectweb.speedo.query.lib
Class SpeedoCompiledQuery
java.lang.Object
org.objectweb.speedo.query.lib.SpeedoCompiledQuery
- All Implemented Interfaces:
- CacheEntry, CompiledQuery, FixableCacheEntry, ReplaceableCacheEntry, StateFilter
- public class SpeedoCompiledQuery
- extends java.lang.Object
- implements CompiledQuery, StateFilter, ReplaceableCacheEntry
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpeedoCompiledQuery
public SpeedoCompiledQuery()
init
public void init(Logger l,
Logger logParserVar,
Logger logParserFil,
PMapper m,
PrefetchBufferFactory pbf,
JormFactory _jf)
getMapper
public PMapper getMapper()
setMapper
public void setMapper(PMapper m)
setJormFactory
public void setJormFactory(JormFactory jf)
getLogger
public Logger getLogger()
getQueryEvalContext
public QueryEvalContext[] getQueryEvalContext()
getPrefetchBufferFactory
public PrefetchBufferFactory getPrefetchBufferFactory()
isPrefetchResult
public boolean isPrefetchResult()
defineQuery
public void defineQuery(QueryDefinition _qd)
getCeAge
public long getCeAge()
- Specified by:
getCeAge
in interface ReplaceableCacheEntry
setCeAge
public void setCeAge(long _age)
- Specified by:
setCeAge
in interface ReplaceableCacheEntry
fixCe
public void fixCe()
- Specified by:
fixCe
in interface FixableCacheEntry
unfixCe
public void unfixCe()
throws UnFixProtocolException
- Specified by:
unfixCe
in interface FixableCacheEntry
- Throws:
UnFixProtocolException
getCeFixCount
public int getCeFixCount()
- Specified by:
getCeFixCount
in interface FixableCacheEntry
getCeObject
public java.lang.Object getCeObject()
- Specified by:
getCeObject
in interface CacheEntry
getCeIdentifier
public java.lang.Object getCeIdentifier()
- Specified by:
getCeIdentifier
in interface CacheEntry
getDefinition
public QueryDefinition getDefinition()
- Specified by:
getDefinition
in interface CompiledQuery
- Returns:
- the definition of the query if it is defined, null value
otherwise.
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.lang.Object execute(java.lang.Object[] a,
ProxyManager pm,
QueryDefinition userqd)
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:
pm
- the persistence manager objecta
- the array parameter of the queryuserqd
- TODO
- Returns:
- a Collection of result objects
- Throws:
EvaluationException
MedorException
SpeedoException
ExpressionException
execute
public java.lang.Object execute(java.util.Map m,
ProxyManager pm,
QueryDefinition userqd)
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:
pm
- the persistence manager objectm
- the map parameter of the query
- Returns:
- a Collection of result objects
- Throws:
EvaluationException
MedorException
SpeedoException
ExpressionException
getStatus
public short getStatus()
- Specified by:
getStatus
in interface CompiledQuery
- Returns:
- the query status. The possible values are UNDEFINED, DEFINED
or COMPILED.
accept
public boolean accept(State ce)
- Specified by:
accept
in interface StateFilter