org.qi4j.api.query

## Class NotQueryableException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - org.qi4j.api.query.QueryException
        - - org.qi4j.api.query.NotQueryableException

- All Implemented Interfaces:
    Serializable

      public class NotQueryableException
      extends QueryException

  Thrown in case that a non queryable type or accessor (marked with @Queriable(false)) is used during query building, or when non-Property, non-Associations are trying to be queried (possibly can not happen).
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NotQueryableException(String message)` Constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `throwIfNotQueryable(AccessibleObject accessor)` Verify that the provided accessor method has not been marked with a Queryable(false).
    `static void` | `throwIfNotQueryable(Class<?> type)` Verify that the provided type has not been marked with a Queryable(false).

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- - ### Constructor Detail

    - #### NotQueryableException

          public NotQueryableException(String message)

      Constructor.
      Parameters:
        `message` - exception message

  - ### Method Detail

    - #### throwIfNotQueryable

          public static void throwIfNotQueryable(AccessibleObject accessor)

      Verify that the provided accessor method has not been marked with a Queryable(false).
      Parameters:
        `accessor` - accessor method
      Throws:
        `NotQueryableException` - - If accessor method has been marked as not queryable

    - #### throwIfNotQueryable

          public static void throwIfNotQueryable(Class<?> type)

      Verify that the provided type has not been marked with a Queryable(false).
      Parameters:
        `type` - a type
      Throws:
        `NotQueryableException` - - If type has been marked as not queryable