***  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.ModelItem
EVENT_OBJECT_PROPERTY_CHANGED
 
Fields inherited from interface com.sas.iquery.metadata.business.Base
EVENT_OBJECT_DEFINITION_CHANGED
 
Constructor Summary
BusinessQueryDataBasedFilter(java.util.List<? extends ExpressionInterface> 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<ExpressionInterface> getLeftExpression()
          Gets the left expression for this conditional expression.
 java.util.Locale getMemberLocale()
          Get the locale that is associated with the member names for this step.
 ComparisonOperator getOperator()
          This method returns the operator to be used for filtering.
 java.util.List<NonCalculatedValue> getRightExpression()
          Gets the right expression for this conditional expression.
 void setLeftExpression(java.util.List<? extends ExpressionInterface> values)
          Sets the left expression portion of the conditional expression.
 void setLeftExpression(java.util.List<? extends ExpressionInterface> values, java.util.Locale locale)
          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<? extends NonCalculatedValue> 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(@NonNull
                                    java.util.List<? extends ExpressionInterface> memberNames,
                                    @NonNull
                                    ComparisonOperator operator,
                                    @NonNull
                                    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
Throws:
java.lang.IllegalArgumentException - if input parameters are null
Method Detail

getMemberLocale

public java.util.Locale getMemberLocale()
Get the locale that is associated with the member names for this step.

Returns:

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(@NonNull
                              java.util.List<? extends ExpressionInterface> values,
                              java.util.Locale locale)
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

setLeftExpression

public void setLeftExpression(@NonNull
                              java.util.List<? extends ExpressionInterface> 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<ExpressionInterface> 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<? extends NonCalculatedValue> 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<NonCalculatedValue> 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.