butler.sql.filter
Class ForeignKeyFilter

java.lang.Object
  extended by butler.sql.filter.Filter
      extended by butler.sql.filter.ForeignKeyFilter
Direct Known Subclasses:
ForeignKeySetFilter

public class ForeignKeyFilter
extends Filter

Filter for columns in a forein key constraint.

Author:
Fredrik Bertilsson

Field Summary
protected  java.lang.String _alias
           
protected  ForeignKey _fk
           
protected  Operator _operator
           
protected  java.util.List _values
           
 
Constructor Summary
ForeignKeyFilter(ForeignKey fk)
           
ForeignKeyFilter(ForeignKey fk, java.util.List values)
           
ForeignKeyFilter(ForeignKey fk, Record rec)
           
ForeignKeyFilter(ForeignKey fk, java.lang.String alias)
           
 
Method Summary
 java.lang.String getCaption()
           
 ForeignKey getFK()
           
 Operator getOperator()
          Returns operator if operators is used, otherwise returning null.
 java.util.List getParamDatatypes()
           
 java.lang.String getSQL()
           
 java.util.List getValues()
           
 java.util.List params2db(java.util.List params)
           
static Filter parse(org.dom4j.Element element, java.util.Map tableDictonary)
           
 void populate(Populatable qi, java.lang.Object value)
           
 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, filter, getFilter, getId, getLeafFilters, getNestedQuery, getValues, hashCode, modify, not, or, parseFilter, registerFilterParser, setCaption, setId, setSize, setSize, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_fk

protected ForeignKey _fk

_alias

protected java.lang.String _alias

_operator

protected Operator _operator

_values

protected java.util.List _values
Constructor Detail

ForeignKeyFilter

public ForeignKeyFilter(ForeignKey fk)
                 throws java.lang.Exception
Throws:
java.lang.Exception

ForeignKeyFilter

public ForeignKeyFilter(ForeignKey fk,
                        java.util.List values)
                 throws java.lang.Exception
Throws:
java.lang.Exception

ForeignKeyFilter

public ForeignKeyFilter(ForeignKey fk,
                        Record rec)
                 throws java.lang.Exception
Throws:
java.lang.Exception

ForeignKeyFilter

public ForeignKeyFilter(ForeignKey fk,
                        java.lang.String alias)
                 throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getFK

public ForeignKey getFK()

setOperator

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

Overrides:
setOperator in class Filter

getOperator

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

Overrides:
getOperator 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,
                     java.lang.Object value)
              throws java.lang.Exception
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

params2db

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

getCaption

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

getValues

public java.util.List getValues()
Overrides:
getValues in class Filter

getParamDatatypes

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