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

# Class FilterExprDefinition

java.lang.Object
org.eclipse.birt.report.model.api.filterExtension.FilterExprDefinition

All Implemented Interfaces:
  `IFilterExprDefinition`

public class FilterExprDefinition extends Object implements IFilterExprDefinition
FilterExprDefinition

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`birtFilterDisplayName`
BIRT predefined filter expression operator display name.
`protected String`
`birtFilterExprId`
Filter operator defined by BIRT.
`protected int`
`maxArgs`
The max number of arguments that this filter operator required.
`protected int`
`minArgs`
The min number of arguments that this filter operator required.
`protected boolean`
`supportUnboundedMaxArgs`
Indicates if this filter operator expression support unlimited max number of arguments.
`protected static final int`
`UNDEFINED`

### Fields inherited from interface org.eclipse.birt.report.model.api.filterExtension.interfaces.IFilterExprDefinition

`BIRT_SUPPORT_ONLY, EXPR_MAPPING_SUPPORTED, EXTENSION_SUPPORT_ONLY`

## Constructor Summary

Constructors
Constructor
Description
`FilterExprDefinition()`
`FilterExprDefinition(String birtFilterExpr)`
Constructor for FilterExprDefinition by BIRT predefined filter expression operator id.

## Method Summary

Modifier and Type
Method
Description
`int`
`expressionSupportedType()`
Returns the expression supported type of this FilterExprDefinition.
`String`
`getBirtFilterExprDisplayName()`
Return the corresponding BIRT predefined Filter expression operator display name.
`String`
`getBirtFilterExprDisplayName(com.ibm.icu.util.ULocale locale)`
Return the corresponding BIRT predefined Filter expression operator display name.
`String`
`getBirtFilterExprId()`
Returns the BIRT predefined filter expression operator internal name.
`String`
`getExtFilterDisplayName()`
Returns the display name of this Filter expression.
`String`
`getExtFilterExprId()`
Returns the ODA filter extension filter expression id if there is.
`Integer`
`getMaxArguments()`
Returns the number of arguments that this filter definition can maximize supported.
`Integer`
`getMinArguments()`
Returns the min arguments required by this filter expression definition.
`String`
`getProviderExtensionId()`
Returns the ODA filter extension provider ID if there is.
`protected void`
`initBirtExpr(int birtOperator)`
`boolean`
`isNegatedExtExprId()`
Indicates whether the expression is mapped to the negated data base expression, i.e.
`boolean`
`supportsAPIDataType(int apiDataType)`
Indicates whether the given API type is supported by this filter operator.
`boolean`
`supportsUnboundedMaxArguments()`
Indicates if this filter definition support unbounded max arguments.

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

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

## Field Details

### UNDEFINED

protected static final int UNDEFINED

See Also:
  - Constant Field Values

### birtFilterExprId

protected String birtFilterExprId
Filter operator defined by BIRT.

### birtFilterDisplayName

protected String birtFilterDisplayName
BIRT predefined filter expression operator display name.

### minArgs

protected int minArgs
The min number of arguments that this filter operator required.

### maxArgs

protected int maxArgs
The max number of arguments that this filter operator required.

### supportUnboundedMaxArgs

protected boolean supportUnboundedMaxArgs
Indicates if this filter operator expression support unlimited max number of arguments.

## Constructor Details

### FilterExprDefinition

public FilterExprDefinition()

### FilterExprDefinition

public FilterExprDefinition(String birtFilterExpr) throws IllegalArgumentException
Constructor for FilterExprDefinition by BIRT predefined filter expression operator id. The instance returned is not mapped to any external ODA extension filter.

Parameters:
  `birtFilterExpr` - BIRT predefined filter expression operator Id.
Throws:
  `IllegalArgumentException`

## Method Details

### expressionSupportedType

public int expressionSupportedType()
Description copied from interface: `IFilterExprDefinition`
Returns the expression supported type of this FilterExprDefinition. The returned type could be:

- BIRT_SUPPORT_ONLY
- EXTENSION_SUPPORT_ONLY
- EXPR_MAPPING_SUPPORTED

Specified by:
  `expressionSupportedType` in interface `IFilterExprDefinition`
