butler.sql.filter
Class SetFilter

java.lang.Object
  extended by butler.sql.filter.Filter
      extended by butler.sql.filter.SetFilter
Direct Known Subclasses:
In

public class SetFilter
extends Filter

Filter that checks if a column values belongs to a given set of values ("in").

Author:
Fredrik Bertilsson

Constructor Summary
SetFilter(Column col)
           
SetFilter(Column col, java.util.Collection values)
           
SetFilter(java.lang.String alias, Column col)
           
SetFilter(java.lang.String alias, Column col, java.util.Collection values)
           
 
Method Summary
 boolean filter(Record rec)
           
 Column getColumn()
           
 Operator getOperator()
          Returns operator if operators is used, otherwise returning null.
 java.util.List getParamDatatypes()
           
 java.lang.String getSQL()
           
 java.util.List getValues()
           
 Filter modify(QueryParams params)
           
static Filter parse(org.dom4j.Element element, java.util.Map tableDictonary)
           
 void populate(Populatable qi)
           
 void populate(Populatable qi, java.util.Set values)
           
 void setOperator(Operator operator)
          Sets the operator if operators is used
 void toXML(org.xml.sax.ContentHandler handler)
           
 
Methods inherited from class butler.sql.filter.Filter
and, copy, createId, equals, getCaption, getFilter, getId, getLeafFilters, getNestedQuery, getValues, hashCode, not, or, params2db, parseFilter, registerFilterParser, setCaption, setId, setSize, setSize, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetFilter

public SetFilter(Column col)

SetFilter

public SetFilter(java.lang.String alias,
                 Column col)

SetFilter

public SetFilter(Column col,
                 java.util.Collection values)

SetFilter

public SetFilter(java.lang.String alias,
                 Column col,
                 java.util.Collection values)
Method Detail

getColumn

public Column getColumn()

getOperator

public Operator getOperator()
Description copied from class: Filter
Returns operator if operators is used, otherwise returning null.

Overrides:
getOperator in class Filter

setOperator

public void setOperator(Operator operator)
Description copied from class: Filter
Sets the operator if operators is used

Overrides:
setOperator in class Filter

getSQL

public java.lang.String getSQL()
                        throws java.lang.Exception
Overrides:
getSQL in class Filter
Throws:
java.lang.Exception

populate

public void populate(Populatable qi)
              throws java.lang.Exception
Throws:
java.lang.Exception

populate

public void populate(Populatable qi,
                     java.util.Set values)
              throws java.lang.Exception
Throws:
java.lang.Exception

getParamDatatypes

public java.util.List getParamDatatypes()
                                 throws java.lang.Exception
Overrides:
getParamDatatypes in class Filter
Throws:
java.lang.Exception

toXML

public void toXML(org.xml.sax.ContentHandler handler)
           throws java.lang.Exception
Overrides:
toXML in class Filter
Throws:
java.lang.Exception

parse

public static Filter parse(org.dom4j.Element element,
                           java.util.Map tableDictonary)
                    throws java.lang.Exception
Throws:
java.lang.Exception

filter

public boolean filter(Record rec)
               throws java.lang.Exception
Overrides:
filter in class Filter
Throws:
java.lang.Exception

getValues

public java.util.List getValues()
                         throws java.lang.Exception
Overrides:
getValues in class Filter
Throws:
java.lang.Exception

modify

public Filter modify(QueryParams params)
              throws java.lang.Exception
Overrides:
modify in class Filter
Throws:
java.lang.Exception