butler.sql.filter
Class Filter
java.lang.Object
butler.sql.filter.Filter
- Direct Known Subclasses:
- BooleanFilter, DummyFilter, ForeignKeyFilter, IsNullFilter, JoinFilter, MultipleColumnFilter, PrimaryKeyFilter, QBEFilter, RangeFilter, RecursiveFilter, ScrollFilter, SecurityFilter, SetFilter, SimpleFilter, SQLFilter, TemporalFilter
public class Filter
- extends java.lang.Object
Filter used in database queries. A filter represents entire or
part of the where-clause in a select SQL statement.
- Author:
- Fredrik Bertilsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Filter
public Filter()
Filter
public Filter(java.lang.String id)
setSize
public void setSize(int size)
setSize
public int setSize()
getNestedQuery
public Query getNestedQuery()
getSQL
public java.lang.String getSQL()
throws java.lang.Exception
- Throws:
java.lang.Exception
setId
public void setId(java.lang.Object id)
getId
public java.lang.Object getId()
getCaption
public java.lang.String getCaption()
throws java.lang.Exception
- Throws:
java.lang.Exception
setCaption
public void setCaption(java.lang.String caption)
params2db
public java.util.List params2db(java.util.List params)
throws java.lang.Exception
- Throws:
java.lang.Exception
toXML
public java.lang.String toXML()
throws java.lang.Exception
- Throws:
java.lang.Exception
toXML
public void toXML(org.xml.sax.ContentHandler handler)
throws java.lang.Exception
- Throws:
java.lang.Exception
equals
public boolean equals(Filter other)
parseFilter
public static Filter parseFilter(org.dom4j.Element element,
java.util.Map tableDictonary)
throws java.lang.Exception
- Throws:
java.lang.Exception
getLeafFilters
public java.util.List getLeafFilters()
getOperator
public Operator getOperator()
- Returns operator if operators is used, otherwise returning null.
setOperator
public void setOperator(Operator op)
- Sets the operator if operators is used
getValues
public java.util.List getValues()
throws java.lang.Exception
- Throws:
java.lang.Exception
getValues
public java.util.List getValues(QueryParams params)
throws java.lang.Exception
- Throws:
java.lang.Exception
copy
public Filter copy()
throws java.lang.Exception
- Throws:
java.lang.Exception
registerFilterParser
public static void registerFilterParser(java.lang.String filterName,
FilterParser parser)
modify
public Filter modify(QueryParams params)
throws java.lang.Exception
- Throws:
java.lang.Exception
filter
public boolean filter(Record rec)
throws java.lang.Exception
- Throws:
java.lang.Exception
and
public AndFilter and(Filter filter)
throws java.lang.Exception
- Throws:
java.lang.Exception
or
public OrFilter or(Filter filter)
throws java.lang.Exception
- Throws:
java.lang.Exception
not
public NotFilter not()
throws java.lang.Exception
- Throws:
java.lang.Exception
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
getFilter
public Filter getFilter(java.lang.Object id)
getParamDatatypes
public java.util.List getParamDatatypes()
throws java.lang.Exception
- Throws:
java.lang.Exception
createId
public int createId(int lastId)