com.opensymphony.workflow.query
Class NestedExpression

java.lang.Object
  extended by com.opensymphony.workflow.query.Expression
      extended by com.opensymphony.workflow.query.NestedExpression
All Implemented Interfaces:
Serializable

public class NestedExpression
extends Expression

Nested expressions are used when constructing a workflow query. A nested expression consists of:

  • one or more expressions: Each of them can again be a NestedExpression.
  • operator: The operator used to evaluate the value of the nested expression from the specified sub expressions.

    Author:
    Christine Zimmermann
    See Also:
    Serialized Form

    Field Summary
    static int AND
              Constant to specify that all the expressions specified must evaluate to true for an item to be included in the search results.
    static int OR
              Constant to specify that at least one of the expressions specified must evaluate to true for an item to be included in the search results.
     
    Fields inherited from class com.opensymphony.workflow.query.Expression
    negate
     
    Constructor Summary
    NestedExpression()
               
    NestedExpression(Expression[] expressions, int operator)
              Create a NestedExpression that consists of multiple expressions.
     
    Method Summary
     Expression getExpression(int index)
               
     int getExpressionCount()
              Get the number of expressions in this query.
     int getExpressionOperator()
               
     boolean isNested()
               
     void setExpressionOperator(int expressionOperator)
               
     void setExpressions(Expression[] expressions)
               
     
    Methods inherited from class com.opensymphony.workflow.query.Expression
    isNegate
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    AND

    public static final int AND
    Constant to specify that all the expressions specified must evaluate to true for an item to be included in the search results.

    See Also:
    Constant Field Values

    OR

    public static final int OR
    Constant to specify that at least one of the expressions specified must evaluate to true for an item to be included in the search results.

    See Also:
    Constant Field Values
    Constructor Detail

    NestedExpression

    public NestedExpression()

    NestedExpression

    public NestedExpression(Expression[] expressions,
                            int operator)
    Create a NestedExpression that consists of multiple expressions.

    Parameters:
    expressions - an array of expressions for this query.
    operator - AND or OR.
    Method Detail

    getExpression

    public Expression getExpression(int index)

    getExpressionCount

    public int getExpressionCount()
    Get the number of expressions in this query.


    setExpressionOperator

    public void setExpressionOperator(int expressionOperator)

    getExpressionOperator

    public int getExpressionOperator()
    Returns:
    AND if all the expressions must match, or OR if only one must match.

    setExpressions

    public void setExpressions(Expression[] expressions)

    isNested

    public boolean isNested()
    Specified by:
    isNested in class Expression

    OpenSymphony Workflow Project Page