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, waitgetFullyQualifiedName, getParameterspublic java.lang.Integer getPositionOfParameter(java.lang.String parameterName)
PQueryHeadergetPositionOfParameter in interface PQueryHeaderpublic PQuery.PQueryStatus getStatus()
PQuerypublic java.util.List<PProblem> getPProblems()
PQuery TODO: formulate invariant connecting PQuery.getPProblems() and PQuery.getStatus().
getPProblems in interface PQuerypublic boolean isMutable()
PQueryIllegalStateException by
the execution of PQuery.checkMutability().public void checkMutability()
throws java.lang.IllegalStateException
PQueryPQuery.getStatus()
implementation, and in case of problems an IllegalStateException is thrown.checkMutability in interface PQueryjava.lang.IllegalStateExceptionpublic 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 PQuerypublic java.util.List<PAnnotation> getAllAnnotations()
PQueryHeadergetAllAnnotations in interface PQueryHeaderpublic java.util.List<PAnnotation> getAnnotationsByName(java.lang.String annotationName)
PQueryHeadergetAnnotationsByName in interface PQueryHeaderpublic PAnnotation getFirstAnnotationByName(java.lang.String annotationName)
PQueryHeadergetFirstAnnotationByName in interface PQueryHeaderpublic java.util.List<java.lang.String> getParameterNames()
PQueryHeadergetParameterNames in interface PQueryHeaderpublic java.util.Set<PQuery> getDirectReferredQueries()
PQuerygetDirectReferredQueries in interface PQuerypublic java.util.Set<PQuery> getAllReferredQueries()
PQuerygetAllReferredQueries in interface PQuerypublic java.util.List<java.lang.Object> publishedAs()
PQueryIntended 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 PQuerypublic PDisjunction getDisjunctBodies()
PQuerygetDisjunctBodies in interface PQuerypublic final void ensureInitialized()
throws QueryInitializationException
PQueryensureInitialized in interface PQueryQueryInitializationException - if initialization of query specification failspublic final void ensureInitializedSneaky()