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.ranking
Interface RankingSelectorInterface

All Known Subinterfaces:
  RelationalRankingSelectorInterface

All Known Implementing Classes:
  BaseRankingSelectorAdapter, OLAPRankingSelectorAdapter, RelationalRankingSelectorAdapter

    @SASScope(value="ALL")
    public interface RankingSelectorInterface

Represents an adapter for the Ranking Selector.

Since:
  3.1
See Also:
  `RankingCommand`

Field Summary
`static int` | `NO_RANK` Constant value indicating that a ranking is not applied for a specific data item.

Method Summary
`abstract int` | `countRankTypeValue()` Returns the value associated to the "Count" ranking type.
`abstract java.lang.String` | `dataItemRankStatus(java.lang.String dataItemID)` Returns the localized string describing the rank status for a DataItem.
`abstract java.lang.String` | `getIncludeTies()` Says if the ties are included.
`abstract java.lang.String` | `getIncludeTies(java.lang.String dataItemID)` Given a data item id says if the ties are included in the ranking.
`abstract java.util.Locale` | `getLocale()` Returns the locale used by the adapter.
`abstract java.lang.String` | `getLocalizedInfoText(java.lang.String rankOrder, int rankValue, int rankType, java.lang.String includeTies, java.lang.String basedOnDesc)` Returns the localized string describing a rank status.
`abstract java.lang.String` | `getLocalizedText(java.lang.String text)` Returns the localized version of a text using the locale currently set on adapter and the related resource bundle.
`abstract java.lang.Object` | `getModel()` Return the model that contains the data.
`abstract boolean` | `includeTies()` Deprecated. replaced by getIncludeTies()
`abstract void` | `includeTies(boolean isIncludeTies)` Deprecated. replaced by setIncludeTies()
`abstract boolean` | `includeTies(java.lang.String dataItemID)` Deprecated. replaced by getIncludeTies(String dataItemID)
`abstract boolean` | `percentageRanking()` Says if the ranking is percentage or absolute.
`abstract void` | `percentageRanking(boolean isPercentage)` Sets the type of ranking to either percentage or absolute.
`abstract int` | `rankingCount()` Returns the amount of elements to rank.
`abstract void` | `rankingCount(int count)` Sets the amount of elements to rank.
`abstract java.lang.String` | `rankOrder(java.lang.String dataItemID)` Given a data item id return the associated rank order
`abstract int` | `rankType()` Returns the rank type.
`abstract void` | `rankType(int rankType)` Sets the rank type.
`abstract int` | `rankType(java.lang.String dataItemID)` Given a data item id return the associated rank type.
`abstract java.util.Map` | `rankTypes()` Returns the list of the available rank types.
`abstract int` | `rankValue(java.lang.String dataItemID)` Given a data item id return the associated rank value.
`abstract void` | `setIncludeTies(java.lang.String isIncludeTies)` Sets if the ties are included.
`abstract void` | `setLocale(java.util.Locale locale)` Sets the locale used by the adapter.
`abstract void` | `setModel(java.lang.Object model)` Set the model that contains the data.
`abstract boolean` | `topRanking()` Says if the ranking is top or bottom.
`abstract void` | `topRanking(boolean isTop)` Sets the type of ranking to either top or bottom.
`abstract boolean` | `valuesFromDataModel()` Returns true if the values must be read directly from the data model, false if the values must be read from the internal variables.
`abstract void` | `valuesFromDataModel(boolean valuesFromDataModel)` Sets if the the values must be read directly from the Data Model or from the internal variables.

Field Detail

### NO_RANK

    static final int NO_RANK

  Constant value indicating that a ranking is not applied for a specific data item. -9999

  See Also:
    Constant Field Values

Method Detail

### topRanking

    boolean topRanking()

  Says if the ranking is top or bottom.

  Returns:
    true if it's a top ranking, false if it's a bottom one

### rankingCount

    int rankingCount()

  Returns the amount of elements to rank.

  Returns:
    the amount of elements to rank

