Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.data.engine.api.querydefn
Class ConditionalExpression

    java.lang.Object
      org.eclipse.birt.data.engine.api.querydefn.BaseExpression
          org.eclipse.birt.data.engine.api.querydefn.ConditionalExpression

All Implemented Interfaces:
  IBaseExpression, IConditionalExpression

    public class ConditionalExpression

extends BaseExpression
implements IConditionalExpression

Default implementation of `IConditionalExpression` interface.

Field Summary
`protected IScriptExpression` | `expr`
`protected IBaseExpression` | `op1`
`protected IBaseExpression` | `op2`
`protected int` | `operator`

Fields inherited from class org.eclipse.birt.data.engine.api.querydefn.BaseExpression
`dataType, handle`

Fields inherited from interface org.eclipse.birt.data.engine.api.IConditionalExpression
`OP_BETWEEN, OP_BOTTOM_N, OP_BOTTOM_PERCENT, OP_EQ, OP_FALSE, OP_GE, OP_GT, OP_IN, OP_JOINT, OP_LE, OP_LIKE, OP_LT, OP_MATCH, OP_NE, OP_NONE, OP_NOT_BETWEEN, OP_NOT_IN, OP_NOT_LIKE, OP_NOT_MATCH, OP_NOT_NULL, OP_NULL, OP_TOP_N, OP_TOP_PERCENT, OP_TRUE`

Fields inherited from interface org.eclipse.birt.data.engine.api.IBaseExpression
`GROUP_OVERALL`

Constructor Summary
`ConditionalExpression(IScriptExpression expr, int operator, IBaseExpression op1, IBaseExpression op2)` Constructs an instance, setting main expression, operator, and operands
`ConditionalExpression(IScriptExpression expr, int operator, java.util.List operand)`
`ConditionalExpression(java.lang.String expr, int operator)` Constructs an instance, setting main expression and the operator (which takes no operands)
`ConditionalExpression(java.lang.String expr, int operator, java.util.List operand)` Constructs an instance, setting main expression, a unary operator, and its Collection operand
`ConditionalExpression(java.lang.String expr, int operator, java.lang.String operand1)` Constructs an instance, setting main expression, a unary operator, and its operand
`ConditionalExpression(java.lang.String expr, int operator, java.lang.String operand1, java.lang.String operand2)` Constructs an instance, setting main expression, a binary operator, and its two operands

Method Summary
`int` | `getDataType()` Gets the data type of the expression.
`IScriptExpression` | `getExpression()` Gets the main expression
`IBaseExpression` | `getOperand1()` Gets the expression for operand 1.
`IBaseExpression` | `getOperand2()` Gets the expression for operand 2.
`int` | `getOperator()` Gets the operator.
`void` | `setDataType(int dataType)` Sets the data type of the expression.
`void` | `setGroupName(java.lang.String groupName)` Set the group name this expession belongs to.
`void` | `setOperator(int operator)`

Methods inherited from class org.eclipse.birt.data.engine.api.querydefn.BaseExpression
`getGroupName, getHandle, getScriptId, setHandle, setScriptId`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.birt.data.engine.api.IBaseExpression
`getGroupName, getHandle, getScriptId, setHandle, setScriptId`

Field Detail

### expr

    protected IScriptExpression expr

### operator

    protected int operator

### op1

    protected IBaseExpression op1

### op2

    protected IBaseExpression op2

Constructor Detail

### ConditionalExpression

    public ConditionalExpression(java.lang.String expr,
                                 int operator)

  Constructs an instance, setting main expression and the operator (which takes no operands)

### ConditionalExpression

    public ConditionalExpression(java.lang.String expr,
                                 int operator,
                                 java.lang.String operand1)

  Constructs an instance, setting main expression, a unary operator, and its operand

### ConditionalExpression

    public ConditionalExpression(java.lang.String expr,
                                 int operator,
                                 java.lang.String operand1,
                                 java.lang.String operand2)

  Constructs an instance, setting main expression, a binary operator, and its two operands

### ConditionalExpression

    public ConditionalExpression(IScriptExpression expr,
                                 int operator,
                                 IBaseExpression op1,
                                 IBaseExpression op2)

  Constructs an instance, setting main expression, operator, and operands

### ConditionalExpression

    public ConditionalExpression(java.lang.String expr,
                                 int operator,
                                 java.util.List operand)

  Constructs an instance, setting main expression, a unary operator, and its Collection operand

### ConditionalExpression

    public ConditionalExpression(IScriptExpression expr,
                                 int operator,
                                 java.util.List operand)

Method Detail

### getExpression

    public IScriptExpression getExpression()

  Description copied from interface: `IConditionalExpression`
  Gets the main expression

  Specified by:
    `getExpression` in interface `IConditionalExpression`
  See Also:
    `IConditionalExpression.getExpression()`

### getOperator

    public int getOperator()

  Description copied from interface: `IConditionalExpression`
  Gets the operator.

  Specified by:
    `getOperator` in interface `IConditionalExpression`
  Returns:
    The operator specified using one of the OP_xxx enumeration values defined in this interface.
  See Also:
    `IConditionalExpression.getOperator()`

### getOperand1

    public IBaseExpression getOperand1()

  Description copied from interface: `IConditionalExpression`
  Gets the expression for operand 1.

  Specified by:
    `getOperand1` in interface `IConditionalExpression`
  See Also:
    `IConditionalExpression.getOperand1()`

### setOperator

    public void setOperator(int operator)

### getOperand2

    public IBaseExpression getOperand2()

  Description copied from interface: `IConditionalExpression`
  Gets the expression for operand 2.

  Specified by:
    `getOperand2` in interface `IConditionalExpression`
  See Also:
    `IConditionalExpression.getOperand2()`

### getDataType

    public int getDataType()

  Description copied from interface: `IBaseExpression`
  Gets the data type of the expression. Acceptable return values are those enumeration constants defined in the `org.eclipse.birt.core.data.DataType` class. If the result data type of the expression is not known, return `UNKNOWN_TYPE`.

  Specified by:
    `getDataType` in interface `IBaseExpression`
  Overrides:
    `getDataType` in class `BaseExpression`
  See Also:
    `IBaseExpression.getDataType()`

### setDataType

    public void setDataType(int dataType)

  Sets the data type of the expression. For conditional expression, only `BOOLEAN_TYPE` is expected.

  Overrides:
    `setDataType` in class `BaseExpression`

### setGroupName

    public void setGroupName(java.lang.String groupName)

  Description copied from interface: `IBaseExpression`
  Set the group name this expession belongs to.

  Specified by:
    `setGroupName` in interface `IBaseExpression`
  Overrides:
    `setGroupName` in class `BaseExpression`
  See Also:
    `IBaseExpression.setGroupName(String)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 Actuate Corp. All rights reserved.