com.sas.iquery.dataretrieval.convenience.olap
Class OLAPGroupedFilterDataProviderImpl

com.sas.iquery.dataretrieval.convenience.olap.OLAPGroupedFilterDataProviderImpl
All Implemented Interfaces:
com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider

public class OLAPGroupedFilterDataProviderImpl
implements com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider


Constructor Summary
OLAPGroupedFilterDataProviderImpl(DataSelection ds, BusinessGroup group)
          Constructor that will determine original included items, included items, and excluded items.
 
Method Summary
 void dispose()
          Dispose of all resources that may be held by Group Filter DataProvider.
 java.lang.String getActiveFilterSelection(FilterItem filter)
          Utility method for this "impl" class to see active filter definition applied to session.
 java.lang.String getActiveFilterString()
          Utility method for this "impl" class to see active filter definition applied to session.
 java.lang.String getCurrentLevelLabel(FilterItem filterItem)
          We need to be able to allow the clients to see the current level label (not the unique name) on this filter item.
 java.util.Map<java.lang.String,java.lang.String> getExcludedValues(FilterItem filterItem)
          Member values in filter are either selected or unselected.
 java.lang.String getFilterLabel(FilterItem filter)
          Get the name of the filter item (either dataItem label for relational or level label for OLAP)
 java.util.List<FilterItem> getGroupedFilters(BusinessGroup group)
          Get a list of grouped filter item that are applied in this data selection for this group.
 java.util.Map<java.lang.String,java.lang.String> getIncludedValues(FilterItem filterItem)
          Member values in filter are either selected or unselected.
 java.util.List<java.lang.String> getLevelLabels(FilterItem filter)
          We need to be able to allow the clients to see the level labels (not the unique name) on this filter item.
protected static java.lang.String getMessage(java.lang.String key)
           
protected static java.lang.String getMessage(java.lang.String key, java.lang.Object[] args)
           
protected static com.sas.iquery.util.impl.MessageFormatter getMessageFormatter(java.lang.String key)
           
protected static com.sas.iquery.util.impl.MessageFormatter getMessageFormatter(java.lang.String key, java.lang.Object[] args)
           
 void refresh(BusinessGroup group)
           
 void refresh(FilterItem activeFilter)
          Filter selections are cumulative, so each selection determines values available in each of the other selection lists.
 void reset()
          Resets the original full list of included, excluded, and selected items.
 void setCurrentLevel(FilterItem filterItem, java.lang.String level)
          Future implementation for setting the latest level definition on a dimension in an OLAP elastic (or grouped) filter.
 

Constructor Detail

OLAPGroupedFilterDataProviderImpl

public OLAPGroupedFilterDataProviderImpl(DataSelection ds,
                                         BusinessGroup group)
                                  throws DataRetrievalException
Constructor that will determine original included items, included items, and excluded items. When constructor is first execute included and original are identical and excluded is empty. The client will pass in selected items via the FilterItem via refresh method that will effect included and excluded lists.

The assumption when this constructor is run will be that selected items in the filter expression, original include item, and included items will be the same in the first pass.

It is important to remember that filter such as ByGroup, Parent (or Section), or Drill down will be honor

Parameters:
ds -
group -
Throws:
DataRetrievalException
Method Detail

getMessage

protected static java.lang.String getMessage(java.lang.String key)

getMessage

protected static java.lang.String getMessage(java.lang.String key,
                                             java.lang.Object[] args)

getMessageFormatter

protected static com.sas.iquery.util.impl.MessageFormatter getMessageFormatter(java.lang.String key)

getMessageFormatter

protected static com.sas.iquery.util.impl.MessageFormatter getMessageFormatter(java.lang.String key,
                                                                               java.lang.Object[] args)

dispose

public void dispose()
Description copied from interface: GroupedFilterDataProvider
Dispose of all resources that may be held by Group Filter DataProvider. This should ALWAYS be done when the data provider is no longer needed to reduce memory usage and maintain performance.

Specified by:
dispose in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
See Also:
GroupedFilterDataProvider.dispose()

getCurrentLevelLabel

public java.lang.String getCurrentLevelLabel(FilterItem filterItem)
We need to be able to allow the clients to see the current level label (not the unique name) on this filter item. Remember that we have one to one for relational data provide for filterItem and elasticItem. But, for OLAP we have many to one.

