|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.dataselectors.calculations.percent.PercentCalculationsSelectorDataSource
public class PercentCalculationsSelectorDataSource
Contains attributes and methods to provide a BusinessQuery-based implementation of the PercentCalculationsSelectorDataSourceInterface.
Field Summary | |
---|---|
protected com.sas.iquery.intelligentquery.BusinessQueryProviderInterface |
model
The BusinessQueryProviderInterface on which this dataSource operates. |
Constructor Summary | |
---|---|
PercentCalculationsSelectorDataSource()
Default constructor. |
|
PercentCalculationsSelectorDataSource(com.sas.iquery.intelligentquery.BusinessQueryProviderInterface model)
BusinessQueryProviderInterface Constructor. |
Method Summary | |
---|---|
void |
addItem(FractionalItemInfo itemInfo)
Adds a new fractional expression DataItem to the model. |
void |
commit()
Commits the new set of fractional items to the model. |
protected FractionalItemInfo |
createFractionalItemInfo(com.sas.iquery.metadata.business.DataItem dataItem)
Returns a FractionalItemInfo object to represent the specified DataItem. |
java.util.Map |
getDenominators()
Returns a map where the keys are the denominator ids and the the values are the denominator labels. |
java.util.List |
getFractionalItems()
Returns a list of items representing the current set of fractional items. |
java.util.Locale |
getLocale()
Returns the locale |
protected com.sas.iquery.intelligentquery.BusinessQueryProviderInterface |
getModel()
Returns the BusinessQueryProviderInterface on which this dataSource operates. |
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. |
void |
removeAllItems()
Remove all fractional expression DataItems from the model. |
void |
removeItem(FractionalItemInfo itemInfo)
Removes the item associated with the specified FractionalItemInfo. |
void |
setLocale(java.util.Locale locale)
Sets the locale |
protected void |
setModel(com.sas.iquery.intelligentquery.BusinessQueryProviderInterface model)
Sets the BusinessQueryProviderInterface on which this dataSource operates. |
void |
updateItem(FractionalItemInfo existingItemInfo,
FractionalItemInfo newItemInfo)
Updates the label of an existing fractional expression DataItem on the model. |
Field Detail |
---|
protected com.sas.iquery.intelligentquery.BusinessQueryProviderInterface model
Constructor Detail |
---|
public PercentCalculationsSelectorDataSource()
public PercentCalculationsSelectorDataSource(com.sas.iquery.intelligentquery.BusinessQueryProviderInterface model)
Method Detail |
---|
protected void setModel(com.sas.iquery.intelligentquery.BusinessQueryProviderInterface model)
model
- BusinessQueryProviderInterface on which this dataSource
operates.protected com.sas.iquery.intelligentquery.BusinessQueryProviderInterface getModel()
public boolean isOLAP()
isOLAP
in interface PercentCalculationsSelectorDataSourceInterface
public java.util.Map getNumerators()
getNumerators
in interface PercentCalculationsSelectorDataSourceInterface
{@link
- java.lang.IllegalStateException} if model is null.public static boolean isValidNumerator(com.sas.iquery.metadata.business.DataItem dataItem, com.sas.iquery.metadata.business.DataSelection dataSelection)
dataItem
- The DataItem to validate.dataSelection
- The DataSelection to which the DataItem belongs.
public java.util.Map getDenominators()
getDenominators
in interface PercentCalculationsSelectorDataSourceInterface
public java.util.List getFractionalItems()
Returns a list of items representing the current set of fractional items.
getFractionalItems
in interface PercentCalculationsSelectorDataSourceInterface
{@link
- java.lang.IllegalStateException} if model is null.protected FractionalItemInfo createFractionalItemInfo(com.sas.iquery.metadata.business.DataItem dataItem)
dataItem
- The DataItem to be represented by the FractionalItemInfo.
protected java.lang.String getResourceKeyForDenominatorType(int denominatorType)
denominatorType
- the type of aggreggate denominator.
public void removeItem(FractionalItemInfo itemInfo)
Removes the item associated with the specified FractionalItemInfo.
removeItem
in interface PercentCalculationsSelectorDataSourceInterface
itemInfo
- the FractionalItemInfo with information describing the
item to be removed.
{@link
- java.lang.IllegalStateException} if model is null.
{@link
- java.lang.IllegalStateException} if model's businessQuery is not a DataSelection.
{@link
- java.lang.RuntimeException} with MetadataException
cause if operation fails.public void addItem(FractionalItemInfo itemInfo)
Adds a new fractional expression DataItem to the model.
addItem
in interface PercentCalculationsSelectorDataSourceInterface
itemInfo
- The FractionalItemInfo that describes the new
fractional expression DataItem to be added.
{@link
- java.lang.IllegalStateException} if model is null.
{@link
- java.lang.RuntimeException} with MetadataException
cause if operation fails.public void updateItem(FractionalItemInfo existingItemInfo, FractionalItemInfo newItemInfo)
Updates the label of an existing fractional expression DataItem on the model.
updateItem
in interface PercentCalculationsSelectorDataSourceInterface
existingItemInfo
- information about the existing item.newItemInfo
- information to apply to the updated version
of the item.
{@link
- java.lang.IllegalStateException} if model is null.
{@link
- java.lang.RuntimeException} with MetadataException
cause if operation fails.public void removeAllItems()
Remove all fractional expression DataItems from the model.
removeAllItems
in interface PercentCalculationsSelectorDataSourceInterface
{@link
- java.lang.IllegalStateException} if model is null.
{@link
- java.lang.IllegalStateException} if model's businessQuery is not a DataSelection.
{@link
- java.lang.RuntimeException} with MetadataException
cause if operation fails.public void commit()
Commits the new set of fractional items to the model.
commit
in interface PercentCalculationsSelectorDataSourceInterface
{@link
- java.lang.IllegalStateException} if model is null.
{@link
- java.lang.RuntimeException} with IntelligentQueryException
cause if operation fails.public void setLocale(java.util.Locale locale)
setLocale
in interface PercentCalculationsSelectorDataSourceInterface
locale
- The locale.public java.util.Locale getLocale()
getLocale
in interface PercentCalculationsSelectorDataSourceInterface
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |