org.eclipse.birt.report.model.api.elements.structures
Class FilterCondition

java.lang.Object
  extended by org.eclipse.birt.report.model.core.Structure
      extended by org.eclipse.birt.report.model.api.elements.structures.FilterCondition
All Implemented Interfaces:
java.lang.Cloneable, IStructure, org.eclipse.birt.report.model.core.IPropertySet

public class FilterCondition
extends org.eclipse.birt.report.model.core.Structure

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 Expr
a filter condition has a required filter expression to test. Can be a column or a complete boolean expression.
Value 1 Expr
a filter condition has an optional value 1 expression of the comparison value for all but unary operators.
Value 2 Expr
a filter condition has an optional value 2 expression of the second comparison value for trinary operators(between, not between).


Field Summary
static java.lang.String EXPR_MEMBER
          Name of the filter expression member.
static java.lang.String FILTER_COND_STRUCT
          Name of this structure.
static java.lang.String FILTER_TARGET_MEMBER
          Name of the filter target member.
static java.lang.String IS_OPTIONAL_MEMBER
          Name of the member that indicates whether this filter is optional or not.
static java.lang.String OPERATOR_MEMBER
          Name of the filter operator member.
static java.lang.String VALUE1_MEMBER
          Name of the filter value 1 expression member.
static java.lang.String VALUE2_MEMBER
          Name of the filter value 2 expression member.
 
Constructor Summary
FilterCondition()
           
 
Method Summary
 java.lang.String getColumn()
          Deprecated. This property has been removed.
 java.lang.String getExpr()
          Returns the filter expression.
 java.lang.String getFilterExpr()
          Deprecated. Replaced by the method getExpr()
 java.lang.String getFilterTarget()
          Returns the filter target.
protected  java.lang.Object getIntrinsicProperty(java.lang.String propName)
           
 java.lang.String getOperator()
          Returns the operator.
 java.lang.String getStructName()
          Returns the name of the structure definition.
 java.lang.String getValue1()
          Returns the value 1 expression.
 java.lang.String getValue1Expr()
          Deprecated. Replaced by the method getValue1()
 java.util.List getValue1List()
          Gets the value1 expression list of this filter condition.
 java.lang.String getValue2()
          Returns the value 2 expression.
 java.lang.String getValue2Expr()
          Deprecated. Replaced by the method getValue2()
 StructureHandle handle(SimpleValueHandle valueHandle, int index)
           
 boolean isOptional()
          Determines whether this filte rcondition is optional or not.
 void setColumn(java.lang.String column)
          Deprecated. This property has been removed.
 void setExpr(java.lang.String expr)
          Sets the filter expression.
 void setFilterExpr(java.lang.String filterExpr)
          Deprecated. Replaced by the method setExpr(String)
 void setFilterTarget(java.lang.String filterTarget)
          Sets the filter target.
protected  void setIntrinsicProperty(java.lang.String propName, java.lang.Object value)
           
 void setOperator(java.lang.String operator)
          Sets the operator.
 void setOptional(boolean isOptional)
          Sets the optional status for this filter condition.
 void setValue1(java.util.List value1List)
          Sets the value 1 expression.
 void setValue1(java.lang.String value1)
          Sets the value 1 expression.
 void setValue1Expr(java.lang.String value1Expr)
          Deprecated. Replaced by the method setValue1(String)
 void setValue2(java.lang.String value2)
          Sets the value 2 expression.
 void setValue2Expr(java.lang.String value2Expr)
          Deprecated. Replaced by the method setValue2(String)
 java.util.List validate(org.eclipse.birt.report.model.core.Module module, org.eclipse.birt.report.model.core.DesignElement element)
          Validates this structure.
 
Methods inherited from class org.eclipse.birt.report.model.core.Structure
copy, equals, getContext, getDefn, getElement, getHandle, getHandle, getListMemberRef, getLocalProperty, getLocalProperty, getObjectDefn, getProperty, getProperty, getReferencableProperty, isDesignTime, isReferencable, setContext, setProperty, setProperty, updateReference
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FILTER_COND_STRUCT

public static final java.lang.String FILTER_COND_STRUCT
Name of this structure. Matches the definition in the meta-data dictionary.

See Also:
Constant Field Values

OPERATOR_MEMBER

public static final java.lang.String OPERATOR_MEMBER
Name of the filter operator member.

See Also:
Constant Field Values

EXPR_MEMBER

public static final java.lang.String EXPR_MEMBER
Name of the filter expression member.

See Also:
Constant Field Values

VALUE1_MEMBER

