***  This class is subject to change.  ***

com.sas.iquery.metadata.business.step.olap
Class BusinessQueryDataBasedFilter

com.sas.iquery.metadata.business.step.olap.BusinessQueryDataBasedFilter
All Implemented Interfaces:
Base, BusinessModelResourceReferencer, ModelItem, StepFilterInterface, StepInterface, UsabilityInterface, PropertyChangeListenee, com.sas.util.LocalizableToStringInterface, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener

public class BusinessQueryDataBasedFilter

A step that filters a query based on a boolean expression.

The left side of the expression is a set of members determining the context on which to evaluate the expression (for example USA, 1999, Sales). The right side of the expression is a data value.

The result of a data based filter is the set of members meeting the criteria set forth in the specified expression.

See Also:
StepFilterInterface, BaseFilter

Field Summary
static java.lang.String EVENT_COMPARISON_OPERATOR_CHANGED
          Indication that the operator of the filter has been changed.
static java.lang.String EVENT_LEFT_EXPRESSION_CHANGED
          Indication that the left portion of the expression has changed.
static java.lang.String EVENT_RIGHT_EXPRESSION_CHANGED
          Indication that the right portion of the expression has changed.
 
Fields inherited from class com.sas.iquery.metadata.business.step.olap.BaseFilter
EVENT_ACTION_TYPE_CHANGED, EVENT_LOCALIZABLE_LABELS_CHANGED
 
Fields inherited from interface com.sas.iquery.metadata.business.step.StepFilterInterface
APPEND_ACTION_TYPE, DIFFERENCE_ACTION_TYPE, INITIAL_ACTION_TYPE, INSERT_ACTION_TYPE, INTERSECT_ACTION_TYPE, PREPEND_ACTION_TYPE, SPECIAL_ACTION_TYPE, UNION_ACTION_TYPE
 
Fields inherited from interface com.sas.iquery.metadata.business.Base
EVENT_OBJECT_DEFINITION_CHANGED
 
Fields inherited from interface com.sas.iquery.metadata.business.ModelItem
EVENT_OBJECT_PROPERTY_CHANGED
 
Constructor Summary
BusinessQueryDataBasedFilter()
          This constructor is used only for persistence.
BusinessQueryDataBasedFilter(java.util.List memberNames, ComparisonOperator operator, java.lang.Object value)
          Set a filter based on the data values in a set
 
Method Summary
 java.lang.String getDisplayedText(com.sas.storage.olap.MetadataInterface metadata, Role role, boolean applyPromptValues, java.util.Locale locale)
          Return the displayed text for a step rather than a OLAP type of text.
 java.util.List getLeftExpression()
          Gets the left expression for this conditional expression.
 ComparisonOperator getOperator()
          This method returns the operator to be used for filtering.
 java.util.List getRightExpression()
          Gets the right expression for this conditional expression.
 void setLeftExpression(java.util.List values)
          Sets the left expression portion of the conditional expression.
 void setOperator(ComparisonOperator operator)
          This method defines the type of operator to use for filtering.
 void setRightExpression(java.util.List values)
          Sets the right expression portion of the conditional expression.
 
Methods inherited from class com.sas.iquery.metadata.business.step.olap.BaseFilter
getActionType, getDisplayedText, getLevels, setActionType
 
Methods inherited from interface com.sas.iquery.metadata.business.BusinessModelResourceReferencer
getResources
 
Methods inherited from interface com.sas.iquery.metadata.PropertyChangeListenee
addListener, getListeners, removeListener
 
Methods inherited from interface com.sas.iquery.metadata.business.UsabilityInterface
getReasonsUnusable, isUsableInQuery
 

Field Detail

EVENT_LEFT_EXPRESSION_CHANGED

public static final java.lang.String EVENT_LEFT_EXPRESSION_CHANGED
Indication that the left portion of the expression has changed.

See Also:
Constant Field Values

EVENT_RIGHT_EXPRESSION_CHANGED

public static final java.lang.String EVENT_RIGHT_EXPRESSION_CHANGED
Indication that the right portion of the expression has changed.

See Also:
Constant Field Values

EVENT_COMPARISON_OPERATOR_CHANGED

public static final java.lang.String EVENT_COMPARISON_OPERATOR_CHANGED
Indication that the operator of the filter has been changed.

See Also:
Constant Field Values
Constructor Detail

BusinessQueryDataBasedFilter

public BusinessQueryDataBasedFilter(java.util.List memberNames,
                                    ComparisonOperator operator,
                                    java.lang.Object value)
Set a filter based on the data values in a set

Parameters:
memberNames - name of values to be checked.
operator - used to compare.
value - check for

BusinessQueryDataBasedFilter

public BusinessQueryDataBasedFilter()
This constructor is used only for persistence. Not for general use.

Method Detail

getDisplayedText

public java.lang.String getDisplayedText(com.sas.storage.olap.MetadataInterface metadata,
                                         Role role,
                                         boolean applyPromptValues,
                                         java.util.Locale locale)
Return the displayed text for a step rather than a OLAP type of text.

Parameters:
metadata -
dataItem -
apply - prompt value (true) or prompt labels.
locale - to use
Returns:

setLeftExpression

public void setLeftExpression(java.util.List values)
Sets the left expression portion of the conditional expression. This is commonly a list of StringExpression representing member names or data items (with structure of Measure).

Parameters:
values - left side of conditional expression

getLeftExpression

public java.util.List getLeftExpression()
Gets the left expression for this conditional expression. This is commonly a list of StringExpressions representing member names or data items (with structure of Measure).

Returns:
the left side expression.

setOperator

public void setOperator(ComparisonOperator operator)
This method defines the type of operator to use for filtering.

Parameters:
operator - The type of operator to be used for filtering

getOperator

public ComparisonOperator getOperator()
This method returns the operator to be used for filtering.

Returns:
The operator to be used for filtering

setRightExpression

public void setRightExpression(java.util.List values)
Sets the right expression portion of the conditional expression. This is commonly a single ConstantExpression representing a constant value to be used in the expression, but could also be a more general expression or a list of StringExpressions representing member names.

Parameters:
values - right side of conditional expression

getRightExpression

public java.util.List getRightExpression()
Gets the right expression for this conditional expression. This is commonly a single ConstantExpression representing a constant value to be used in the expression, but could also be a more general expression or a list of StringExpressions representing member names.

Returns:
the right side expression.

***  This class is subject to change.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.