org.qi4j.api.query
Class NotQueryableException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.qi4j.api.query.QueryException
                  extended by 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
NotQueryableException(String message)
          Constructor.
 
Method Summary
static void throwIfNotQueryable(Class<?> type)
          Verify that the provided type has not been marked with a Queryable(false).
static void throwIfNotQueryable(Method accessor)
          Verify that the provided accessor method has not been marked with a Queryable(false).
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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(Method 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