public abstract class AbstractJoSQLFilter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
badQuery |
protected java.lang.Exception |
exp |
protected Query |
q |
Modifier | Constructor and Description |
---|---|
protected |
AbstractJoSQLFilter()
Protected constructor to allow sub-classes to init the query when they are ready.
|
|
AbstractJoSQLFilter(Query q)
Init this file filter with the query already built and parsed.
|
|
AbstractJoSQLFilter(java.lang.String q)
Init this filter with the query.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
accept(java.lang.Object o) |
void |
clearException()
Clear any exception stored.
|
java.lang.Exception |
getException()
Most "filter accept" methods do not allow for any exceptions to be thrown however since
the execution of the WHERE clause on the object can cause the throwing of a
QueryParseException it should be captured. |
abstract java.lang.Class |
getExpectedClass()
Should sub-classes should return the type that they expect to be present in
a Query.
|
Query |
getQuery()
Get the Query we are using to process objects.
|
void |
setQuery(Query q)
Set a new Query object for use in this filter.
|
void |
setQuery(java.lang.String q)
Set a new Query (string form) for use in this filter.
|
protected Query q
protected java.lang.Exception exp
protected boolean badQuery
protected AbstractJoSQLFilter()
public AbstractJoSQLFilter(java.lang.String q) throws QueryParseException
q
- The query.QueryParseException
- If there is an issue with the parsing of the query,
or if the FROM class is not equal to the expected class.public AbstractJoSQLFilter(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 as expected.public abstract java.lang.Class getExpectedClass()
public abstract boolean accept(java.lang.Object o) throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
public void clearException()
public java.lang.Exception getException()
QueryParseException
it should be captured. If the exception is thrown then
this method will return it.accept(Object)
or by sub-class/interface specific methods, this may be null if no exception was thrown.public void setQuery(java.lang.String q) throws QueryParseException
q
- The Query to use.QueryParseException
- If there is an issue with the parsing of the query,
or if the FROM class is not as expected.public void setQuery(Query q) throws java.lang.IllegalStateException, QueryParseException
q
- The Query to use.java.lang.IllegalStateException
- If the Query object has not been parsed.QueryParseException
- If the FROM class is not as expected.public Query getQuery()