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(String w,
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(Object o)
Apply the WHERE clause of the statement to the object passed in.
|
Class |
getExpectedClass()
Get the class the Query expects to operate on.
|
clearException, getException, getQuery, setQuery, setQuerypublic DefaultObjectFilter(String w, 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 IllegalStateException, QueryParseException
q - The query.IllegalStateException - If the Query object has not been parsed.QueryParseException - If the FROM class is not File.public boolean accept(Object o)
AbstractJoSQLFilter.getException().accept in class AbstractJoSQLFiltero - The object to evaluate the WHERE on.true if the WHERE clause evaluates to true.public Class getExpectedClass()
getExpectedClass in class AbstractJoSQLFilter