Class GenericSingleConstraintPQuery

  • All Implemented Interfaces:
    PTraceable, PQuery, PQueryHeader

    public class GenericSingleConstraintPQuery
    extends BasePQuery
    This is a generic (i.e. not pattern-specific) class for the internal representation of VIATRA queries, for "interpretative" query execution.

    End users should use {link GenericQuerySpecification} instead.

    Since:
    2.0
    No Instantiate:
    This class is not intended to be instantiated by clients
    • Constructor Detail

      • GenericSingleConstraintPQuery

        public GenericSingleConstraintPQuery​(Pattern parentPattern,
                                             CallableRelation constraint,
                                             java.lang.String queryName)
        Initializes a generic query representation for a given pattern.

        Warning: it is not recommended to directly instantiate GenericPQuery instances as they will not reuse previously built specifications- use SpecificationBuilder instead.

        Parameters:
        pattern - the pattern for which the matcher is to be constructed.
        Throws:
        ViatraQueryRuntimeException
    • Method Detail

      • getPattern

        public Pattern getPattern()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getFullyQualifiedName

        public java.lang.String getFullyQualifiedName()
        Description copied from interface: PQueryHeader
        Identifies the pattern for which matchers can be instantiated.
      • getParameters

        public java.util.List<PParameter> getParameters()
        Description copied from interface: PQueryHeader
        Returns a list of parameter descriptions
        Returns:
        a non-null, but possibly empty list of parameter descriptions
      • doGetContainedBodies

        protected java.util.Set<PBody> doGetContainedBodies()
        Description copied from class: BasePQuery
        Creates and returns the bodies of the query. If recalled again, a new instance is created.
        Specified by:
        doGetContainedBodies in class BasePQuery
        Returns: