com.sas.dataselectors.filterandrank
Interface FilterAndRankModelInterface

All Known Implementing Classes:
FilterAndRankModel

public interface FilterAndRankModelInterface

This class defines the interface between the Filter and Rank Selector and an underlying filtering model. These methods are used by the selector and command classes to provide all functionality for the selector.


Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Add a PropertyChangeListener to the model.
 boolean applyChanges()
          Applies any changes made to the selector model to the underlying native model.
 boolean clearAllSteps()
          Clears the step list for both COLUMN and ROW roles.
 boolean clearStep(FilterAxisEnum role)
          Clears the step list for the given role.
 java.lang.Object createFilterStep(FilterOperatorEnum operator, java.lang.String value)
          Creates a new filter step using the current TupleElement and the given properties.
 java.lang.Object createRankStep(RankOrderEnum rankOrder, int value, boolean includeTies, RankTypeEnum rankType)
          Creates a new rank step using the current TupleElement and the given properties.
 java.lang.Object getBusinessQuery()
          Returns the current BusinessQuery model.
 FilterAxisEnum getFilterAxis()
          Returns the FilterOnAxis constant corresponding to the axis the model is currently set to filter on.
 java.lang.Object getStep(FilterAxisEnum role)
          Returns the StepInterface at the requested Role.
 java.lang.String getStepText(FilterAxisEnum role, java.util.Locale locale)
          Constructs and returns a text representation of the step at the given role.
 TupleElementInterface getTupleElement()
          Returns the current tuple element.
 java.lang.String getTupleElementLabel()
          Return a text representation for the current TupleElement.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener from the model.
 boolean setStep(java.lang.Object step, FilterAxisEnum role)
          Sets the StepInterface at the specified Role.
 

Method Detail

getBusinessQuery

java.lang.Object getBusinessQuery()
Returns the current BusinessQuery model.

Returns:
the model

getTupleElement

TupleElementInterface getTupleElement()
Returns the current tuple element.

Returns:
the tuple element

getFilterAxis

FilterAxisEnum getFilterAxis()
                             throws OLAPException
Returns the FilterOnAxis constant corresponding to the axis the model is currently set to filter on.

Returns:
the FilterOnAxis constant for the axis being filtered
Throws:
OLAPException - if any problems occur while determining the axis

getTupleElementLabel

java.lang.String getTupleElementLabel()
Return a text representation for the current TupleElement.

Returns:
a label for the current TupleElement or null if the element is not available

getStep

java.lang.Object getStep(FilterAxisEnum role)
Returns the StepInterface at the requested Role.

Parameters:
role - the Role to examine (must be either COLUMN or ROW)
Returns:
the step for the role or null if there is none, no model is available, or an invalid role was specified

getStepText

java.lang.String getStepText(FilterAxisEnum role,
                             java.util.Locale locale)
Constructs and returns a text representation of the step at the given role.

Parameters:
role - the role to examine (COLUMN or ROW)
locale - the locale to use when forming the text
Returns:
the text representation or null if none could be constructed

setStep

boolean setStep(java.lang.Object step,
                FilterAxisEnum role)
Sets the StepInterface at the specified Role.

Parameters:
step - the step to assign to the model
role - the role the step should take
Returns:
true if the assignment was made, false otherwise

clearStep

boolean clearStep(FilterAxisEnum role)
Clears the step list for the given role. The role must be either COLUMN or ROW.

Parameters:
role - the role to clear
Returns:
true if the step list was cleared, false otherwise

clearAllSteps

boolean clearAllSteps()
Clears the step list for both COLUMN and ROW roles.

Returns:
true if the step list for both roles were cleared, false otherwise

createFilterStep

java.lang.Object createFilterStep(FilterOperatorEnum operator,
                                  java.lang.String value)
Creates a new filter step using the current TupleElement and the given properties.

Parameters:
operator - the operator for the new filter
value - the value to fulfill the condition
Returns:
the newly created step or null if any problems occurred

createRankStep

java.lang.Object createRankStep(RankOrderEnum rankOrder,
                                int value,
                                boolean includeTies,
                                RankTypeEnum rankType)
Creates a new rank step using the current TupleElement and the given properties.

Parameters:
rankOrder - the order for the ranking
value - the value applied to the ranking
includeTies - true if ties should be included, false otherwise
rankType - the type of ranking to perform
Returns:
the newly created step or null if any problems occurred

applyChanges

boolean applyChanges()
                     throws com.sas.util.ChainedException
Applies any changes made to the selector model to the underlying native model.

Returns:
true if the native model was changed, false otherwise.
Throws:
com.sas.util.ChainedException - if any problems occurred while updating the native model.

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Add a PropertyChangeListener to the model.

Parameters:
listener - the PropertyChangeListener to be notified when a PropertyChangeEvent occurs

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener from the model.

Parameters:
listener - the PropertyChangeListener to stop being notified when a PropertyChangeEvent occurs



Copyright © 2009 SAS Institute Inc. All Rights Reserved.