public abstract class BasePQuery extends java.lang.Object implements PQuery
PQuery.PQueryStatus
Constructor and Description |
---|
BasePQuery() |
Modifier and Type | Method and Description |
---|---|
void |
checkMutability()
Before a modification operation is executed, a mutability check is performed (via the
PQuery.getStatus()
implementation, and in case of problems an IllegalStateException is thrown. |
void |
ensureInitialized()
If the query definition is uninitialized, initializes it.
|
void |
ensureInitializedSneaky() |
java.util.List<PAnnotation> |
getAllAnnotations()
Returns the list of annotations specified for this query
|
java.util.Set<PQuery> |
getAllReferredQueries()
Returns all queries required to evaluate this query (transitively).
|
java.util.List<PAnnotation> |
getAnnotationsByName(java.lang.String annotationName)
Returns the list of annotations with a specified name
|
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.
|
PAnnotation |
getFirstAnnotationByName(java.lang.String annotationName)
Returns the first annotation with a specified name
|
java.util.List<java.lang.String> |
getParameterNames()
Return the list of parameter names
|
java.lang.Integer |
getPositionOfParameter(java.lang.String parameterName)
Returns the index of a named parameter
|
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFullyQualifiedName, getParameters
public java.lang.Integer getPositionOfParameter(java.lang.String parameterName)
PQueryHeader
getPositionOfParameter
in interface PQueryHeader
public PQuery.PQueryStatus getStatus()
PQuery
public java.util.List<PProblem> getPProblems()
PQuery
TODO: formulate invariant connecting PQuery.getPProblems()
and PQuery.getStatus()
.
getPProblems
in interface PQuery
public boolean isMutable()
PQuery
IllegalStateException
by
the execution of PQuery.checkMutability()
.public void checkMutability() throws java.lang.IllegalStateException
PQuery
PQuery.getStatus()
implementation, and in case of problems an IllegalStateException
is thrown.checkMutability
in interface PQuery
java.lang.IllegalStateException
public QueryEvaluationHint getEvaluationHints()
PQuery
To ensure the possibility of external overrides,
the evaluation engine should not directly consult this field,
but use an IQueryBackendHintProvider
instead.
getEvaluationHints
in interface PQuery
public java.util.List<PAnnotation> getAllAnnotations()
PQueryHeader
getAllAnnotations
in interface PQueryHeader
public java.util.List<PAnnotation> getAnnotationsByName(java.lang.String annotationName)
PQueryHeader
getAnnotationsByName
in interface PQueryHeader
public PAnnotation getFirstAnnotationByName(java.lang.String annotationName)
PQueryHeader
getFirstAnnotationByName
in interface PQueryHeader
public java.util.List<java.lang.String> getParameterNames()
PQueryHeader
getParameterNames
in interface PQueryHeader
public java.util.Set<PQuery> getDirectReferredQueries()
PQuery
getDirectReferredQueries
in interface PQuery
public java.util.Set<PQuery> getAllReferredQueries()
PQuery
getAllReferredQueries
in interface PQuery
public java.util.List<java.lang.Object> publishedAs()
PQuery
Intended for traceability and debug purposes, not part of normal operation. Returned list is intended to be appended during query specification construction time.
publishedAs
in interface PQuery
public PDisjunction getDisjunctBodies()
PQuery
getDisjunctBodies
in interface PQuery
public final void ensureInitialized() throws QueryInitializationException
PQuery
ensureInitialized
in interface PQuery
QueryInitializationException
- if initialization of query specification failspublic final void ensureInitializedSneaky()