All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.dataselectors.filterandrank
Class FilterAndRankModel

    com.sas.dataselectors.filterandrank.FilterAndRankModel

All Implemented Interfaces:
  FilterAndRankModelInterface

    public class FilterAndRankModel

implements FilterAndRankModelInterface

If used, this class would contain all the model information for the FilterAndRank selector.

Field Summary
`protected com.sas.beans.PropertyChangeSupport` | `propertyChangeSupport`
`static java.lang.String` | `RB_KEY`

Constructor Summary
`FilterAndRankModel()`
`FilterAndRankModel(com.sas.iquery.metadata.business.BusinessQuery query)`

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.
`protected void` | `firePropertyChange(com.sas.beans.PropertyChangeEvent evt)` Send a PropertyChangeEvent to any listeners added to the model.
`protected void` | `firePropertyChange(java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue)` Send a PropertyChangeEvent to any listeners added to the model.
`java.lang.Object` | `getBusinessQuery()` Returns the current BusinessQuery model.
`static com.sas.iquery.metadata.expr.ComparisonOperator` | `getComparisonOperator(FilterOperatorEnum op)`
`FilterAxisEnum` | `getFilterAxis()` Returns the FilterOnAxis constant corresponding to the axis the model is currently set to filter on.
`static FilterOperatorEnum` | `getFilterOperator(com.sas.iquery.metadata.expr.ComparisonOperator iqOp)`
`static java.lang.String` | `getIQRankOrder(RankOrderEnum rankOrder)`
`static java.lang.String` | `getIQRankType(RankTypeEnum rankType)`
`static RankOrderEnum` | `getRankOrder(java.lang.String iqRankOrder)`
`static RankTypeEnum` | `getRankType(java.lang.String iqRankType)`
`static com.sas.iquery.metadata.business.Role` | `getRole(FilterAxisEnum role)`
`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.
`protected java.lang.String` | `getStepText(com.sas.iquery.metadata.business.step.StepInterface step, java.util.Locale locale)` Constructs and returns a text representation of the given step.
`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.
`void` | `setBusinessQuery(com.sas.iquery.metadata.business.BusinessQuery query)` Sets the current BusinessQuery model.
`boolean` | `setStep(java.lang.Object step, FilterAxisEnum role)` Sets the StepInterface at the specified Role.
`void` | `setTupleElement(TupleElementInterface element)` Sets the current tuple element.

Field Detail

### RB_KEY

    public static final java.lang.String RB_KEY

See Also:
  Constant Field Values

### propertyChangeSupport

    protected com.sas.beans.PropertyChangeSupport propertyChangeSupport

Constructor Detail

### FilterAndRankModel

    public FilterAndRankModel()

### FilterAndRankModel

    public FilterAndRankModel(com.sas.iquery.metadata.business.BusinessQuery query)

Method Detail

### addPropertyChangeListener

    public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)

  Add a PropertyChangeListener to the model.

  Specified by:
    `addPropertyChangeListener` in interface `FilterAndRankModelInterface`
  Parameters:
    `listener` - the PropertyChangeListener to be notified when a PropertyChangeEvent occurs

### removePropertyChangeListener

    public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)

  Remove a PropertyChangeListener from the model.

  Specified by:
    `removePropertyChangeListener` in interface `FilterAndRankModelInterface`
  Parameters:
    `listener` - the PropertyChangeListener to stop being notified when a PropertyChangeEvent occurs

### firePropertyChange

    protected void firePropertyChange(com.sas.beans.PropertyChangeEvent evt)

  Send a PropertyChangeEvent to any listeners added to the model.

### firePropertyChange

    protected void firePropertyChange(java.lang.String propName,
                                      java.lang.Object oldValue,
                                      java.lang.Object newValue)

  Send a PropertyChangeEvent to any listeners added to the model.

### getBusinessQuery

    public java.lang.Object getBusinessQuery()

  Returns the current BusinessQuery model.

  Specified by:
    `getBusinessQuery` in interface `FilterAndRankModelInterface`
  Returns:
    the model

### setBusinessQuery

    public void setBusinessQuery(com.sas.iquery.metadata.business.BusinessQuery query)

  Sets the current BusinessQuery model.

  Parameters:
    `query` - the new model to set