Specified by:
getCurrentLevelLabel in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
Returns:
See Also:
GroupedFilterDataProvider.getCurrentLevelLabel(com.sas.iquery.metadata.business.FilterItem)

getExcludedValues

public java.util.Map<java.lang.String,java.lang.String> getExcludedValues(FilterItem filterItem)
Description copied from interface: GroupedFilterDataProvider
Member values in filter are either selected or unselected. Based on that selection, an item in an other grouped filter will effect the excluded (not found in other grouped filters) values of this filter.

Specified by:
getExcludedValues in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
Returns:
See Also:
GroupedFilterDataProvider.getExcludedValues(com.sas.iquery.metadata.business.FilterItem)

getFilterLabel

public java.lang.String getFilterLabel(FilterItem filter)
Description copied from interface: GroupedFilterDataProvider
Get the name of the filter item (either dataItem label for relational or level label for OLAP)

Specified by:
getFilterLabel in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
Returns:
See Also:
GroupedFilterDataProvider.getFilterLabel(com.sas.iquery.metadata.business.FilterItem)

getGroupedFilters

public java.util.List<FilterItem> getGroupedFilters(BusinessGroup group)
Description copied from interface: GroupedFilterDataProvider
Get a list of grouped filter item that are applied in this data selection for this group.

Specified by:
getGroupedFilters in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
Returns:
See Also:
GroupedFilterDataProvider.getGroupedFilters(com.sas.iquery.metadata.business.BusinessGroup)

getIncludedValues

public java.util.Map<java.lang.String,java.lang.String> getIncludedValues(FilterItem filterItem)
Description copied from interface: GroupedFilterDataProvider
Member values in filter are either selected or unselected. Based on that selection, an item in an other grouped filter will effect the included (found in other grouped filters) values of this filter.

Specified by:
getIncludedValues in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
Returns:
See Also:
GroupedFilterDataProvider.getIncludedValues(com.sas.iquery.metadata.business.FilterItem)

getLevelLabels

public java.util.List<java.lang.String> getLevelLabels(FilterItem filter)
We need to be able to allow the clients to see the level labels (not the unique name) on this filter item. Remember that we have one to one for relational data provide for filterItem and elasticItem. But, for OLAP we have many to one.

Specified by:
getLevelLabels in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
See Also:
GroupedFilterDataProvider.getLevelLabels(com.sas.iquery.metadata.business.FilterItem)

refresh

public void refresh(BusinessGroup group)
             throws DataRetrievalException
Throws:
DataRetrievalException
See Also:
com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider#refresh(com.sas.iquery.metadata.business.BusinessGroup)

refresh

public void refresh(FilterItem activeFilter)
             throws DataRetrievalException
Description copied from interface: GroupedFilterDataProvider
Filter selections are cumulative, so each selection determines values available in each of the other selection lists. Each selection also impacts the corresponding object(s). So, this method will refresh the list of included and excluded items on the other non-active filters. as triggered by a single filter item.

Specified by:
refresh in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
Throws:
DataRetrievalException
See Also:
GroupedFilterDataProvider.refresh(com.sas.iquery.metadata.business.FilterItem)

getActiveFilterString

public java.lang.String getActiveFilterString()
Utility method for this "impl" class to see active filter definition applied to session.

Returns:

getActiveFilterSelection

public java.lang.String getActiveFilterSelection(FilterItem filter)
Utility method for this "impl" class to see active filter definition applied to session.

Returns:

reset

public void reset()
           throws DataRetrievalException
Description copied from interface: GroupedFilterDataProvider
Resets the original full list of included, excluded, and selected items.

Specified by:
reset in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
Throws:
DataRetrievalException
See Also:
GroupedFilterDataProvider.reset()

setCurrentLevel

public void setCurrentLevel(FilterItem filterItem,
                            java.lang.String level)
Description copied from interface: GroupedFilterDataProvider
Future implementation for setting the latest level definition on a dimension in an OLAP elastic (or grouped) filter. If the level is change, a refresh on the filter item should follow.

Specified by:
setCurrentLevel in interface com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider
See Also:
com.sas.iquery.dataretrieval.convenience.GroupedFilterDataProvider#setCurrentLevel(com.sas.iquery.metadata.business.FilterItem, com.sas.iquery.metadata.physical.Level)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.