org.qi4j.api.query.grammar

## Class QuerySpecification

- java.lang.Object
- - org.qi4j.api.query.grammar.QuerySpecification

- All Implemented Interfaces:
    Specification<Composite>

      public class QuerySpecification
      extends Object
      implements Specification<Composite>

  This should be used when doing native queries, such as SQL, SPARQL or similar. EntityFinders can choose what type of query languages they can understand by checking the language property of a QuerySpecification

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `QuerySpecification(String language, String query)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `isQueryLanguage(String language, Specification<Composite> specification)`
    `String` | `language()`
    `String` | `query()`
    `boolean` | `satisfiedBy(Composite item)` Test whether an item matches the given specification
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### QuerySpecification

          public QuerySpecification(String language,
                            String query)

  - ### Method Detail

    - #### isQueryLanguage

          public static boolean isQueryLanguage(String language,
                                Specification<Composite> specification)

    - #### language

          public String language()

    - #### query

          public String query()

    - #### satisfiedBy

          public boolean satisfiedBy(Composite item)

      Description copied from interface: `Specification`
      Test whether an item matches the given specification
      Specified by:
        `satisfiedBy` in interface `Specification<Composite>`
      Parameters:
        `item` - the item to be tested
      Returns:
        true if the item matches, false otherwise

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`