Class FilterConditionElementHandle
- java.lang.Object
-
- org.eclipse.birt.report.model.api.DesignElementHandle
-
- org.eclipse.birt.report.model.api.ContentElementHandle
-
- org.eclipse.birt.report.model.api.FilterConditionElementHandle
-
- All Implemented Interfaces:
org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel,org.eclipse.birt.report.model.elements.interfaces.IFilterConditionElementModel
public class FilterConditionElementHandle extends ContentElementHandle implements org.eclipse.birt.report.model.elements.interfaces.IFilterConditionElementModel
-
-
Field Summary
-
Fields inherited from class org.eclipse.birt.report.model.api.ContentElementHandle
element
-
Fields inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
module
-
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IDesignElementModel
COMMENTS_PROP, CUSTOM_XML_PROP, DISPLAY_NAME_ID_PROP, DISPLAY_NAME_PROP, EVENT_HANDLER_CLASS_PROP, EXTENDS_PROP, FULL_LABEL, ID_SUFFIX, NAME_PROP, NEW_HANDLER_ON_EACH_EVENT_PROP, NO_SLOT, PROPERTY_MASKS_PROP, REF_TEMPLATE_PARAMETER_PROP, SHORT_LABEL, USER_LABEL, USER_PROPERTIES_PROP, VIEW_ACTION_PROP
-
Fields inherited from interface org.eclipse.birt.report.model.elements.interfaces.IFilterConditionElementModel
DYNAMIC_FILTER_PARAMETER_PROP, EXPR_PROP, EXTENSION_EXPR_ID_PROP, EXTENSION_NAME_PROP, FILTER_TARGET_PROP, IS_OPTIONAL_PROP, MEMBER_PROP, OPERATOR_PROP, PUSH_DOWN_PROP, TYPE_PROP, UPDATE_AGGREGATION_PROP, VALUE1_PROP, VALUE2_PROP
-
-
Constructor Summary
Constructors Constructor Description FilterConditionElementHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)Constructs a filter condition handle with the given design and the element.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetDynamicFilterParameter()Returns the name of the dynamic filter parameter to reference when the filter condition is dynamic.java.lang.StringgetExpr()Returns the filter expression.java.lang.StringgetExtensionExprId()Returns the id of a custom filter expression contributed and defined by the extension identified in the consumerExpressionMapping.java.lang.StringgetExtensionName()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.java.lang.StringgetFilterTarget()Returns the filter target.MemberValueHandlegetMember()Gets the member value handle of this filter condition element if it sets.java.lang.StringgetOperator()Returns the operator of this filter condition.java.lang.StringgetType()Returns the type of this filter condition.java.lang.StringgetValue1()Returns the value 1 expression of this filter condition.ExpressionListHandlegetValue1ExpressionList()Gets the value1 expression list of this filter condition.java.util.ListgetValue1List()Deprecated.java.lang.StringgetValue2()Returns the value 2 expression of this filter condition.booleanisOptional()Determines whether this filter condition is optional or not.booleanpushDown()Indicate if the current filter condition will be pushed down to the database.voidsetDynamicFilterParameter(java.lang.String parameterName)Sets the name of the dynamic filter parameter to reference.voidsetExpr(java.lang.String filterExpr)Sets the filter expression.voidsetExtensionExprId(java.lang.String extensionExprId)Sets the id of a custom filter expression contributed and defined by the extension identified in the consumerExpressionMapping.voidsetExtensionName(java.lang.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.voidsetFilterTarget(java.lang.String filterTarget)Sets the filter target.voidsetOperator(java.lang.String operator)Sets the operator of this filter condition.voidsetOptional(boolean isOptional)Sets the optional status for this filter condition.voidsetPushDown(boolean pushDown)Sets the push down status for this filter conditionvoidsetType(java.lang.String type)Sets the type of this filter condition.voidsetUpdateAggregation(boolean updateAggregation)Sets the updateAggregation flag of the filter condition.voidsetValue1(java.lang.String value1Expr)Sets the value 1 expression of this filter condition.voidsetValue1(java.util.List value1List)Sets the value 1 expression list of this filter condition.voidsetValue2(java.lang.String value2Expr)Sets the value 2 expression of this filter condition.booleanupdateAggregation()Checks if this filter condition needs to update aggregation.-
Methods inherited from class org.eclipse.birt.report.model.api.ContentElementHandle
addListener, canTransformToTemplate, clientsIterator, createTemplateElement, derivedIterator, getElement, getEventHandlerClass, getExtends, getName, getPrivateStyle, getQualifiedName, isTemplateParameterValue, localize, removeListener, revertToReportItem, revertToTemplate, setEventHandlerClass, setExtends, setExtendsName, setName, setStyle, setStyleName
-
Methods inherited from class org.eclipse.birt.report.model.api.DesignElementHandle
add, add, addElement, addElement, addUserPropertyDefn, cachePropertyHandles, canContain, canContain, canContain, canContain, canDrop, canEdit, clearAllProperties, clearContents, clearProperty, copy, copyPropertyTo, doSort, drop, drop, drop, dropAndClear, dropAndClear, dropAndClear, dropUserPropertyDefn, findContentSlot, getBooleanProperty, getChoices, getColorProperty, getContainer, getContainerPropertyHandle, getContainerSlotHandle, getContent, getContentCount, getContents, getDefn, getDesign, getDesignHandle, getDimensionProperty, getDisplayLabel, getDisplayLabel, getDisplayProperty, getEffectiveModule, getElementFactory, getElementProperty, getExpressionProperty, getExternalizedValue, getExternalizedValue, getExternalizedValue, getFactoryElementHandle, getFactoryPropertyHandle, getFloatProperty, getFontProperty, getFullName, getHostViewHandle, getID, getIndex, getIntProperty, getListProperty, getListProperty, getMethods, getModule, getModuleHandle, getNumberProperty, getProperty, getPropertyBinding, getPropertyBindingExpression, getPropertyBindings, getPropertyDefn, getPropertyHandle, getPropertyIterator, getRoot, getSemanticErrors, getSlot, getStringProperty, getStyle, getUserProperties, getUserPropertyDefnHandle, getXPath, hasLocalProperties, hasSemanticError, initializeSlotHandles, isDirectionRTL, isInTemplateParameter, isValid, move, move, moveTo, moveTo, moveTo, moveTo, newHandlerOnEachEvent, paste, paste, paste, paste, semanticCheck, setBooleanProperty, setEncryption, setExpressionProperty, setExtendsElement, setFloatProperty, setIntProperty, setNewHandlerOnEachEvent, setNumberProperty, setProperties, setProperty, setPropertyBinding, setPropertyBinding, setStringProperty, setStyleElement, setValid, shift, showError, slotsIterator
-
-
-
-
Constructor Detail
-
FilterConditionElementHandle
public FilterConditionElementHandle(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)Constructs a filter condition handle with the given design and the element. The application generally does not create handles directly. Instead, it uses one of the navigation methods available on other element handles.- Parameters:
module- the moduleelement- the model representation of the element
-
-
Method Detail
-
getExpr
public java.lang.String getExpr()
Returns the filter expression.- Returns:
- the filter expression
-
setExpr
public void setExpr(java.lang.String filterExpr) throws SemanticExceptionSets the filter expression.- Parameters:
filterExpr- the filter expression to set- Throws:
SemanticException- value required exception
-
getOperator
public java.lang.String getOperator()
Returns the operator of this filter condition. The possible values are defined inDesignChoiceConstants, and they are:FILTER_OPERATOR_EQFILTER_OPERATOR_NEFILTER_OPERATOR_LTFILTER_OPERATOR_LEFILTER_OPERATOR_GEFILTER_OPERATOR_GTFILTER_OPERATOR_BETWEENFILTER_OPERATOR_NOT_BETWEENFILTER_OPERATOR_NULLFILTER_OPERATOR_NOT_NULLFILTER_OPERATOR_TRUEFILTER_OPERATOR_FALSEFILTER_OPERATOR_LIKEFILTER_OPERATOR_TOP_NFILTER_OPERATOR_BOTTOM_NFILTER_OPERATOR_TOP_PERCENTFILTER_OPERATOR_BOTTOM_PERCENTFILTER_OPERATOR_ANY
- Returns:
- the operator of this filter condition
-
setOperator
public void setOperator(java.lang.String operator) throws SemanticExceptionSets the operator of this filter condition. The allowed values are defined inDesignChoiceConstants, and they are:FILTER_OPERATOR_EQFILTER_OPERATOR_NEFILTER_OPERATOR_LTFILTER_OPERATOR_LEFILTER_OPERATOR_GEFILTER_OPERATOR_GTFILTER_OPERATOR_BETWEENFILTER_OPERATOR_NOT_BETWEENFILTER_OPERATOR_NULLFILTER_OPERATOR_NOT_NULLFILTER_OPERATOR_TRUEFILTER_OPERATOR_FALSEFILTER_OPERATOR_LIKEFILTER_OPERATOR_TOP_NFILTER_OPERATOR_BOTTOM_NFILTER_OPERATOR_TOP_PERCENTFILTER_OPERATOR_BOTTOM_PERCENTFILTER_OPERATOR_ANY
- Parameters:
operator- the operator to set- Throws:
SemanticException- if operator is not in the choice list.
-
getValue1
public java.lang.String getValue1()
Returns the value 1 expression of this filter condition.- Returns:
- the value 1 expression of this filter condition
-
getValue1List
@Deprecated public java.util.List 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
public ExpressionListHandle 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 of this filter condition.
-
setValue1
public void setValue1(java.lang.String value1Expr) throws SemanticExceptionSets the value 1 expression of this filter condition.- Parameters:
value1Expr- the value 1 expression to set- Throws:
SemanticException
-
setValue1
public void setValue1(java.util.List value1List) throws SemanticExceptionSets 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
public java.lang.String getValue2()
Returns the value 2 expression of this filter condition.- Returns:
- the value 2 expression of this filter condition
-
setValue2
public void setValue2(java.lang.String value2Expr) throws SemanticExceptionSets the value 2 expression of this filter condition.- Parameters:
value2Expr- the value 2 expression to set- Throws:
SemanticException
-
getFilterTarget
public java.lang.String getFilterTarget()
Returns the filter target. The possible values are defined inDesignChoiceConstants, and they are:FILTER_TARGET_DATA_SETFILTER_TARGET_RESULT_SET
- Returns:
- the target type
-
setFilterTarget
public void setFilterTarget(java.lang.String filterTarget) throws SemanticExceptionSets the filter target. The allowed values are defined inDesignChoiceConstants, and they are:FILTER_TARGET_DATA_SETFILTER_TARGET_RESULT_SET
- Parameters:
filterTarget- the filter target to set- Throws:
SemanticException- if the value is not one of the above.
-
getMember
public MemberValueHandle getMember()
Gets the member value handle of this filter condition element if it sets. Otherwise return null.- Returns:
-
isOptional
public boolean isOptional()
Determines whether this filter condition is optional or not.- Returns:
- true if this filter is optional, otherwise false
-
setOptional
public void setOptional(boolean isOptional) throws SemanticExceptionSets the optional status for this filter condition.- Parameters:
isOptional- true if this filter is optional, otherwise false- Throws:
SemanticException
-
getExtensionName
public java.lang.String 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
public java.lang.String 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
public java.lang.String 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
public void setExtensionName(java.lang.String extensionName) throws SemanticExceptionSets 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- Throws:
SemanticException
-
setExtensionExprId
public void setExtensionExprId(java.lang.String extensionExprId) throws SemanticExceptionSets the id of a custom filter expression contributed and defined by the extension identified in the consumerExpressionMapping.- Parameters:
extensionExprId- the id to set- Throws:
SemanticException
-
setPushDown
public void setPushDown(boolean pushDown) throws SemanticExceptionSets 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.- Throws:
SemanticException
-
setDynamicFilterParameter
public void setDynamicFilterParameter(java.lang.String parameterName) throws SemanticExceptionSets the name of the dynamic filter parameter to reference.- Parameters:
parameterName- the name of the dynamic filter parameter to set- Throws:
SemanticException
-
getType
public java.lang.String getType()
Returns the type of this filter condition. The possible values are defined inDesignChoiceConstants, and they are:FILTER_CONDITION_TYPE_SLICERFILTER_CONDITION_TYPE_SIMPLE
- Returns:
- the operator of this filter condition
-
setType
public void setType(java.lang.String type) throws SemanticExceptionSets the type of this filter condition. The allowed values are defined inDesignChoiceConstants, and they are:FILTER_CONDITION_TYPE_SLICERFILTER_CONDITION_TYPE_SIMPLE
- Parameters:
type- the type to set- Throws:
SemanticException- if type is not in the choice list.
-
updateAggregation
public boolean updateAggregation()
Checks if this filter condition needs to update aggregation.- Returns:
- the flag to indicate updating aggregation or not.
-
setUpdateAggregation
public void setUpdateAggregation(boolean updateAggregation) throws SemanticExceptionSets the updateAggregation flag of the filter condition.- Parameters:
updateAggregation- the updateAggregation flag to set- Throws:
SemanticException
-
-