com.ibm.commerce.condition
Class OpenCondition

java.lang.Object
  |
  +--com.ibm.commerce.condition.Condition
        |
        +--com.ibm.commerce.condition.OpenCondition
All Implemented Interfaces:
ConditionConstants

public final class OpenCondition
extends Condition

This class describes an open condition boolean expression. An open condition consists of a name and a set of parameters.


Nested Class Summary
static class OpenCondition.Parameter
          This class describes an open condition parameter.
 
Field Summary
static java.lang.String COPYRIGHT
          Copyright.
 
Fields inherited from interface com.ibm.commerce.condition. ConditionConstants
AND_LIST_CONDITION, OPEN_CONDITION, OPERATOR_CONTAINS, OPERATOR_DOES_NOT_CONTAIN, OPERATOR_DOES_NOT_END_WITH, OPERATOR_DOES_NOT_START_WITH, OPERATOR_ENDS_WITH, OPERATOR_EQUAL_TO, OPERATOR_GREATER_THAN, OPERATOR_GREATER_THAN_OR_EQUAL_TO, OPERATOR_LESS_THAN, OPERATOR_LESS_THAN_OR_EQUAL_TO, OPERATOR_NOT_EQUAL_TO, OPERATOR_STARTS_WITH, OR_LIST_CONDITION, SIMPLE_CONDITION, TRUE_CONDITION, XML_DTD_FRAGMENT, XML_INDENT
 
Constructor Summary
OpenCondition(java.lang.String name)
          This constructor lets you specify the open condition name.
OpenCondition(java.lang.String name, OpenCondition.Parameter parameter)
          This constructor lets you specify the open condition name and a single parameter.
OpenCondition(java.lang.String name, OpenCondition.Parameter[] parameters)
          This constructor lets you specify the open condition name and an array of parameter objects.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this condition object.
 boolean evaluate( Evaluator evaluator)
          This method evaluates the open condition.
 java.lang.String getName()
          Gets the name of the open condition.
  OpenCondition.Parameter[] getParameters()
          Gets the array of parameter objects.
 void setName(java.lang.String name)
          Sets the name of the open condition.
 void setParameters( OpenCondition.Parameter[] parameters)
          Sets the array of parameter objects.
 
Methods inherited from class com.ibm.commerce.condition. Condition
getNot, getType, getXMLFragment, loadConditionFromXML, setNot, setType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
Copyright.
See Also:
Constant Field Values
Constructor Detail

OpenCondition

public OpenCondition(java.lang.String name)
This constructor lets you specify the open condition name.
Parameters:
name - Open condition name.

OpenCondition

public OpenCondition(java.lang.String name,
OpenCondition.Parameter parameter)
This constructor lets you specify the open condition name and a single parameter.
Parameters:
name - Open condition name.
parameter - Open condition parameter.

OpenCondition

public OpenCondition(java.lang.String name,
OpenCondition.Parameter[] parameters)
This constructor lets you specify the open condition name and an array of parameter objects.
Parameters:
name - Open condition name.
parameters - An array of open condition parameter objects.
Method Detail

clone

public java.lang.Object clone()
Description copied from class: Condition
Returns a clone of this condition object.
Specified by:
clone in class Condition
Returns:
A clone of this condition object.

getName

public java.lang.String getName()
Gets the name of the open condition.
Returns:
The name of the open condition.

setName

public void setName(java.lang.String name)
Sets the name of the open condition.
Parameters:
name - The name of the open condition.

getParameters

public OpenCondition.Parameter[] getParameters()
Gets the array of parameter objects.
Returns:
The array of parameter objects.

setParameters

public void setParameters(OpenCondition.Parameter[] parameters)
Sets the array of parameter objects.
Parameters:
parameters - An array of parameter objects.

evaluate

public boolean evaluate(Evaluator evaluator)
This method evaluates the open condition. The Evaluator implementation is called to evaluate the open condition. Note that the result will be negated if the not property is true.
Specified by:
evaluate in class Condition
Parameters:
evaluator - An implementation of the Evaluator interface that is used to evaluate the open conditions.
Returns:
true if the condition is true.