public class GenericEMFPatternPQuery extends BasePQuery implements InitializablePQuery
End users should use {link GenericQuerySpecification} instead.
PQuery.PQueryStatuspProblems, status, visibility| Constructor and Description |
|---|
GenericEMFPatternPQuery(Pattern pattern)
Initializes a generic query representation for a given pattern.
|
GenericEMFPatternPQuery(Pattern pattern,
boolean delayedInitialization)
Initializes a generic query specification for a given pattern.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAnnotation(PAnnotation annotation)
Adds an annotation to the specification.
|
void |
addError(PProblem problem)
Adds a detected error.
|
protected java.util.Set<PBody> |
doGetContainedBodies()
Creates and returns the bodies of the query.
|
boolean |
equals(java.lang.Object obj) |
PDisjunction |
getDisjunctBodies()
Returns all bodies associated with the query in their canonical form.
|
java.lang.String |
getFullyQualifiedName()
Identifies the pattern for which matchers can be instantiated.
|
java.util.List<PParameter> |
getParameters()
Returns a list of parameter descriptions
|
Pattern |
getPattern() |
int |
hashCode() |
void |
initializeBodies(java.util.Set<PBody> bodies)
Sets up the bodies of the pattern.
|
void |
setStatus(PQuery.PQueryStatus newStatus)
Sets the query status.
|
checkMutability, ensureInitialized, getAllAnnotations, getAllReferredQueries, getAnnotationsByName, getDirectReferredQueries, getEvaluationHints, getFirstAnnotationByName, getParameterNames, getPositionOfParameter, getPProblems, getStatus, getTypeGuarantees, getVisibility, isMutable, publishedAs, setBodies, setEvaluationHints, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcheckMutability, ensureInitialized, getAllReferredQueries, getDirectReferredQueries, getEvaluationHints, getPProblems, getStatus, getTypeGuarantees, isMutable, publishedAsgetAllAnnotations, getAnnotationsByName, getFirstAnnotationByName, getParameter, getParameterNames, getPositionOfParameter, getSimpleName, getVisibilitypublic GenericEMFPatternPQuery(Pattern pattern)
Warning: it is not recommended to directly instantiate GenericPQuery instances as
they will not reuse previously built specifications- use SpecificationBuilder instead.
pattern - the pattern for which the matcher is to be constructed.ViatraQueryRuntimeExceptionpublic GenericEMFPatternPQuery(Pattern pattern, boolean delayedInitialization)
pattern - the pattern for which matchers are to be constructed.delayedInitialization - true if the query is not created automatically - in this case before use the
initializeBodies(Set) methodViatraQueryRuntimeExceptionpublic Pattern getPattern()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getFullyQualifiedName()
PQueryHeadergetFullyQualifiedName in interface PQueryHeaderpublic java.util.List<PParameter> getParameters()
PQueryHeadergetParameters in interface PQueryHeaderpublic PDisjunction getDisjunctBodies()
PQuerygetDisjunctBodies in interface PQuerygetDisjunctBodies in class BasePQuerypublic void addAnnotation(PAnnotation annotation)
InitializablePQueryuninitialized.addAnnotation in interface InitializablePQueryaddAnnotation in class BasePQueryprotected java.util.Set<PBody> doGetContainedBodies()
BasePQuerydoGetContainedBodies in class BasePQuerypublic void initializeBodies(java.util.Set<PBody> bodies)
InitializablePQueryuninitialized.initializeBodies in interface InitializablePQuerypublic final void setStatus(PQuery.PQueryStatus newStatus)
InitializablePQueryuninitialized.setStatus in interface InitializablePQuerysetStatus in class BasePQuerynewStatus - the new statuspublic void addError(PProblem problem)
InitializablePQueryuninitialized.addError in interface InitializablePQueryaddError in class BasePQueryproblem - the new problem