public class DefaultObjectFilter extends AbstractJoSQLFilter
accept(Object) method is determined by executing the
JoSQL WHERE clause passed in. A "wrapper" is created around the WHERE clause to make it
a fully-formed JoSQL statement.badQuery, exp, q| Constructor and Description |
|---|
DefaultObjectFilter(Query q)
Init this file filter with the query already built and parsed.
|
DefaultObjectFilter(java.lang.String w,
java.lang.Class c)
Init this filter with the where clause, note the class specified will be used in the
FROM clause.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.lang.Object o)
Apply the WHERE clause of the statement to the object passed in.
|
java.lang.Class |
getExpectedClass()
Get the class the Query expects to operate on.
|
clearException, getException, getQuery, setQuery, setQuerypublic DefaultObjectFilter(java.lang.String w,
java.lang.Class c)
throws QueryParseException
w - The where clause.c - The class of the objects to filter.QueryParseException - If there is an issue with the parsing of the query.public DefaultObjectFilter(Query q) throws java.lang.IllegalStateException, QueryParseException
q - The query.java.lang.IllegalStateException - If the Query object has not been parsed.QueryParseException - If the FROM class is not File.public boolean accept(java.lang.Object o)
AbstractJoSQLFilter.getException().accept in class AbstractJoSQLFiltero - The object to evaluate the WHERE on.true if the WHERE clause evaluates to true.public java.lang.Class getExpectedClass()
getExpectedClass in class AbstractJoSQLFilter