Returns:
  the expression supported type.

### getBirtFilterExprId

public String getBirtFilterExprId()
Description copied from interface: `IFilterExprDefinition`
Returns the BIRT predefined filter expression operator internal name.

Specified by:
  `getBirtFilterExprId` in interface `IFilterExprDefinition`
Returns:
  BIRT predefined filter operator internal name, if there is. Return Null if this definition is not mapped to a BIRT predefined filter expression.

### getBirtFilterExprDisplayName

public String getBirtFilterExprDisplayName()
Description copied from interface: `IFilterExprDefinition`
Return the corresponding BIRT predefined Filter expression operator display name.

Specified by:
  `getBirtFilterExprDisplayName` in interface `IFilterExprDefinition`
Returns:
  BIRT predefined filter operator name, if there is. Null, if there is no mapped one.

### getExtFilterDisplayName

public String getExtFilterDisplayName()
Description copied from interface: `IFilterExprDefinition`
Returns the display name of this Filter expression.

Specified by:
  `getExtFilterDisplayName` in interface `IFilterExprDefinition`
Returns:
  display name of the filter expression.

### getExtFilterExprId

public String getExtFilterExprId()
Description copied from interface: `IFilterExprDefinition`
Returns the ODA filter extension filter expression id if there is.

Specified by:
  `getExtFilterExprId` in interface `IFilterExprDefinition`
Returns:
  ODA extension filter expression id if there is. Null, if not applicable.

### getMaxArguments

public Integer getMaxArguments()
Description copied from interface: `IFilterExprDefinition`
Returns the number of arguments that this filter definition can maximize supported.

Specified by:
  `getMaxArguments` in interface `IFilterExprDefinition`
Returns:
  the maximal number of arguments.

### getMinArguments

public Integer getMinArguments()
Description copied from interface: `IFilterExprDefinition`
Returns the min arguments required by this filter expression definition.

Specified by:
  `getMinArguments` in interface `IFilterExprDefinition`
Returns:
  the min number of arguments that required by this filter definition.

### getProviderExtensionId

public String getProviderExtensionId()
Description copied from interface: `IFilterExprDefinition`
Returns the ODA filter extension provider ID if there is.

Specified by:
  `getProviderExtensionId` in interface `IFilterExprDefinition`
Returns:
  ODA filter extension provider ID, if there is. Null, if there is no ODA extension filter applicable.

### supportsUnboundedMaxArguments

public boolean supportsUnboundedMaxArguments()
Description copied from interface: `IFilterExprDefinition`
Indicates if this filter definition support unbounded max arguments.

Specified by:
  `supportsUnboundedMaxArguments` in interface `IFilterExprDefinition`
Returns:
  true if it supported unbounded max arguments, false, if it does not support.

### initBirtExpr

protected void initBirtExpr(int birtOperator)

### isNegatedExtExprId

public boolean isNegatedExtExprId()
Description copied from interface: `IFilterExprDefinition`
Indicates whether the expression is mapped to the negated data base expression, i.e. the database expression should be nested within a NotExpression.

One example is that: the database may use eq and negated eq to represent BIRT EQ and NE.

Specified by:
  `isNegatedExtExprId` in interface `IFilterExprDefinition`
Returns:
  `true` if mapped to a negated provider expression; `false` otherwise.

### getBirtFilterExprDisplayName

public String getBirtFilterExprDisplayName(com.ibm.icu.util.ULocale locale)
Description copied from interface: `IFilterExprDefinition`
Return the corresponding BIRT predefined Filter expression operator display name.

Specified by:
  `getBirtFilterExprDisplayName` in interface `IFilterExprDefinition`
Returns:
  BIRT predefined filter operator name, if there is. Null, if there is no mapped one.

### supportsAPIDataType

public boolean supportsAPIDataType(int apiDataType)
Description copied from interface: `IFilterExprDefinition`
Indicates whether the given API type is supported by this filter operator.

Specified by:
  `supportsAPIDataType` in interface `IFilterExprDefinition`
Parameters:
  `apiDataType` - the api data type
Returns:
  `true` if it is supported. Otherwise, `false`.