com.sas.dataselectors.filters
Interface FilterableListModelInterface

All Known Implementing Classes:
AbstractFilterableListModel, BusinessModelToFilterableListModelAdapter, BusinessQueryToFilterableListModelAdapter

public interface FilterableListModelInterface

This interface provides the ability to create and maintain a list of filterable items for a native model.


Method Summary
 void cancel()
          Returns the filter model to its initial state.
 void clearAll()
          Clears all filters from all filterables.
 void clearFilter(int index)
          Clears the filter on the filterable item at the given index.
 boolean commitChanges()
          The master commit for changes made to any/all of the filter models on the filterable items.
 FilterableItemInterface getFilterableItem(java.lang.Object source)
          Returns the FilterableItemInterface instance associated with the given source object.
 java.util.List getFilterableItems()
          Returns a list of FilterableItemInterface instances that define the portions of the source model that can be filtered and gives each item's filter model.
 java.lang.Object getInitialFilter()
          Returns an optional initial object whose filter should be edited directly.
 java.util.Locale getLocale()
          Returns the Locale currently set on the model.
 java.lang.Object getModel()
          Returns the data source for the model.
 void setLocale(java.util.Locale locale)
          Sets the Locale to be used by the model.
 

Method Detail

getModel

java.lang.Object getModel()
Returns the data source for the model. For now this will either be a BusinessModel or BusinessQuery instance.

Returns:
the model for this list

getInitialFilter

java.lang.Object getInitialFilter()
Returns an optional initial object whose filter should be edited directly. If this object is not null, then the initial dialog presenting all filterable items should be skipped in favor of editing the filter on the specified object.

Returns:
the initial filter object

getFilterableItems

java.util.List getFilterableItems()
Returns a list of FilterableItemInterface instances that define the portions of the source model that can be filtered and gives each item's filter model.

Returns:
the list of filterable items

getFilterableItem

FilterableItemInterface getFilterableItem(java.lang.Object source)
Returns the FilterableItemInterface instance associated with the given source object. If no FilterableItemInterface exists in the list of filterable items with a matching source object, then null is returned.

Parameters:
source - the native model object to examine
Returns:
the filterable item for the given native model object

commitChanges

boolean commitChanges()
The master commit for changes made to any/all of the filter models on the filterable items.

Returns:
true if the native model was successfully updated, false otherwise

clearAll

void clearAll()
Clears all filters from all filterables.


clearFilter

void clearFilter(int index)
Clears the filter on the filterable item at the given index.

Parameters:
index - the index in the list of the filterable item to clear the filter from

cancel

void cancel()
Returns the filter model to its initial state.


getLocale

java.util.Locale getLocale()
Returns the Locale currently set on the model.

Returns:
the current Locale

setLocale

void setLocale(java.util.Locale locale)
Sets the Locale to be used by the model.

Parameters:
locale - the new Locale for the model



Copyright © 2009 SAS Institute Inc. All Rights Reserved.