|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.dataselectors.ranking.BaseRankingSelectorAdapter
public abstract class BaseRankingSelectorAdapter
Base class that contains attributes and methods common to the different Ranking Selector adapters.
Field Summary | |
---|---|
protected java.util.ResourceBundle |
bundle
|
protected java.util.Map |
dataItems
Stores the ranking info for all the data items that are in the data model. |
protected com.sas.iquery.metadata.business.BusinessQuery |
dataModel
The data model used by the adapter. |
protected java.util.Locale |
locale
The locale used by the adapter |
protected java.lang.Object |
model
The model that contains the data. |
protected java.util.Map |
rankStatuses
The localized descriptions of the rank statuses for all the DataItems. |
protected java.lang.String |
RB_KEY
|
protected boolean |
valuesFromDataModel
Flag to indicate if the values must be read directly from the data model or from the internal variables. |
Fields inherited from interface com.sas.dataselectors.ranking.RankingSelectorInterface |
---|
NO_RANK |
Constructor Summary | |
---|---|
BaseRankingSelectorAdapter()
Default constructor. |
Method Summary | |
---|---|
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. |
protected java.util.Map |
dataItems()
Returns the dataItems Map. |
protected void |
dataItems(java.util.Map dataItems)
Sets the dataItems Map. |
com.sas.iquery.metadata.business.BusinessQuery |
dataModel()
Returns the model that contains the data. |
void |
dataModel(com.sas.iquery.metadata.business.BusinessQuery model)
Sets the model that contains the data. |
java.lang.String |
getIncludeTies()
Says if the ties are included. |
java.lang.String |
getIncludeTies(java.lang.String dataItemID)
Given a data item id says if the ties are included in the ranking. |
java.util.Locale |
getLocale()
Returns the locale used by the adapter. |
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. |
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. |
java.lang.Object |
getModel()
Return the model that contains the data. |
protected java.lang.Object |
getRankFilter(java.lang.String dataItemID)
|
boolean |
includeTies()
Deprecated. replaced by getIncludeTies(). |
void |
includeTies(boolean isIncludeTies)
Deprecated. replaced by setIncludeTies(). |
boolean |
includeTies(java.lang.String dataItemID)
Deprecated. replaced by getIncludeTies(String dataItemID) |
protected abstract void |
initDataItems()
Reading from the data model fills the dataItems instance variable with the ranking attributes of all the data items in the data model. |
boolean |
percentageRanking()
Says if the ranking is percentage or absolute. |
void |
percentageRanking(boolean isPercentage)
Sets the type of ranking to either percentage or absolute. |
int |
rankingCount()
Returns the amount of elements to rank. |
void |
rankingCount(int count)
Sets the amount of elements to rank. |
java.lang.String |
rankOrder(java.lang.String dataItemID)
Given a data item id return the associated rank order |
protected java.util.Map |
rankStatuses()
Returnss the rankStatuses attribute. |
protected void |
rankStatuses(java.util.Map rankStatuses)
Sets the rankStatuses attribute. |
int |
rankType()
Returns the rank type. |
void |
rankType(int rankType)
Sets the rank type. |
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. |
int |
rankValue(java.lang.String dataItemID)
Given a data item id return the associated rank value. |
void |
setIncludeTies(java.lang.String isIncludeTies)
Sets if the ties are included. |
void |
setLocale(java.util.Locale locale)
Sets the locale used by the adapter. |
void |
setModel(java.lang.Object model)
Set the model that contains the data. |
boolean |
topRanking()
Says if the ranking is top or bottom. |
void |
topRanking(boolean isTop)
Sets the type of ranking to either top or bottom. |
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. |
void |
valuesFromDataModel(boolean valuesFromDataModel)
Sets if the the values must be read directly from the Data Model or from the internal variables. |
Field Detail |
---|
protected com.sas.iquery.metadata.business.BusinessQuery dataModel
protected boolean valuesFromDataModel
protected java.lang.Object model
protected java.util.Map rankStatuses
protected java.util.Locale locale
protected java.lang.String RB_KEY
protected java.util.ResourceBundle bundle
protected java.util.Map dataItems
Constructor Detail |
---|
public BaseRankingSelectorAdapter()
Method Detail |
---|
public boolean topRanking()
RankingSelectorInterface
topRanking
in interface RankingSelectorInterface
public int rankingCount()
RankingSelectorInterface
rankingCount
in interface RankingSelectorInterface
public boolean percentageRanking()
RankingSelectorInterface
percentageRanking
in interface RankingSelectorInterface
public void topRanking(boolean isTop)
RankingSelectorInterface
topRanking
in interface RankingSelectorInterface
isTop
- true if it's a top ranking, false if it's a bottom rankingpublic void percentageRanking(boolean isPercentage)
RankingSelectorInterface
percentageRanking
in interface RankingSelectorInterface
isPercentage
- true if it's a percentage ranking, false if it's an absolute rankingpublic void rankingCount(int count)
RankingSelectorInterface
rankingCount
in interface RankingSelectorInterface
count
- the amount of elements to rank, > 0.protected java.util.Map dataItems()
protected void dataItems(java.util.Map dataItems)
dataItems
- the dataItems Mappublic void dataModel(com.sas.iquery.metadata.business.BusinessQuery model)
model
- the model that contains the data.public com.sas.iquery.metadata.business.BusinessQuery dataModel()
protected abstract void initDataItems()
public void includeTies(boolean isIncludeTies)
RankingSelectorInterface
includeTies
in interface RankingSelectorInterface
isIncludeTies
- true if the ties are included, false otherwisepublic boolean includeTies()
RankingSelectorInterface
includeTies
in interface RankingSelectorInterface
public void setIncludeTies(java.lang.String isIncludeTies)
RankingSelectorInterface
setIncludeTies
in interface RankingSelectorInterface
isIncludeTies
- valid values are:
RankingSelectorComponents.INCLUDE_TIES
,
RankingSelectorComponents.NOT_INCLUDE_TIES
,
RankingSelectorComponents.TIES_NOT_APPLICABLE
public java.lang.String getIncludeTies()
RankingSelectorInterface
getIncludeTies
in interface RankingSelectorInterface
RankingSelectorComponents.INCLUDE_TIES
,
RankingSelectorComponents.NOT_INCLUDE_TIES
,
RankingSelectorComponents.TIES_NOT_APPLICABLE
public void rankType(int rankType)
RankingSelectorInterface
rankType
in interface RankingSelectorInterface
rankType
- the rank type,
for OLAP valid values are:
DataItemRankFilter.COUNT
DataItemRankFilter.PERCENT
DataItemRankFilter.SUM
for relational
DataItemRankFilter.COUNT
public int rankType()
RankingSelectorInterface
rankType
in interface RankingSelectorInterface
DataItemRankFilter.COUNT
DataItemRankFilter.PERCENT
DataItemRankFilter.SUM
for relational DataItemRankFilter.COUNT
public abstract java.util.Map rankTypes()
rankTypes
in interface RankingSelectorInterface
public boolean valuesFromDataModel()
RankingSelectorInterface
valuesFromDataModel
in interface RankingSelectorInterface
public void valuesFromDataModel(boolean valuesFromDataModel)
RankingSelectorInterface
valuesFromDataModel
in interface RankingSelectorInterface
valuesFromDataModel
- true if the the values must be read directly from the data model, false if the values must be read from the internal variablespublic abstract java.lang.String dataItemRankStatus(java.lang.String dataItemID)
dataItemRankStatus
in interface RankingSelectorInterface
dataItemID
- the DataItam id
protected void rankStatuses(java.util.Map rankStatuses)
rankStatuses
- the rankStatuses attributeprotected java.util.Map rankStatuses()
rankStatuses
- the rankStatuses attributepublic java.lang.String rankOrder(java.lang.String dataItemID)
RankingSelectorInterface
rankOrder
in interface RankingSelectorInterface
dataItemID
- the data item unique identifier
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 appliedpublic int rankValue(java.lang.String dataItemID)
RankingSelectorInterface
rankValue
in interface RankingSelectorInterface
dataItemID
- the data item unique identifier
RankingSelectorInterface.NO_RANK
when the dataItemID has no ranking applied or when the received dataItemID is either null or not found in the data modelpublic int rankType(java.lang.String dataItemID)
RankingSelectorInterface
rankType
in interface RankingSelectorInterface
dataItemID
- the data item unique identifier
DataItemRankFilter.COUNT
DataItemRankFilter.PERCENT
DataItemRankFilter.SUM
for relational
DataItemRankFilter.COUNT
and in general RankingSelectorInterface.NO_RANK
when the dataItemID has no ranking applied or when the received dataItemID is either null or not found in the data modelpublic boolean includeTies(java.lang.String dataItemID)
RankingSelectorInterface
includeTies
in interface RankingSelectorInterface
dataItemID
- the data item unique identifier
public java.lang.String getIncludeTies(java.lang.String dataItemID)
RankingSelectorInterface
getIncludeTies
in interface RankingSelectorInterface
dataItemID
- the data item unique identifier
RankingSelectorComponents.INCLUDE_TIES
,
RankingSelectorComponents.NOT_INCLUDE_TIES
,
RankingSelectorComponents.TIES_NOT_APPLICABLE
public int countRankTypeValue()
RankingSelectorInterface
countRankTypeValue
in interface RankingSelectorInterface
protected java.lang.Object getRankFilter(java.lang.String dataItemID)
public void setModel(java.lang.Object model)
RankingSelectorInterface
BusinessQueryToOLAPDataSetAdapter
or similar.
setModel
in interface RankingSelectorInterface
model
- the model that contains the data.public java.lang.Object getModel()
RankingSelectorInterface
getModel
in interface RankingSelectorInterface
BusinessQueryToOLAPDataSetAdapter
or similar.public void setLocale(java.util.Locale locale)
RankingSelectorInterface
setLocale
in interface RankingSelectorInterface
locale
- The locale the adapter will usepublic java.util.Locale getLocale()
RankingSelectorInterface
getLocale
in interface RankingSelectorInterface
public java.lang.String getLocalizedInfoText(java.lang.String rankOrder, int rankValue, int rankType, java.lang.String includeTies, java.lang.String basedOnDesc)
RankingSelectorInterface
getLocalizedInfoText
in interface RankingSelectorInterface
rankOrder
- the rank order like top or bottomrankValue
- the amount of elements to rankrankType
- 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
public java.lang.String getLocalizedText(java.lang.String text)
RankingSelectorInterface
getLocalizedText
in interface RankingSelectorInterface
text
- The text to be localized.
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |