|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.josql.filters.AbstractJoSQLFilter
public abstract class AbstractJoSQLFilter
This class just provides a base-abstract implementation that allow "Filters" to be built on top of it.
Field Summary | |
---|---|
protected boolean |
badQuery
|
protected Exception |
exp
|
protected Query |
q
|
Constructor Summary | |
---|---|
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(String q)
Init this filter with the query. |
Method Summary | |
---|---|
abstract boolean |
accept(Object o)
|
void |
clearException()
Clear any exception stored. |
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 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(String q)
Set a new Query (string form) for use in this filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Query q
protected Exception exp
protected boolean badQuery
Constructor Detail |
---|
protected AbstractJoSQLFilter()
public AbstractJoSQLFilter(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 IllegalStateException, QueryParseException
q
- The query.
IllegalStateException
- If the Query object has not been parsed.
QueryParseException
- If the FROM class is not as expected.Method Detail |
---|
public abstract Class getExpectedClass()
public abstract boolean accept(Object o) throws UnsupportedOperationException
UnsupportedOperationException
public void clearException()
public 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(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 IllegalStateException, QueryParseException
q
- The Query to use.
IllegalStateException
- If the Query object has not been parsed.
QueryParseException
- If the FROM class is not as expected.public Query getQuery()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |