public interface PQuery extends PQueryHeader
IQueryBackend
).
End-users of IncQuery should access a query as an IQuerySpecification instead.
PQuerys are definitions of queries usable inside pattern descriptions. Such description always has (a non-null) name. The query
itself is defined as a (non-empty) set of PBody
instances, the result is the disjunction of the single
PBody
instances.
A PQuery might be constructed from erroneous patterns or might be uninitialized - this is represented by its status.
Modifier and Type | Interface and Description |
---|---|
static class |
PQuery.PQueryStatus |
Modifier and Type | Method and Description |
---|---|
void |
checkMutability()
Before a modification operation is executed, a mutability check is performed (via the
getStatus()
implementation, and in case of problems an IllegalStateException is thrown. |
void |
ensureInitialized()
If the query definition is uninitialized, initializes it.
|
java.util.Set<PQuery> |
getAllReferredQueries()
Returns all queries required to evaluate this query (transitively).
|
java.util.Set<PQuery> |
getDirectReferredQueries()
Returns all queries directly referred in the constraints.
|
PDisjunction |
getDisjunctBodies()
Returns all bodies associated with the query in their canonical form.
|
QueryEvaluationHint |
getEvaluationHints()
Optional hints regarding the query evaluation strategy, to be interpreted by the query engine.
|
java.util.List<PProblem> |
getPProblems()
Returns a list describing the problems that were found in this query.
|
PQuery.PQueryStatus |
getStatus()
Returns the initialization status of the definition
|
boolean |
isMutable()
An option to check mutability of the query.
|
java.util.List<java.lang.Object> |
publishedAs()
Returns the end-user query specification API objects that wrap this query.
|
getAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getFullyQualifiedName, getParameterNames, getParameters, getPositionOfParameter
PDisjunction getDisjunctBodies()
java.util.Set<PQuery> getDirectReferredQueries()
java.util.Set<PQuery> getAllReferredQueries()
PQuery.PQueryStatus getStatus()
java.util.List<PProblem> getPProblems()
TODO: formulate invariant connecting getPProblems()
and getStatus()
.
void checkMutability() throws java.lang.IllegalStateException
getStatus()
implementation, and in case of problems an IllegalStateException
is thrown.java.lang.IllegalStateException
boolean isMutable()
IllegalStateException
by
the execution of checkMutability()
.QueryEvaluationHint getEvaluationHints()
To ensure the possibility of external overrides,
the evaluation engine should not directly consult this field,
but use an IQueryBackendHintProvider
instead.
void ensureInitialized() throws QueryInitializationException
QueryInitializationException
- if initialization of query specification failsjava.util.List<java.lang.Object> publishedAs()
Intended for traceability and debug purposes, not part of normal operation. Returned list is intended to be appended during query specification construction time.