org.objectweb.jonas_ejb.container.jorm
Class MedorFactory
java.lang.Object
|
+--org.objectweb.jonas_ejb.container.JFactory
|
+--org.objectweb.jonas_ejb.container.JEntityFactory
|
+--org.objectweb.jonas_ejb.container.jorm.JormFactory
|
+--org.objectweb.jonas_ejb.container.jorm.MedorFactory
- All Implemented Interfaces:
- BeanFactory, org.objectweb.jorm.api.PClassMapping
- Direct Known Subclasses:
- RdbFactory
- public abstract class MedorFactory
- extends JormFactory
This class does the initialisation of Medor and permits to access to the
query. The optimisation of the query tree is done during the first time that
it is used.
- Author:
- S.Chassande-Barrioz
Inner classes inherited from class org.objectweb.jorm.api.PClassMapping |
org.objectweb.jorm.api.PClassMapping.ReferenceConfigurator |
Field Summary |
protected org.objectweb.medor.optim.api.ExecPlanGenerator |
indexesGenerator
|
protected static java.util.Collection |
leafRewriters
|
protected org.objectweb.jorm.metainfo.api.Manager |
miManager
|
protected boolean |
optimizeAtInit
|
protected org.objectweb.medor.optim.api.QueryTransformer |
queryTransformer
This field references the query transformer which must be used to
optimize the medor requests. |
Fields inherited from class org.objectweb.jonas_ejb.container.JEntityFactory |
bctxlist, datasource, entitySwitchUnused, home, instanceCount, localhome, maxCacheSize, minPoolSize, pklist, reentrant, shared |
Fields inherited from interface org.objectweb.jorm.api.PClassMapping |
CLEANUP_DONOTHING, CLEANUP_REMOVEALL, CLEANUP_REMOVEDATA, CREATE_STRUCTURE_IF_NEEDED |
Method Summary |
org.objectweb.medor.tuple.api.TupleCollection |
evaluate(int methodIndex,
org.objectweb.medor.filter.api.ParameterOperand[] parameters)
It evaluate an optimized medor request according to the specified parameters
To evalute the medor request the query evaluator is used. |
org.objectweb.medor.eval.api.QueryEvaluator |
getOptimizedRequest(int methodIndex)
It retrieves a medor request which is evaluable and optimized. |
void |
init(EntityDesc ed,
JContainer c,
java.lang.String mapperName)
|
void |
optimizeAll()
It optimized all medor requests which are already not. |
Methods inherited from class org.objectweb.jonas_ejb.container.JEntityFactory |
bindEJB, calculateAutomaticPk, checkTransaction, existEJB, getCacheSize, getDataSource, getEJB, getEntityCounters, getHome, getJContext, getLocalHome, getMaxCacheSize, getMinPoolSize, getPoolSize, init, isReentrant, isShared, reduceCache, releaseJContext, removeEJB, sync |
Methods inherited from class org.objectweb.jonas_ejb.container.JFactory |
checkJonasVersion, checkTransactionContainer, getContainer, getCorbaInitialContext, getDeploymentDescriptor, getEjb10Environment, getEJBName, getEnv, getInitialContext, getTransactionManager, init, isClassAvailable, isTxBeanManaged, myClassLoader, postInvoke, postInvokeRemote, preInvoke, preInvokeRemote, resetComponentContext, setComponentContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jorm.api.PClassMapping |
configureRefFields, createPBinding, getClassName, getGenClassMapping, getGenClassMapping, getMetaInfo, getPBinder, getPMapper, getPNameIterator, getPNameManager, getPNameManager, init, initMappingStructures, isConform, removeMappingStructures, setGenClassMapping, setGenClassMapping, setPBinder, setPNamingContext, setPNamingContext |
queryTransformer
protected org.objectweb.medor.optim.api.QueryTransformer queryTransformer
- This field references the query transformer which must be used to
optimize the medor requests.
miManager
protected org.objectweb.jorm.metainfo.api.Manager miManager
indexesGenerator
protected org.objectweb.medor.optim.api.ExecPlanGenerator indexesGenerator
optimizeAtInit
protected boolean optimizeAtInit
leafRewriters
protected static final java.util.Collection leafRewriters
MedorFactory
public MedorFactory()
getOptimizedRequest
public org.objectweb.medor.eval.api.QueryEvaluator getOptimizedRequest(int methodIndex)
throws org.objectweb.medor.api.MedorException
- It retrieves a medor request which is evaluable and optimized. The method
index is translate into a request index, then the found request is
optimized if it is not already.
- Parameters:
methodIndex
- is the index of the finder or select method.- Returns:
- the QueryTree optimized which is associated to the method index
optimizeAll
public void optimizeAll()
throws org.objectweb.medor.api.MedorException
- It optimized all medor requests which are already not.
evaluate
public org.objectweb.medor.tuple.api.TupleCollection evaluate(int methodIndex,
org.objectweb.medor.filter.api.ParameterOperand[] parameters)
throws org.objectweb.medor.api.MedorException
- It evaluate an optimized medor request according to the specified parameters
To evalute the medor request the query evaluator is used.
- Parameters:
methodIndex
- is method index which permits to find a medor request.parameters
- is the parameters
(key=parameter name / value=parameter value)- Returns:
- TupleCollection is the result of the request
init
public void init(EntityDesc ed,
JContainer c,
java.lang.String mapperName)
- Overrides:
init
in class JormFactory