public static final java.lang.String VALUE1_MEMBER
Name of the filter value 1 expression member.

See Also:
Constant Field Values

VALUE2_MEMBER

public static final java.lang.String VALUE2_MEMBER
Name of the filter value 2 expression member.

See Also:
Constant Field Values

FILTER_TARGET_MEMBER

public static final java.lang.String FILTER_TARGET_MEMBER
Name of the filter target member.

See Also:
Constant Field Values

IS_OPTIONAL_MEMBER

public static final java.lang.String IS_OPTIONAL_MEMBER
Name of the member that indicates whether this filter is optional or not.

See Also:
Constant Field Values
Constructor Detail

FilterCondition

public FilterCondition()
Method Detail

getStructName

public java.lang.String getStructName()
Description copied from interface: IStructure
Returns the name of the structure definition. The name is the one used to define the structure in the meta-data dictionary.

Returns:
the internal name of the structure a defined in the meta-data dictionary.

getIntrinsicProperty

protected java.lang.Object getIntrinsicProperty(java.lang.String propName)
Specified by:
getIntrinsicProperty in class org.eclipse.birt.report.model.core.Structure

setIntrinsicProperty

protected void setIntrinsicProperty(java.lang.String propName,
                                    java.lang.Object value)
Specified by:
setIntrinsicProperty in class org.eclipse.birt.report.model.core.Structure

getExpr

public java.lang.String getExpr()
Returns the filter expression.

Returns:
the filter expression

setExpr

public void setExpr(java.lang.String expr)
Sets the filter expression.

Parameters:
expr - the filter expression to set

getOperator

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

Returns:
the operator

setOperator

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

Parameters:
operator - the operator to set

getValue1

public java.lang.String getValue1()
Returns the value 1 expression.

Returns:
the value 1 expression

getValue1List

public java.util.List getValue1List()
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 value1)
Sets the value 1 expression.

Parameters:
value1 - the value 1 expression to set

setValue1

public void setValue1(java.util.List value1List)
Sets the value 1 expression.

Parameters:
value1List - the value 1 expression list to set

getValue2

public java.lang.String getValue2()
Returns the value 2 expression.

Returns:
the value 2 expression

setValue2

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

Parameters:
value2 - the value 2 expression to set

validate

public java.util.List validate(org.eclipse.birt.report.model.core.Module module,
                               org.eclipse.birt.report.model.core.DesignElement element)
Validates this structure. The following are the rules:

Overrides:
validate in class org.eclipse.birt.report.model.core.Structure
See Also:
Structure.validate(Module, org.eclipse.birt.report.model.core.DesignElement)

handle

public StructureHandle handle(SimpleValueHandle valueHandle,
                              int index)
Specified by:
handle in class org.eclipse.birt.report.model.core.Structure

getColumn

public java.lang.String getColumn()
Deprecated. This property has been removed.

Returns the column name of this filter condition.

Returns:
null. NOT support any more.

setColumn

public void setColumn(java.lang.String column)
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

public java.lang.String getFilterExpr()
Deprecated. Replaced by the method getExpr()

Returns the filter expression.

Returns:
the filter expression.

setFilterExpr

public void setFilterExpr(java.lang.String filterExpr)
Deprecated. Replaced by the method setExpr(String)

Sets the filter expression.

Parameters:
filterExpr - the filter expression to set

getValue1Expr

public java.lang.String getValue1Expr()
Deprecated. Replaced by the method getValue1()

Returns the value 1 expression of this filter condition.

Returns:
the expression of value 1.

setValue1Expr

public void setValue1Expr(java.lang.String value1Expr)
Deprecated. Replaced by the method setValue1(String)

Sets the value 1 expression of this filter condition.

Parameters:
value1Expr - the value 1 expression to set

getValue2Expr

public java.lang.String getValue2Expr()
Deprecated. Replaced by the method getValue2()

Returns the value 2 expression of this filter condition.

Returns:
the expression of value 1..

setValue2Expr

public void setValue2Expr(java.lang.String value2Expr)
Deprecated. Replaced by the method setValue2(String)

Sets the value 2 expression of this filter condition.

Parameters:
value2Expr - the value 2 expression to set

getFilterTarget

public java.lang.String getFilterTarget()
Returns the filter target. The possible values are defined in DesignChoiceConstants, and they are:

Returns:
the operator

setFilterTarget

public void setFilterTarget(java.lang.String filterTarget)
Sets the filter target. The allowed values are defined in DesignChoiceConstants, and they are:

Parameters:
filterTarget - the filter target to set

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


Copyright © 2008 Actuate Corp. All rights reserved.