org.opensubsystems.patterns.listdata.data
Class SimpleRule

java.lang.Object
  extended by org.opensubsystems.patterns.listdata.data.SimpleRule
All Implemented Interfaces:
java.io.Serializable

public class SimpleRule
extends java.lang.Object
implements java.io.Serializable

This class represents set of data conditions which are connected with logical operation and can be used to filter or match data object. Since only single operator such as AND or OR is used to connect all data condition it is considered to be a simple rule (as oposed to complex rule where these operations could be mixed).

Version:
$Id: SimpleRule.java,v 1.5 2007/03/24 08:34:17 bastafidli Exp $
Author:
Peter Satury
See Also:
Serialized Form
Code reviewer:
Miro Halas
Code reviewed:
1.2 2004/12/18 06:18:41 bastafidli

Field Summary
static SimpleRule ALL_DATA
          This rule matches all data
static int LOGICAL_AND
          AND operation code
static int LOGICAL_OR
          OR operation code
protected  java.util.List m_conditions
          List of DataCondition objects connected with the logical operation.
protected  int m_iLogicalOperation
          Logical operation to connect data condition.
 
Constructor Summary
SimpleRule()
          Default constructor.
SimpleRule(int iLogicalOperation, java.util.List conditions)
          Constructor with all parameters
 
Method Summary
 java.util.List getConditions()
           
 int getInterConditionOperation()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGICAL_AND

public static final int LOGICAL_AND
AND operation code

See Also:
Constant Field Values

LOGICAL_OR

public static final int LOGICAL_OR
OR operation code

See Also:
Constant Field Values

ALL_DATA

public static final SimpleRule ALL_DATA
This rule matches all data


m_iLogicalOperation

protected int m_iLogicalOperation
Logical operation to connect data condition. Use one of LOGICAL_XXX constants.


m_conditions

protected java.util.List m_conditions
List of DataCondition objects connected with the logical operation.

Constructor Detail

SimpleRule

public SimpleRule()
Default constructor.


SimpleRule

public SimpleRule(int iLogicalOperation,
                  java.util.List conditions)
Constructor with all parameters

Parameters:
iLogicalOperation - - logical operation to connect data condition. Use one of LOGICAL_XXX constants.
conditions - - list of DataConditions
Method Detail

getConditions

public java.util.List getConditions()
Returns:
List - list of DataCondition objects, can be null

getInterConditionOperation

public int getInterConditionOperation()
Returns:
int - logical operation, one of LOGICAL_XXX constants


Copyright © 2003 - 2006 OpenSubsystems s.r.o.