### percentageRanking

    boolean percentageRanking()

  Says if the ranking is percentage or absolute.

  Returns:
    true if the the ranking is percentage, false if the ranking is absolute

### topRanking

    void topRanking(boolean isTop)

  Sets the type of ranking to either top or bottom.

  Parameters:
    `isTop` - true if it's a top ranking, false if it's a bottom ranking

### percentageRanking

    void percentageRanking(boolean isPercentage)

  Sets the type of ranking to either percentage or absolute.

  Parameters:
    `isPercentage` - true if it's a percentage ranking, false if it's an absolute ranking

### rankingCount

    void rankingCount(int count)

  Sets the amount of elements to rank.

  Parameters:
    `count` - the amount of elements to rank, > 0.

### includeTies

    void includeTies(boolean isIncludeTies)

  Deprecated. replaced by setIncludeTies()

  Sets if the ties are included.

  Parameters:
    `isIncludeTies` - true if the ties are included, false otherwise

### includeTies

    boolean includeTies()

  Deprecated. replaced by getIncludeTies()

  Says if the ties are included.

  Returns:
    true if the the ties are included, false otherwise

### setIncludeTies

    void setIncludeTies(java.lang.String isIncludeTies)

  Sets if the ties are included.

  Parameters:
    `isIncludeTies` - valid values are: `RankingSelectorComponents.INCLUDE_TIES`, `RankingSelectorComponents.NOT_INCLUDE_TIES`, `RankingSelectorComponents.TIES_NOT_APPLICABLE`

### getIncludeTies

    java.lang.String getIncludeTies()

  Says if the ties are included.

  Returns:
    true either one of the following: `RankingSelectorComponents.INCLUDE_TIES`, `RankingSelectorComponents.NOT_INCLUDE_TIES`, `RankingSelectorComponents.TIES_NOT_APPLICABLE`

### rankType

    void rankType(int rankType)

  Sets the rank type.

  Parameters:
    `rankType` - the rank type,

    for OLAP valid values are: `DataItemRankFilter.COUNT` `DataItemRankFilter.PERCENT` `DataItemRankFilter.SUM`

    for relational `DataItemRankFilter.COUNT`

### rankType

    int rankType()

  Returns the rank type.

  Returns:
    for OLAP iether one of the following values: `DataItemRankFilter.COUNT` `DataItemRankFilter.PERCENT` `DataItemRankFilter.SUM`

    for relational `DataItemRankFilter.COUNT`

### rankTypes

    java.util.Map rankTypes()

  Returns the list of the available rank types.

  Returns:
    the rank types. In the Map there's one element for each rank type, for each element in the map its key is the rank type description and its value is the rank type value

### dataItemRankStatus

    java.lang.String dataItemRankStatus(java.lang.String dataItemID)

  Returns the localized string describing the rank status for a DataItem. Something like "Top 2 Count (including ties) based on ACTUAL_SUM for (1994, SOFA)"

  Parameters:
    `dataItemID` - the DataItam id
  Returns:
    the localized string describing the rank status for the DataItem

### valuesFromDataModel

    boolean valuesFromDataModel()

  Returns true if the values must be read directly from the data model, false if the values must be read from the internal variables.

  Returns:
    true if the values must be read directly from the data model, false if the values must be read from the internal variables

### valuesFromDataModel

    void valuesFromDataModel(boolean valuesFromDataModel)

  Sets if the the values must be read directly from the Data Model or from the internal variables.

  Parameters:
    `valuesFromDataModel` - true if the the values must be read directly from the data model, false if the values must be read from the internal variables

### rankOrder

    java.lang.String rankOrder(java.lang.String dataItemID)

  Given a data item id return the associated rank order

  Parameters:
    `dataItemID` - the data item unique identifier
  Returns:
    the associated rank order, valid values are `RankingSelectorComponents.TOP_RANKING`, `RankingSelectorComponents.BOTTOM_RANKING` a null string is returned if the received dataItemID is either null or not found in the data model or there's no ranking applied

