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
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 |
NotQueryableException
public NotQueryableException(String message)
- Constructor.
- Parameters:
message
- exception message
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