Package org.eclipse.birt.report.model.api

# Class StyleRuleHandle

java.lang.Object
org.eclipse.birt.report.model.api.ElementDetailHandle
org.eclipse.birt.report.model.api.ValueHandle
org.eclipse.birt.report.model.api.StructureHandle
org.eclipse.birt.report.model.api.StyleRuleHandle

Direct Known Subclasses:
  `HighlightRuleHandle`, `MapRuleHandle`

public abstract class StyleRuleHandle extends StructureHandle
Represents the handle of style rule. This abstract class provides the common methods for `HighlightRuleHandle` and `MapRuleHandle`. The style rule provides the operator, value1, and value2 to compute boolean result.

## Field Summary

### Fields inherited from class org.eclipse.birt.report.model.api.StructureHandle

`structContext`

### Fields inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle

`elementHandle`

## Constructor Summary

Constructors
Constructor
Description
`StyleRuleHandle(SimpleValueHandle valueHandle, int index)`
Constructs the handle of style rule.

## Method Summary

Modifier and Type
Method
Description
`String`
`getOperator()`
Returns the operator.
`String`
`getValue1()`
Returns the value 1.
`ExpressionListHandle`
`getValue1ExpressionList()`
Gets the value1 expression list.
`List`
`getValue1List()`
Deprecated.
`getValue1ExpressionList()`
`String`
`getValue2()`
Returns the value 2.
`void`
`setOperator(String operator)`
Sets the operator.
`void`
`setValue1(String value1)`
Sets the value 1.
`void`
`setValue1(List value1List)`
Sets the value 1 expression list.
`void`
`setValue2(String value2)`
Sets the value 2.

### Methods inherited from class org.eclipse.birt.report.model.api.StructureHandle

`drop, getContext, getDefn, getExpressionProperty, getExternalizedValue, getExternalizedValue, getIntProperty, getMember, getProperty, getPropertyDefn, getStringProperty, getStructure, isDesignTime, isLocal, iterator, setDesignTime, setExpressionProperty, setProperty, setPropertySilently`

### Methods inherited from class org.eclipse.birt.report.model.api.ValueHandle

`getReference`

### Methods inherited from class org.eclipse.birt.report.model.api.ElementDetailHandle

`getDesign, getElement, getElementHandle, getModule`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### StyleRuleHandle

public StyleRuleHandle(SimpleValueHandle valueHandle, int index)
Constructs the handle of style rule.

Parameters:
  `valueHandle` - the value handle for style rule list of one property
  `index` - the position of this style rule in the list

## Method Details

### getOperator

public String getOperator()
Returns the operator. The possible values are defined in `DesignChoiceConstants`, and they are:

- MAP_OPERATOR_EQ
- MAP_OPERATOR_NE
- MAP_OPERATOR_LT
- MAP_OPERATOR_LE
- MAP_OPERATOR_GE
- MAP_OPERATOR_GT
- MAP_OPERATOR_BETWEEN
- MAP_OPERATOR_NOT_BETWEEN
- MAP_OPERATOR_NULL
- MAP_OPERATOR_NOT_NULL
- MAP_OPERATOR_TRUE
- MAP_OPERATOR_FALSE
- MAP_OPERATOR_LIKE
- MAP_OPERATOR_ANY

Returns:
  the operator

### setOperator

public void setOperator(String operator) throws SemanticException
Sets the operator. The allowed values are defined in `DesignChoiceConstants`, and they are:

- MAP_OPERATOR_EQ
- MAP_OPERATOR_NE
- MAP_OPERATOR_LT
- MAP_OPERATOR_LE
- MAP_OPERATOR_GE
- MAP_OPERATOR_GT
- MAP_OPERATOR_BETWEEN
- MAP_OPERATOR_NOT_BETWEEN
- MAP_OPERATOR_NULL
- MAP_OPERATOR_NOT_NULL
- MAP_OPERATOR_TRUE
- MAP_OPERATOR_FALSE
- MAP_OPERATOR_LIKE
- MAP_OPERATOR_ANY

Parameters:
  `operator` - the operator to set
Throws:
  `SemanticException` - if operator is not in the choice list.

### getValue1

public String getValue1()
Returns the value 1.

Returns:
  the value 1

### getValue1List

@Deprecated public List getValue1List()
Deprecated.
`getValue1ExpressionList()`
Gets the value1 expression list. For most map operator, there is only one expression in the returned list. However, map operator 'in' may contain more than one expression.

Returns:
  the value1 expression list.

### getValue1ExpressionList

public ExpressionListHandle getValue1ExpressionList()
Gets the value1 expression list. For most map operator, there is only one expression in the returned list. However, map operator 'in' may contain more than one expression.

Returns:
  the value1 expression list handle

### setValue1

public void setValue1(String value1)
Sets the value 1.

Parameters:
  `value1` - the value 1 to set

### setValue1

public void setValue1(List value1List) throws SemanticException
Sets the value 1 expression list.

Parameters:
  `value1List` - the value 1 expression list to set
Throws:
  `SemanticException` - if the instance in the list is not valid

### getValue2

public String getValue2()
Returns the value 2.

Returns:
  the value 2

### setValue2

public void setValue2(String value2)
Sets the value 2.

Parameters:
  `value2` - the value 2 to set