net.datacrow.core.data
Class DataFilterEntry

java.lang.Object
  extended by net.datacrow.core.data.DataFilterEntry

public class DataFilterEntry
extends java.lang.Object

A data filter entry belongs to a data filter.

Author:
Robert Jan van der Waals

Field Summary
static java.lang.String _AND
           
static java.lang.String _OR
           
 
Constructor Summary
DataFilterEntry()
           
DataFilterEntry(int module, int field, Operator operator, java.lang.Object value)
          Creates a filter entry.
DataFilterEntry(java.lang.String andOr, int module, int field, Operator operator, java.lang.Object value)
          Creates a filter entry.
 
Method Summary
 java.lang.String getAndOr()
          Indicates if the filter entry should be treated as an and or a or condition.
 int getField()
           
 int getID()
          The ID of the filter entry.
 int getModule()
           
 Operator getOperator()
           
 java.lang.Object getValue()
           
 boolean isAnd()
          Indicates if the filter entry should be treated as an and condition.
 boolean isOr()
          Indicates if the filter entry should be treated as an or condition.
 void setAndOr(java.lang.String andOr)
          Specifies if the entry should be treated as an and or an or condition.
 void setField(int field)
           
 void setModule(int module)
           
 void setOperator(Operator operator)
           
 void setValue(java.lang.Object value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_AND

public static final java.lang.String _AND

_OR

public static final java.lang.String _OR
Constructor Detail

DataFilterEntry

public DataFilterEntry()

DataFilterEntry

public DataFilterEntry(int module,
                       int field,
                       Operator operator,
                       java.lang.Object value)
Creates a filter entry.

Parameters:
module - The module to which the specified field belongs.
field - The field to be checked on.
operator - The operator.
value - The value used to test against the input.

DataFilterEntry

public DataFilterEntry(java.lang.String andOr,
                       int module,
                       int field,
                       Operator operator,
                       java.lang.Object value)
Creates a filter entry.

Parameters:
andOr - _AND or _OR
module - The module to which the specified field belongs.
field - The field to be checked on.
operator - The operator.
value - The value used to test against the input.
Method Detail

getID

public int getID()
The ID of the filter entry.


setModule

public void setModule(int module)

setField

public void setField(int field)

setOperator

public void setOperator(Operator operator)

setAndOr

public void setAndOr(java.lang.String andOr)
Specifies if the entry should be treated as an and or an or condition.

Parameters:
andOr -
See Also:
_AND, _OR

getAndOr

public java.lang.String getAndOr()
Indicates if the filter entry should be treated as an and or a or condition.

See Also:
_AND, _OR

isOr

public boolean isOr()
Indicates if the filter entry should be treated as an or condition.


isAnd

public boolean isAnd()
Indicates if the filter entry should be treated as an and condition.


getField

public int getField()

getModule

public int getModule()

getOperator

public Operator getOperator()

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object value)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object