org.eclipse.viatra.query.runtime.api

## Class PackageBasedQueryGroup

- java.lang.Object
- - org.eclipse.viatra.query.runtime.api.impl.BaseQueryGroup
  - - org.eclipse.viatra.query.runtime.api.PackageBasedQueryGroup

- All Implemented Interfaces:
    IQueryGroup

      public class PackageBasedQueryGroup
      extends BaseQueryGroup

  Package based `BaseQueryGroup` implementation. It handles patterns as a group within the same package.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PackageBasedQueryGroup(java.lang.String packageName)` Creates a query group with specifications of a given package from the `QuerySpecificationRegistry`.
    `PackageBasedQueryGroup(java.lang.String packageName, boolean includeSubPackages)` Creates a query group with specifications of a given package from the `QuerySpecificationRegistry`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getPackageName()`
    `java.util.Set<IQuerySpecification<?>>` | `getSpecifications()` Returns the currently assigned `IQuerySpecification`s.
    `boolean` | `isIncludeSubPackages()`
    `void` | `refresh()` Refreshes the pattern group from the query specification registry based on the parameters used during the initialization.

    - ### Methods inherited from class org.eclipse.viatra.query.runtime.api.impl.BaseQueryGroup

      `prepare, prepare`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PackageBasedQueryGroup

          public PackageBasedQueryGroup(java.lang.String packageName)

      Creates a query group with specifications of a given package from the `QuerySpecificationRegistry`. Only query specifications with the exact package fully qualified name are included.
      Parameters:
        `packageName` - that contains the specifications

    - #### PackageBasedQueryGroup

          public PackageBasedQueryGroup(java.lang.String packageName,
                                        boolean includeSubPackages)

      Creates a query group with specifications of a given package from the `QuerySpecificationRegistry`.
      Parameters:
        `packageName` - that contain the specifications
        `includeSubPackages` - if true all query specifications with package names starting with the given package are included

  - ### Method Detail

    - #### getSpecifications

          public java.util.Set<IQuerySpecification<?>> getSpecifications()

      Description copied from interface: `IQueryGroup`
      Returns the currently assigned `IQuerySpecification`s.

    - #### getPackageName

          public java.lang.String getPackageName()

    - #### isIncludeSubPackages

          public boolean isIncludeSubPackages()

    - #### refresh

          public void refresh()

      Refreshes the pattern group from the query specification registry based on the parameters used during the initialization.