### rankValue

    int rankValue(java.lang.String dataItemID)

  Given a data item id return the associated rank value.

  Parameters:
    `dataItemID` - the data item unique identifier
  Returns:
    the associated rank value, valid values are all the positive numbers, or `NO_RANK` when the dataItemID has no ranking applied or when the received dataItemID is either null or not found in the data model

### rankType

    int rankType(java.lang.String dataItemID)

  Given a data item id return the associated rank type.

  Parameters:
    `dataItemID` - the data item unique identifier
  Returns:
    the associated rank type, valid values are for OLAP `DataItemRankFilter.COUNT` `DataItemRankFilter.PERCENT` `DataItemRankFilter.SUM` for relational `DataItemRankFilter.COUNT` and in general `NO_RANK` when the dataItemID has no ranking applied or when the received dataItemID is either null or not found in the data model

### includeTies

    boolean includeTies(java.lang.String dataItemID)

  Deprecated. replaced by getIncludeTies(String dataItemID)

  Given a data item id says if the ties are included in the ranking.

  Parameters:
    `dataItemID` - the data item unique identifier
  Returns:
    true if the the ties are included in the ranking, false otherwise

### getIncludeTies

    java.lang.String getIncludeTies(java.lang.String dataItemID)

  Given a data item id says if the ties are included in the ranking.

  Parameters:
    `dataItemID` - the data item unique identifier
  Returns:
    one of the following: `RankingSelectorComponents.INCLUDE_TIES`, `RankingSelectorComponents.NOT_INCLUDE_TIES`, `RankingSelectorComponents.TIES_NOT_APPLICABLE`

### countRankTypeValue

    int countRankTypeValue()

  Returns the value associated to the "Count" ranking type.

  Returns:
    the value associated to the "Count" ranking type

### setModel

    void setModel(java.lang.Object model)

  Set the model that contains the data. Something like a `BusinessQueryToOLAPDataSetAdapter` or similar.

  Parameters:
    `model` - the model that contains the data.

### getModel

    java.lang.Object getModel()

  Return the model that contains the data.

  Returns:
    Object the model that contains the data, something like a `BusinessQueryToOLAPDataSetAdapter` or similar.

### setLocale

    void setLocale(java.util.Locale locale)

  Sets the locale used by the adapter. The bundle attribute is set too on the adapter according with the locale.

  Parameters:
    `locale` - The locale the adapter will use

### getLocale

    java.util.Locale getLocale()

  Returns the locale used by the adapter.

  Returns:
    the locale used by the adapter

### getLocalizedInfoText

    java.lang.String getLocalizedInfoText(java.lang.String rankOrder,
                                          int rankValue,
                                          int rankType,
                                          java.lang.String includeTies,
                                          java.lang.String basedOnDesc)

  Returns the localized string describing a rank status. Something like "Top 2 Count (including ties) based on ACTUAL_SUM for (1994, SOFA)"

  Parameters:
    `rankOrder` - the rank order like top or bottom
    `rankValue` - the amount of elements to rank
    `rankType` - the rank type

    for OLAP valid values are: `DataItemRankFilter.COUNT` `DataItemRankFilter.PERCENT` `DataItemRankFilter.SUM`

    for relational `DataItemRankFilter.COUNT`

    `includeTies` - if the ties must be included or not included `RankingSelectorComponents.INCLUDE_TIES`, `RankingSelectorComponents.NOT_INCLUDE_TIES`, `RankingSelectorComponents.TIES_NOT_APPLICABLE`
    `basedOnDesc` - the description of the based on measure, something like "ACTUAL_SUM for (1994, SOFA)" for OLAP, a null String for relational
  Returns:
    the localized string describing a rank status. Something like "Top 2 Count (including ties) based on ACTUAL_SUM for (1994, SOFA)"

### getLocalizedText

    java.lang.String getLocalizedText(java.lang.String text)

  Returns the localized version of a text using the locale currently set on adapter and the related resource bundle.

  Parameters:
    `text` - The text to be localized.
  Returns:
    the localized text, null if the received text cannot be localized

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.