|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.query.QueryEvaluator
public abstract class QueryEvaluator
API-agnostic query implementation. An instance of this class performs the actual query. It is used by both APIs, JDO and JPA.
Field Summary | |
---|---|
static String |
RESULTS_SET
Name under which any set of results are stored in the state map. |
Constructor Summary | |
---|---|
QueryEvaluator(String language,
Query query,
QueryCompilation compilation,
Map<String,Object> parameterValues,
ClassLoaderResolver clr,
PersistenceManagerConnection pmConn,
CryptoContext cryptoContext)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RESULTS_SET
Constructor Detail |
---|
public QueryEvaluator(String language, Query query, QueryCompilation compilation, Map<String,Object> parameterValues, ClassLoaderResolver clr, PersistenceManagerConnection pmConn, CryptoContext cryptoContext)
language
- Query language (JDOQL, JPQL, etc)compilation
- generic compilationparameterValues
- Input values for the paramsclr
- ClassLoader resolverpmConn
- our backend-PersistenceManager
connection(s).cryptoContext
- TODOMethod Detail |
---|
public boolean isComplete()
public void setIncomplete()
public String getLanguage()
public String getCandidateAlias()
public Query getQuery()
public QueryCompilation getCompilation()
public Map<String,Object> getParameterValues()
public Map<String,Object> getState()
public ClassLoaderResolver getClassLoaderResolver()
public ExecutionContext getExecutionContext()
public Cumulus4jStoreManager getStoreManager()
public PersistenceManagerConnection getPersistenceManagerConnection()
public PersistenceManager getPersistenceManagerForData()
public PersistenceManager getPersistenceManagerForIndex()
public EncryptionHandler getEncryptionHandler()
public void pushResultDescriptor(ResultDescriptor resultDescriptor)
ResultDescriptor
onto the stack.
resultDescriptor
- the descriptor to be pushed.public ResultDescriptor popResultDescriptor()
ResultDescriptor
from the stack.
public ClassMeta getValueTypeClassMeta(Symbol symbol, boolean throwExceptionIfNotFound)
public EmbeddedClassMeta getValueTypeEmbeddedClassMeta(Symbol symbol)
public void registerValueTypeEmbeddedClassMeta(Symbol symbol, EmbeddedClassMeta embeddedClassMeta)
public Class<?> getValueType(Symbol symbol)
Symbol
's valueType
by taking ResultDescriptor
s into account.
Delegates to getValueType(Symbol, boolean)
with throwExceptionIfNotFound == true
.
symbol
- the symbol whose valueType
should be resolved.
null
.getValueType(Symbol, boolean)
public Class<?> getValueType(Symbol symbol, boolean throwExceptionIfNotFound)
Get a Symbol
's valueType
by taking ResultDescriptor
s into account.
This method (or alternatively getValueType(Symbol)
) should always be used instead of directly
accessing Symbol.getValueType()
!!! This allows for implicit variables (which are not declared).
This method first checks, if Symbol.getValueType()
returns a value and if so, returns it. Otherwise
it searches the stack of ResultDescriptor
s (maintained via pushResultDescriptor(ResultDescriptor)
and popResultDescriptor()
) and returns the first found ResultDescriptor.getResultType()
.
symbol
- the symbol whose valueType
should be resolved.throwExceptionIfNotFound
- whether to throw an IllegalStateException
[exception type might be changed without notice!],
if the type cannot be resolved. If false
this method returns null
instead.
null
, if not resolvable and throwExceptionIfNotFound == false
.getValueType(Symbol)
,
pushResultDescriptor(ResultDescriptor)
,
popResultDescriptor()
protected abstract Collection<Object> evaluateSubquery(Query subquery, QueryCompilation compilation, Object outerCandidate)
public List<Object> execute()
public AbstractExpressionEvaluator<?> getExpressionEvaluator()
public Object getObjectForDataEntry(DataEntry dataEntry)
public Object getObjectForClassMetaAndObjectIDString(ClassMeta classMeta, String objectIDString)
public Set<Long> getAllDataEntryIDsForCandidateClasses(Set<ClassMeta> candidateClassMetas)
public CryptoContext getCryptoContext()
|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |