Class FilterConditionHandle
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.FilterConditionHandle
Represents one filter in the filter list of List, Table or their Groups.
This is a managed object, meaning that all changes should be made though the command layer so that they can be undone and redone. Each filter condition has the following properties:
- Column
- a filter condition has a required column.
- Operator
- a filter condition has a required operator to compute.
- Filter Expression
- a filter condition has a required filter expression to test. Can be a column or a complete boolean expression.
- Value 1 Expression
- a filter condition has an optional value 1 expression of the comparison value for all but unary operators.
- Value 2 Expression
- a filter condition has an optional value 2 expression of the second comparison value for trinary operators(between, not between).
-
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
ConstructorsConstructorDescriptionFilterConditionHandle
(SimpleValueHandle valueHandle, int index) Constructs the handle of filter condition. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.This property has been removed.Returns the user specified value.Returns the name of the dynamic filter parameter to reference when the filter condition is dynamic.getExpr()
Returns the filter expression.Returns the id of a custom filter expression contributed and defined by the extension identified in the consumerExpressionMapping.Returns the unique id of an org.eclipse.datatools.connectivity.oda.filterExpressions extension to whose custom expressions are defined to map to a BIRT filter operator.Deprecated.Replaced by the methodgetExpr()
Returns the filter target.Returns the operator of this filter condition.getType()
Returns the type of this filter condition.Returns the value 1 expression of this filter condition.Deprecated.Replaced by the methodgetValue1()
Gets the value1 expression list of this filter condition.Deprecated.Returns the value 2 expression of this filter condition.Deprecated.Replaced by the methodgetValue2()
boolean
Determines whether this filte rcondition is optional or not.boolean
pushDown()
Indicate if the current filter condition will be pushed down to the database.void
Deprecated.This property has been removed.void
setCustomValue
(String customValue) Sets the user specified value.void
setDynamicFilterParameter
(String parameterName) Sets the name of the dynamic filter parameter to reference.void
Sets the filter expression.void
setExtensionExprId
(String extensionExprId) Sets the id of a custom filter expression contributed and defined by the extension identified in the consumerExpressionMapping.void
setExtensionName
(String extensionName) Sets the unique id of an org.eclipse.datatools.connectivity.oda.filterExpressions extension to whose custom expressions are defined to map to a BIRT filter operator.void
setFilterExpr
(String filterExpr) Deprecated.Replaced by the methodsetExpr(String)
void
setFilterTarget
(String filterTarget) Sets the filter target.void
setOperator
(String operator) Sets the operator of this filter condition.void
setOptional
(boolean isOptional) Sets the optional status for this filter condition.void
setPushDown
(boolean pushDown) Sets the push down status for this filter conditionvoid
Sets the type of this filter condition.void
setUpdateAggregation
(boolean updateAggregation) Sets the updateAggregation flag of the filter condition.void
Sets the value 1 expression of this filter condition.void
Sets the value 1 expression list of this filter condition.void
setValue1Expr
(String value1Expr) Deprecated.Replaced by the methodsetValue1(String)
void
Sets the value 2 expression of this filter condition.void
setValue2
(Expression value2Expr) Sets the value 2 expression of this filter condition.void
setValue2Expr
(String value2Expr) Deprecated.Replaced by the methodsetValue2(String)
boolean
Checks if this filter condition needs to update aggregation.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
-
Constructor Details
-
FilterConditionHandle
Constructs the handle of filter condition.- Parameters:
valueHandle
- the value handle for filter condition list of one propertyindex
- the position of this filter condition in the list
-
-
Method Details
-
getExpr
Returns the filter expression.- Returns:
- the filter expression
-
setExpr
Sets the filter expression.- Parameters:
filterExpr
- the filter expression to set- Throws:
SemanticException
- value required exception
-
getOperator
Returns the operator of this filter condition. The possible values are defined inDesignChoiceConstants
, and they are:FILTER_OPERATOR_EQ
FILTER_OPERATOR_NE
FILTER_OPERATOR_LT
FILTER_OPERATOR_LE
FILTER_OPERATOR_GE
FILTER_OPERATOR_GT
FILTER_OPERATOR_BETWEEN
FILTER_OPERATOR_NOT_BETWEEN
FILTER_OPERATOR_NULL
FILTER_OPERATOR_NOT_NULL
FILTER_OPERATOR_TRUE
FILTER_OPERATOR_FALSE
FILTER_OPERATOR_LIKE
FILTER_OPERATOR_TOP_N
FILTER_OPERATOR_BOTTOM_N
FILTER_OPERATOR_TOP_PERCENT
FILTER_OPERATOR_BOTTOM_PERCENT
FILTER_OPERATOR_ANY
- Returns:
- the operator of this filter condition
-
setOperator
Sets the operator of this filter condition. The allowed values are defined inDesignChoiceConstants
, and they are:FILTER_OPERATOR_EQ
FILTER_OPERATOR_NE
FILTER_OPERATOR_LT
FILTER_OPERATOR_LE
FILTER_OPERATOR_GE
FILTER_OPERATOR_GT
FILTER_OPERATOR_BETWEEN
FILTER_OPERATOR_NOT_BETWEEN
FILTER_OPERATOR_NULL
FILTER_OPERATOR_NOT_NULL
FILTER_OPERATOR_TRUE
FILTER_OPERATOR_FALSE
FILTER_OPERATOR_LIKE
FILTER_OPERATOR_TOP_N
FILTER_OPERATOR_BOTTOM_N
FILTER_OPERATOR_TOP_PERCENT
FILTER_OPERATOR_BOTTOM_PERCENT
FILTER_OPERATOR_ANY
- Parameters:
operator
- the operator to set- Throws:
SemanticException
- if operator is not in the choice list.
-
getValue1
Returns the value 1 expression of this filter condition.- Returns:
- the value 1 expression of this filter condition
-
getValue1List
Deprecated.Gets the value1 expression list of this filter condition. For most filter operator, there is only one expression in the returned list. However, filter operator 'in' may contain more than one expression.- Returns:
- the value1 expression list of this filter condition.
-
getValue1ExpressionList
Gets the value1 expression list of this filter condition. For most filter operator, there is only one expression in the returned list. However, filter operator 'in' may contain more than one expression.- Returns:
- the value1 expression list handle of this filter condition.
-
setValue1
Sets the value 1 expression of this filter condition.- Parameters:
value1Expr
- the value 1 expression to set
-
setValue1
Sets the value 1 expression list of this filter condition.- Parameters:
value1List
- the value 1 expression list to set- Throws:
SemanticException
- if the instance in the list is not valid
-
getValue2
Returns the value 2 expression of this filter condition.- Returns:
- the value 2 expression of this filter condition
-
setValue2
Sets the value 2 expression of this filter condition.- Parameters:
value2Expr
- the value 2 expression to set
-
getColumn
Deprecated.This property has been removed.Returns the column name of this filter condition.- Returns:
null
. NOT support any more.
-
setColumn
Deprecated.This property has been removed.Sets the column name of this filter condition. NOT support any more.- Parameters:
column
- the column name to set
-
getFilterExpr
Deprecated.Replaced by the methodgetExpr()
Returns the filter expression.- Returns:
- the expression for the filter.
-
setFilterExpr
Deprecated.Replaced by the methodsetExpr(String)
Sets the filter expression.- Parameters:
filterExpr
- the filter expression to set- Throws:
SemanticException
- value required exception
-
getValue1Expr
Deprecated.Replaced by the methodgetValue1()
Returns the value 1 expression of this filter condition.- Returns:
- the value 1 expression.
-
setValue1Expr
Deprecated.Replaced by the methodsetValue1(String)
Sets the value 1 expression of this filter condition.- Parameters:
value1Expr
- the value 1 expression to set
-
getValue2Expr
Deprecated.Replaced by the methodgetValue2()
Returns the value 2 expression of this filter condition.- Returns:
- the value 2 expression.
-
setValue2Expr
Deprecated.Replaced by the methodsetValue2(String)
Sets the value 2 expression of this filter condition.- Parameters:
value2Expr
- the value 2 expression to set
-
getFilterTarget
Returns the filter target. The possible values are defined inDesignChoiceConstants
, and they are:FILTER_TARGET_DATA_SET
FILTER_TARGET_RESULT_SET
- Returns:
- the target type
-
setFilterTarget
Sets the filter target. The allowed values are defined inDesignChoiceConstants
, and they are:FILTER_TARGET_DATA_SET
FILTER_TARGET_RESULT_SET
- Parameters:
filterTarget
- the filter target to set- Throws:
SemanticException
- if the value is not one of the above.
-
isOptional
public boolean isOptional()Determines whether this filte rcondition is optional or not.- Returns:
- true if this filter is optional, otherwise false
-
setOptional
public void setOptional(boolean isOptional) Sets the optional status for this filter condition.- Parameters:
isOptional
- true if this filter is optional, otherwise false
-
getExtensionName
Returns the unique id of an org.eclipse.datatools.connectivity.oda.filterExpressions extension to whose custom expressions are defined to map to a BIRT filter operator.- Returns:
- the extension name
-
getExtensionExprId
Returns the id of a custom filter expression contributed and defined by the extension identified in the consumerExpressionMapping.- Returns:
- the extension expression id
-
pushDown
public boolean pushDown()Indicate if the current filter condition will be pushed down to the database. Default value is false. Only the oda extension provider supported operators can be pushed down to database. For those only BIRT supported operators even this property is set to true, will be ignored.- Returns:
- true if the current filter condition will be pushed down to the database, otherwise false.
-
getDynamicFilterParameter
Returns the name of the dynamic filter parameter to reference when the filter condition is dynamic.- Returns:
- the name to the dynamic filter parameter to reference.
-
setExtensionName
Sets the unique id of an org.eclipse.datatools.connectivity.oda.filterExpressions extension to whose custom expressions are defined to map to a BIRT filter operator.- Parameters:
extensionName
- the extension name to set
-
setExtensionExprId
Sets the id of a custom filter expression contributed and defined by the extension identified in the consumerExpressionMapping.- Parameters:
extensionExprId
- the id to set
-
setPushDown
public void setPushDown(boolean pushDown) Sets the push down status for this filter condition- Parameters:
pushDown
- true if the current filter condition will be pushed down to the database, otherwise false.
-
setDynamicFilterParameter
Sets the name of the dynamic filter parameter to reference.- Parameters:
parameterName
- the name of the dynamic filter parameter to set
-
getType
Returns the type of this filter condition. The possible values are defined inDesignChoiceConstants
, and they are:FILTER_CONDITION_TYPE_SLICER
FILTER_CONDITION_TYPE_SIMPLE
- Returns:
- the operator of this filter condition
-
setType
Sets the type of this filter condition. The allowed values are defined inDesignChoiceConstants
, and they are:FILTER_CONDITION_TYPE_SLICER
FILTER_CONDITION_TYPE_SIMPLE
- Parameters:
type
- the type to set- Throws:
SemanticException
- if type is not in the choice list.
-
setValue2
Sets the value 2 expression of this filter condition.- Parameters:
value2Expr
- the value 2 expression to set- Throws:
SemanticException
-
updateAggregation
public boolean updateAggregation()Checks if this filter condition needs to update aggregation.- Returns:
- the flag to indicate updating aggregation or not.
-
setUpdateAggregation
Sets the updateAggregation flag of the filter condition.- Parameters:
updateAggregation
- the updateAggregation flag to set- Throws:
SemanticException
-
getCustomValue
Returns the user specified value.- Returns:
- the flag to indicate updating aggregation or not.
-
setCustomValue
Sets the user specified value.- Throws:
SemanticException
-