javax.rad.model.condition
Class CompareCondition

java.lang.Object
  extended by javax.rad.model.condition.BaseCondition
      extended by javax.rad.model.condition.CompareCondition
All Implemented Interfaces:
Serializable, Cloneable, ICondition
Direct Known Subclasses:
Equals, Greater, GreaterEquals, Less, LessEquals, Like, LikeIgnoreCase, LikeReverse, LikeReverseIgnoreCase

public abstract class CompareCondition
extends BaseCondition

Thats the base Class for all CompareConditions.
e.g. Equals, ...

See Also:
Serialized Form

Constructor Summary
CompareCondition()
          Constructs the base for a CompareCondition.
CompareCondition(IDataRow pDataRow, String pColumnName)
          Constructs the base for a CompareCondition, with a column, the IDataRow to check and if null values should be ignored.
CompareCondition(IDataRow pDataRow, String pColumnName, boolean pIgnoreNull)
          Constructs the base for a CompareCondition, with a column, the IDataRow to check and that null values will be ignored. setIgnoreNull(true).
CompareCondition(IDataRow pDataRow, String pDataRowColumnName, String pColumnName)
          Constructs the base for a CompareCondition, with a column, the IDataRow to check, the column name to use in the IDataRow to get the value and that null values will be ignored. setIgnoreNull(true).
CompareCondition(IDataRow pDataRow, String pDataRowColumnName, String pColumnName, boolean pIgnoreNull)
          Constructs the base for a CompareCondition, with a column, the IDataRow to check, the column name to use in the IDataRow to get the value and if null values should be ignored.
CompareCondition(String pColumnName, Object pValue)
          Constructs the base for a CompareCondition, with a column, the value to check and that null values will be ignored. setIgnoreNull(false)
CompareCondition(String pColumnName, Object pValue, boolean pIgnoreNull)
          Constructs the base for a CompareCondition, with a column, the value to check and if null values should be ignored.
 
Method Summary
 ICondition clone()
          Return a clone of the specific ICondition.
 String getColumnName()
          Returns the column name to use in the compare.
 IDataRow getDataRow()
          Returns the data row to use in the compare.
 String getDataRowColumnName()
          Returns the data row column name to use in the compare.
 Object getValue()
          Returns the value to use in the compare.
 boolean isFulfilled(IDataRow pDataRow)
          Returns true, if the ICondition is fulfilled.
protected abstract  boolean isFulfilled(IDataType pDataType, Object pValue)
          It checks if the pValue fulfill the ICondition, under usage of the specified IDataType.
 boolean isIgnoreNull()
          Returns if null values will be ignored.
 void setColumnName(String pColumnName)
          Sets the column name to use in the compare.
 void setIgnoreNull(boolean pIgnoreNull)
          Sets if null values will be ignored.
 void setValue(Object pValue)
          Sets the value to use in the compare.
 
Methods inherited from class javax.rad.model.condition.BaseCondition
and, or, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompareCondition

public CompareCondition()
Constructs the base for a CompareCondition.


CompareCondition

public CompareCondition(String pColumnName,
                        Object pValue)
Constructs the base for a CompareCondition, with a column, the value to check and that null values will be ignored. setIgnoreNull(false)

Parameters:
pColumnName - the column name to use for the compare operation
pValue - the value to use in the compare.

CompareCondition

public CompareCondition(String pColumnName,
                        Object pValue,
                        boolean pIgnoreNull)
Constructs the base for a CompareCondition, with a column, the value to check and if null values should be ignored.

Parameters:
pColumnName - the column name to use for the compare operation
pValue - the value to use in the compare.
pIgnoreNull - determines if null values should be ignored.

CompareCondition

public CompareCondition(IDataRow pDataRow,
                        String pColumnName)
Constructs the base for a CompareCondition, with a column, the IDataRow to check and if null values should be ignored. It uses the column name of the ComparCondition for the column name in the IDataRow to get the value.

Parameters:
pDataRow - the IDataRow to use for the compare.
pColumnName - the column name to use for the compare operation

CompareCondition

public CompareCondition(IDataRow pDataRow,
                        String pColumnName,
                        boolean pIgnoreNull)
Constructs the base for a CompareCondition, with a column, the IDataRow to check and that null values will be ignored. setIgnoreNull(true). It uses the column name of the ComparCondition for the column name in the IDataRow to get the value.

Parameters:
pDataRow - the IDataRow to use for the compare.
pColumnName - the column name to use for the compare operation
pIgnoreNull - determines if null values should be ignored.

CompareCondition

public CompareCondition(IDataRow pDataRow,
                        String pDataRowColumnName,
                        String pColumnName)
Constructs the base for a CompareCondition, with a column, the IDataRow to check, the column name to use in the IDataRow to get the value and that null values will be ignored. setIgnoreNull(true).

Parameters:
pDataRow - the IDataRow to use for the compare.
pDataRowColumnName - the column name in the IDataRow to use for the compare.
pColumnName - the column name to use for the compare operation

CompareCondition

public CompareCondition(IDataRow pDataRow,
                        String pDataRowColumnName,
                        String pColumnName,
                        boolean pIgnoreNull)
Constructs the base for a CompareCondition, with a column, the IDataRow to check, the column name to use in the IDataRow to get the value and if null values should be ignored.

Parameters:
pDataRow - the IDataRow to use for the compare.
pDataRowColumnName - the column name in the IDataRow to use for the compare.
pColumnName - the column name to use for the compare operation
pIgnoreNull - determines if null values should be ignored.
Method Detail

isFulfilled

protected abstract boolean isFulfilled(IDataType pDataType,
                                       Object pValue)
It checks if the pValue fulfill the ICondition, under usage of the specified IDataType.

Parameters:
pDataType - the IDataType to use for the compare operation
pValue - the value to check against.
Returns:
true, if the ICondition is fulfilled.

isFulfilled

public boolean isFulfilled(IDataRow pDataRow)
Returns true, if the ICondition is fulfilled.

Parameters:
pDataRow - the IDataRow to use for the check of this ICondition.
Returns:
true, if the ICondition is fulfilled.

clone

public ICondition clone()
Return a clone of the specific ICondition.

Specified by:
clone in interface ICondition
Overrides:
clone in class BaseCondition
Returns:
a clone of the specific ICondition.

getColumnName

public String getColumnName()
Returns the column name to use in the compare.

Returns:
the column name to use in the compare.

setColumnName

public void setColumnName(String pColumnName)
Sets the column name to use in the compare.

Parameters:
pColumnName - the column name to use in the compare.

getDataRow

public IDataRow getDataRow()
Returns the data row to use in the compare.

Returns:
the data row to use in the compare.

getDataRowColumnName

public String getDataRowColumnName()
Returns the data row column name to use in the compare.

Returns:
the data row column name to use in the compare.

getValue

public Object getValue()
Returns the value to use in the compare.

Returns:
the value to use in the compare.

setValue

public void setValue(Object pValue)
Sets the value to use in the compare.

Parameters:
pValue - the value to use in the compare.

isIgnoreNull

public boolean isIgnoreNull()
Returns if null values will be ignored.

Returns:
if null values will be ignored.

setIgnoreNull

public void setIgnoreNull(boolean pIgnoreNull)
Sets if null values will be ignored.

Parameters:
pIgnoreNull - true, if null values will be ignored.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.