### applyChanges

    public boolean applyChanges()
                         throws com.sas.util.ChainedException

  Applies any changes made to the selector model to the underlying native model.

  Specified by:
    `applyChanges` in interface `FilterAndRankModelInterface`
  Returns:
    true if the native model was changed, false otherwise.
  Throws:
    `com.sas.util.ChainedException` - if any problems occurred while updating the native model.

### getTupleElement

    public TupleElementInterface getTupleElement()

  Returns the current tuple element.

  Specified by:
    `getTupleElement` in interface `FilterAndRankModelInterface`
  Returns:
    the tuple element

### setTupleElement

    public void setTupleElement(TupleElementInterface element)

  Sets the current tuple element.

  Parameters:
    `element` - the tuple element to set

### getFilterAxis

    public FilterAxisEnum getFilterAxis()
                                 throws OLAPException

  Returns the FilterOnAxis constant corresponding to the axis the model is currently set to filter on.

  Specified by:
    `getFilterAxis` in interface `FilterAndRankModelInterface`
  Returns:
    the FilterOnAxis constant for the axis being filtered
  Throws:
    `OLAPException` - if any problems occur while determining the axis

### getTupleElementLabel

    public java.lang.String getTupleElementLabel()

  Return a text representation for the current TupleElement.

  Specified by:
    `getTupleElementLabel` in interface `FilterAndRankModelInterface`
  Returns:
    a label for the current TupleElement or null if the element is not available

### getStep

    public java.lang.Object getStep(FilterAxisEnum role)

  Returns the StepInterface at the requested Role.

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

### getStepText

    public java.lang.String getStepText(FilterAxisEnum role,
                                        java.util.Locale locale)

  Constructs and returns a text representation of the step at the given role.

  Specified by:
    `getStepText` in interface `FilterAndRankModelInterface`
  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

### getStepText

    protected java.lang.String getStepText(com.sas.iquery.metadata.business.step.StepInterface step,
                                           java.util.Locale locale)

  Constructs and returns a text representation of the given step.

  Parameters:
    `step` - the step to examine
    `locale` - the locale to use when forming the text
  Returns:
    the text representation or null if none could be constructed

### setStep

    public boolean setStep(java.lang.Object step,
                           FilterAxisEnum role)

  Sets the StepInterface at the specified Role.

  Specified by:
    `setStep` in interface `FilterAndRankModelInterface`
  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

    public boolean clearStep(FilterAxisEnum role)

  Clears the step list for the given role. The role must be either COLUMN or ROW.

  Specified by:
    `clearStep` in interface `FilterAndRankModelInterface`
  Parameters:
    `role` - the role to clear
  Returns:
    true if the step list was changed, false otherwise

### clearAllSteps

    public boolean clearAllSteps()

  Clears the step list for both COLUMN and ROW roles.

  Specified by:
    `clearAllSteps` in interface `FilterAndRankModelInterface`
  Returns:
    true if the step list for both roles were cleared, false otherwise

### createFilterStep

    public java.lang.Object createFilterStep(FilterOperatorEnum operator,
                                             java.lang.String value)

  Creates a new filter step using the current TupleElement and the given properties.

  Specified by:
    `createFilterStep` in interface `FilterAndRankModelInterface`
  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

    public 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.

  Specified by:
    `createRankStep` in interface `FilterAndRankModelInterface`
  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

### getIQRankType

    public static java.lang.String getIQRankType(RankTypeEnum rankType)

### getRankType

    public static RankTypeEnum getRankType(java.lang.String iqRankType)

### getIQRankOrder

    public static java.lang.String getIQRankOrder(RankOrderEnum rankOrder)

### getRankOrder

    public static RankOrderEnum getRankOrder(java.lang.String iqRankOrder)

### getRole

    public static com.sas.iquery.metadata.business.Role getRole(FilterAxisEnum role)

### getComparisonOperator

    public static com.sas.iquery.metadata.expr.ComparisonOperator getComparisonOperator(FilterOperatorEnum op)

### getFilterOperator

    public static FilterOperatorEnum getFilterOperator(com.sas.iquery.metadata.expr.ComparisonOperator iqOp)

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.