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:
- java.io.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
Method Summary |
static void |
throwIfNotQueryable(java.lang.reflect.AccessibleObject accessor)
Verify that the provided accessor method has not been marked with a Queryable(false). |
static void |
throwIfNotQueryable(java.lang.Class<?> type)
Verify that the provided type 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 |
NotQueryableException
public NotQueryableException(java.lang.String message)
- Constructor.
- Parameters:
message
- exception message
throwIfNotQueryable
public static void throwIfNotQueryable(java.lang.reflect.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(java.lang.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