com.sas.dataselectors.calculations.percent
Class PercentCalculationsSelectorOLAPDataSource

com.sas.dataselectors.calculations.percent.PercentCalculationsSelectorOLAPDataSource
All Implemented Interfaces:
PercentCalculationsSelectorDataSourceInterface

public class PercentCalculationsSelectorOLAPDataSource

Contains attributes and methods to provide a BusinessQuery-based implementation of the PercentCalculationsSelectorDataSourceInterface.

Since:
3.1.4

Field Summary
 
Fields inherited from class com.sas.dataselectors.calculations.percent.PercentCalculationsSelectorDataSource
model
 
Constructor Summary
PercentCalculationsSelectorOLAPDataSource()
          Default constructor.
PercentCalculationsSelectorOLAPDataSource(com.sas.iquery.intelligentquery.BusinessQueryProviderInterface model)
          BusinessQueryProviderInterface Constructor.
 
Method Summary
 java.util.Map getDenominators()
          Returns a map where the keys are the denominator ids and the the values are the denominator labels.
 java.util.Map getNumerators()
          Returns a map where the keys are the numerator ids and the the values are the numerator labels.
protected  java.lang.String getResourceKeyForDenominatorType(int denominatorType)
          Returns the resource key to use in fetching the label for one of the aggregate denominator types.
 boolean isOLAP()
          Returns true if the data source is OLAP based.
static boolean isValidNumerator(com.sas.iquery.metadata.business.DataItem dataItem, com.sas.iquery.metadata.business.DataSelection dataSelection)
          Returns a boolean indicating whether the dataItem may be used as the numerator in a FractionOfTotalExpression.
 
Methods inherited from class com.sas.dataselectors.calculations.percent.PercentCalculationsSelectorDataSource
addItem, commit, createFractionalItemInfo, getFractionalItems, getLocale, getModel, removeAllItems, removeItem, setLocale, setModel, updateItem
 

Constructor Detail

PercentCalculationsSelectorOLAPDataSource

public PercentCalculationsSelectorOLAPDataSource()
Default constructor.


PercentCalculationsSelectorOLAPDataSource

public PercentCalculationsSelectorOLAPDataSource(com.sas.iquery.intelligentquery.BusinessQueryProviderInterface model)
BusinessQueryProviderInterface Constructor.

Method Detail

isOLAP

public boolean isOLAP()
Returns true if the data source is OLAP based.

Specified by:
isOLAP in interface PercentCalculationsSelectorDataSourceInterface
Overrides:
isOLAP in class PercentCalculationsSelectorDataSource
Returns:
TRUE if the data source is OLAP based

getNumerators

public java.util.Map getNumerators()
Returns a map where the keys are the numerator ids and the the values are the numerator labels.

Specified by:
getNumerators in interface PercentCalculationsSelectorDataSourceInterface
Overrides:
getNumerators in class PercentCalculationsSelectorDataSource
Returns:
the map of numerator ids and labels.
Throws:
{@link - java.lang.IllegalStateException} if model is null.

isValidNumerator

public static boolean isValidNumerator(com.sas.iquery.metadata.business.DataItem dataItem,
                                       com.sas.iquery.metadata.business.DataSelection dataSelection)
Returns a boolean indicating whether the dataItem may be used as the numerator in a FractionOfTotalExpression.

Parameters:
dataItem - The DataItem to validate.
dataSelection - The DataSelection to which the DataItem belongs.
Returns:
a boolean indicating whether the dataItem may be used as the numerator in a FractionOfTotalExpression.

getDenominators

public java.util.Map getDenominators()
Returns a map where the keys are the denominator ids and the the values are the denominator labels.

Specified by:
getDenominators in interface PercentCalculationsSelectorDataSourceInterface
Overrides:
getDenominators in class PercentCalculationsSelectorDataSource
Returns:
the map of denominator ids and labels.
Throws:
{@link - java.lang.IllegalStateException} if model is null.

getResourceKeyForDenominatorType

protected java.lang.String getResourceKeyForDenominatorType(int denominatorType)
Returns the resource key to use in fetching the label for one of the aggregate denominator types.

Overrides:
getResourceKeyForDenominatorType in class PercentCalculationsSelectorDataSource
Parameters:
denominatorType - the type of aggreggate denominator.
Returns:
the resource key to use in fetching the label for one of the aggregate denominator types.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.