com.sas.dataselectors.filters
Interface AdvancedFilterModelInterface

All Superinterfaces:
AdvancedFilterDefinitionModelInterface, SimpleFilterDefinitionModelInterface
All Known Implementing Classes:
BusinessModelToAdvancedFilterModelAdapter, BusinessQueryToAdvancedFilterModelAdapter, DefaultAdvancedFilterModelAdapter

@SASScope(value="ALL")
public interface AdvancedFilterModelInterface
extends AdvancedFilterDefinitionModelInterface

This interface defines the relationship between the AdvancedFilterPanel and an implemented adaptor.

See Also:
SimpleFilterDefinitionModelInterface, SimpleFilterListEditorModelInterface

Method Summary
abstract  boolean addSelection(FilterLogicTestNodeInterface value)
          adds a new selection to the end of the FilterLogicList (cursor position undefined after an add)
abstract  FilterValueInterface applyExpressionValueEditorChanges(FilterLogicTestNodeInterface testNode, int valueIndex)
          Applies the changes made in the ExpressionValueEditor to the given FilterLogicTestNodeInterface.
abstract  FilterItemInterface applyFilterItemEditorChanges(FilterLogicTestNodeInterface testNode)
          Applies the changes made in the FilterItemEditor to the given FilterLogicTestNodeInterface.
abstract  FilterQualifierInterface applyFilterQualifierEditorChanges(FilterLogicTestNodeInterface testNode)
          Applies the changes made in the FilterQualifierEditor to the given FilterLogicTestNodeInterface.
abstract  FilterValueInterface applyPromptValueEditorChanges(FilterLogicTestNodeInterface testNode, int valueIndex)
          Applies the changes made in the PromptValueEditor to the given FilterLogicTestNodeInterface.
abstract  void cancel()
          Returns the filter model to its initial state.
abstract  void clear()
          Clear the filter selection model and commit the changes.
abstract  void clear(boolean commit)
          Clear the filter selection model and optionally commit the changes.
abstract  com.sas.swing.dataselectors.editors.ExpressionValueEditorInterface getExpressionValueEditor()
          Returns the editor to use to edit an expression value.
abstract  java.lang.String getFilterDescription()
          Gets the description for the overall filter.
abstract  com.sas.swing.dataselectors.editors.FilterItemEditorInterface getFilterItemEditor()
          Returns the editor to use to edit a filter item.
abstract  java.lang.String getFilterLabel()
          Returns the label for the overall filter.
abstract  FilterLogicListInterface getFilterLogicList()
          Returns a java.util.List of test nodes.
abstract  com.sas.swing.dataselectors.editors.QualifiersEditorInterface getFilterQualifierEditor()
          Returns the editor to use to edit a filter qualifier.
abstract  java.util.Locale getLocale()
          Returns the Locale currently set on the model.
abstract  int getMaxOutputObservations()
          Returns the current maximum number of output observations returned when gathering a list of possible values to select from when creating a filter expression.
abstract  com.sas.swing.dataselectors.editors.PromptValueEditorInterface getPromptValueEditor()
          Returns the editor to use to edit a prompt value.
abstract  java.util.List getPromptValueList(java.lang.Object testNode)
          Returns a List containing all known prompts filter values.
abstract  java.util.Map getPromptValueMap()
          Returns a Map containing all known prompts using their names for keys.
abstract  int getSelectionCount()
          get the number of selectable entries in the model.
abstract  int getSelectionCursor()
          get the index of the model cursor
abstract  SimpleFilterLogicTreeInterface getSelectionTree()
          Returns a tree model that defines a single compound filter.
abstract  boolean isEditedExpressionValue(java.lang.Object value)
          Returns TRUE if the given object represents a value that was created by the expression editor.
abstract  boolean isPromptedValue(java.lang.Object value)
          Returns TRUE if the given object represents a prompted value.
abstract  boolean isQuotedValue(java.lang.Object value)
          Returns TRUE if the given object represents a value that will be quoted during query generation.
abstract  boolean isUserCreatedValue(java.lang.Object value)
          Returns TRUE if the given object represents a value that was created by a user entering a String expression value in the filter selector.
abstract  boolean isValidFilter(FilterLogicTestNodeInterface testNode)
          Validates the filter.
abstract  void removeSelection()
          removes the current selection from the FilterLogicList (cursor position is undefined after remove)
abstract  void setExpressionValueEditor(com.sas.swing.dataselectors.editors.ExpressionValueEditorInterface editor)
          Sets the editor to use to edit an expression value.
abstract  void setExpressionValueEditorInfo(FilterLogicTestNodeInterface testNode, int valueIndex)
          Prepares the ExpressionValueEditor to edit the current filter value based on the given FilterLogicTestNodeInterface.
abstract  void setFilterDescription(java.lang.String value)
          Sets the description for the overall filter.
abstract  void setFilterItemEditor(com.sas.swing.dataselectors.editors.FilterItemEditorInterface editor)
          Sets the editor to use to edit a filter item.
abstract  void setFilterItemEditorInfo(FilterLogicTestNodeInterface testNode)
          Prepares the FilterItemEditor to edit the current filter value based on the given FilterLogicTestNodeInterface.
abstract  void setFilterLabel(java.lang.String label)
          Sets the label for the overall filter.
abstract  void setFilterQualifierEditor(com.sas.swing.dataselectors.editors.QualifiersEditorInterface editor)
          Sets the editor to use to edit a filter qualifier.
abstract  void setFilterQualifierEditorInfo(FilterLogicTestNodeInterface testNode)
          Prepares the FilterQualifierEditor to edit the selected qualifiers based on the given FilterLogicTestNodeInterface.
abstract  void setLocale(java.util.Locale locale)
          Sets the Locale to be used by the model.
abstract  void setMaxOutputObservations(int max)
          Sets the current maximum number of output observations to be returned when gathering a list of possible values to select from when creating a filter expression.
abstract  void setPromptValueEditor(com.sas.swing.dataselectors.editors.PromptValueEditorInterface editor)
          Sets the editor to use to edit a prompt value.
abstract  void setPromptValueEditorInfo(FilterLogicTestNodeInterface testNode, int valueIndex)
          Prepares the PromptValueEditor to edit the current filter value based on the given FilterLogicTestNodeInterface.
abstract  void setSelectionCursor(int index)
          move the model cursor to a new selection index
 
Methods inherited from interface com.sas.dataselectors.filters.AdvancedFilterDefinitionModelInterface
isOLAP
 
Methods inherited from interface com.sas.dataselectors.filters.SimpleFilterDefinitionModelInterface
commitChanges, getApplicationData, getDataSource, getRootFilterObject, getSelection, setApplicationData, setSelection
 

Method Detail

getFilterLabel

java.lang.String getFilterLabel()
Returns the label for the overall filter.

Returns:
String

setFilterLabel

void setFilterLabel(java.lang.String label)
Sets the label for the overall filter.

Parameters:
label - the new label

getFilterDescription

java.lang.String getFilterDescription()
Gets the description for the overall filter.

Returns:
String

setFilterDescription

void setFilterDescription(java.lang.String value)
Sets the description for the overall filter.

Parameters:
value - the new description

getSelectionTree

SimpleFilterLogicTreeInterface getSelectionTree()
Returns a tree model that defines a single compound filter. Individual filter expressions defined by FilterLogicTestNodeInterface objects are connected by AND, OR, and NOT nodes. All children of a single node are grouped together in the query.

Returns:
the filter logic tree that defines the filter
See Also:
FilterLogicTestNodeInterface, FilterLogicBaseNodeInterface, FilterLogicAndNodeInterface, FilterLogicOrNodeInterface, FilterLogicNotNodeInterface

getFilterLogicList

FilterLogicListInterface getFilterLogicList()
Returns a java.util.List of test nodes. See the rules in SimpleFilterDefintionModelInterface for allowing directly modfiable nodes using FilterLogicEditableTestNodeInterface. The underlying implementation of the list will have to handle inserting and updating new nodes. The objects passed in such calls will either be the objects implemented by the adapter OR in the case of an insert the new item will be of instance DefaultFilterLogicTestNode.

Returns:
FilterLogicListInterface
See Also:
DefaultFilterLogicList

setSelectionCursor

void setSelectionCursor(int index)
move the model cursor to a new selection index

Parameters:
int - the 0 based index in the FilterLogicList to be the new selection

getSelectionCursor

int getSelectionCursor()
get the index of the model cursor

Returns:
int the 0 based indes in the FilterLogicList of the current selection

addSelection

boolean addSelection(FilterLogicTestNodeInterface value)
adds a new selection to the end of the FilterLogicList (cursor position undefined after an add)

Parameters:
FilterLogicTestNodeInterface - logic test node values to make up the new object
Returns:
boolean true if successful

removeSelection

void removeSelection()
removes the current selection from the FilterLogicList (cursor position is undefined after remove)


getSelectionCount

int getSelectionCount()
get the number of selectable entries in the model.

Returns:
the number of selectable entries in the model

clear

void clear()
Clear the filter selection model and commit the changes.


clear

void clear(boolean commit)
Clear the filter selection model and optionally commit the changes.

Parameters:
commit - pass TRUE if the model should apply the changes to the underlying data source.

getPromptValueEditor

com.sas.swing.dataselectors.editors.PromptValueEditorInterface getPromptValueEditor()
Returns the editor to use to edit a prompt value.

Returns:
the prompt value editor

setPromptValueEditor

void setPromptValueEditor(com.sas.swing.dataselectors.editors.PromptValueEditorInterface editor)
Sets the editor to use to edit a prompt value.

Parameters:
editor - the prompt value editor

getExpressionValueEditor

com.sas.swing.dataselectors.editors.ExpressionValueEditorInterface getExpressionValueEditor()
Returns the editor to use to edit an expression value.

Returns:
the expression value editor

setExpressionValueEditor

void setExpressionValueEditor(com.sas.swing.dataselectors.editors.ExpressionValueEditorInterface editor)
Sets the editor to use to edit an expression value.

Parameters:
editor - the expression value editor

getFilterItemEditor

com.sas.swing.dataselectors.editors.FilterItemEditorInterface getFilterItemEditor()
Returns the editor to use to edit a filter item.

Returns:
the filter item editor

setFilterItemEditor

void setFilterItemEditor(com.sas.swing.dataselectors.editors.FilterItemEditorInterface editor)
Sets the editor to use to edit a filter item.

Parameters:
editor - the filter item editor

getFilterQualifierEditor

com.sas.swing.dataselectors.editors.QualifiersEditorInterface getFilterQualifierEditor()
Returns the editor to use to edit a filter qualifier.

Returns:
the filter qualifier editor

setFilterQualifierEditor

void setFilterQualifierEditor(com.sas.swing.dataselectors.editors.QualifiersEditorInterface editor)
Sets the editor to use to edit a filter qualifier.

Parameters:
editor - the filter qualifier editor

setFilterItemEditorInfo

void setFilterItemEditorInfo(FilterLogicTestNodeInterface testNode)
Prepares the FilterItemEditor to edit the current filter value based on the given FilterLogicTestNodeInterface.

Parameters:
testNode - the test node to examine

applyFilterItemEditorChanges

FilterItemInterface applyFilterItemEditorChanges(FilterLogicTestNodeInterface testNode)
Applies the changes made in the FilterItemEditor to the given FilterLogicTestNodeInterface. This should set the Filter Item on the test node to one that represents the selection made in the editor.

Parameters:
testNode - the test node to examine
Returns:
the new/selected FilterItemInterface that represents the user's selections

setFilterQualifierEditorInfo

void setFilterQualifierEditorInfo(FilterLogicTestNodeInterface testNode)
Prepares the FilterQualifierEditor to edit the selected qualifiers based on the given FilterLogicTestNodeInterface.

Parameters:
testNode - the test node to examine

applyFilterQualifierEditorChanges

FilterQualifierInterface applyFilterQualifierEditorChanges(FilterLogicTestNodeInterface testNode)
Applies the changes made in the FilterQualifierEditor to the given FilterLogicTestNodeInterface. This should set the Filter Qualifier list on the test node to one that represents the selection made in the editor.

Parameters:
testNode - the test node to examine
Returns:
the new/selected FilterQualifierInterface that represents the user's selections

setPromptValueEditorInfo

void setPromptValueEditorInfo(FilterLogicTestNodeInterface testNode,
                              int valueIndex)
Prepares the PromptValueEditor to edit the current filter value based on the given FilterLogicTestNodeInterface.

Parameters:
testNode - the test node to examine
valueIndex - the index in the value list of the value to edit

applyPromptValueEditorChanges

FilterValueInterface applyPromptValueEditorChanges(FilterLogicTestNodeInterface testNode,
                                                   int valueIndex)
Applies the changes made in the PromptValueEditor to the given FilterLogicTestNodeInterface. This should set the Filter Value list on the test node to one that represents the selection made in the editor.

Parameters:
testNode - the test node to examine
valueIndex - the index in the value list of the value to edit
Returns:
the new/selected FilterValueInterface that represents the user's selections

setExpressionValueEditorInfo

void setExpressionValueEditorInfo(FilterLogicTestNodeInterface testNode,
                                  int valueIndex)
Prepares the ExpressionValueEditor to edit the current filter value based on the given FilterLogicTestNodeInterface.

Parameters:
testNode - the test node to examine
valueIndex - the index in the value list of the value to edit

applyExpressionValueEditorChanges

FilterValueInterface applyExpressionValueEditorChanges(FilterLogicTestNodeInterface testNode,
                                                       int valueIndex)
Applies the changes made in the ExpressionValueEditor to the given FilterLogicTestNodeInterface. This should set the Filter Value list on the test node to one that represents the selection made in the editor.

Parameters:
testNode - the test node to examine
valueIndex - the index in the value list of the value to edit
Returns:
the new/selected FilterValueInterface that represents the user's selections

isPromptedValue

boolean isPromptedValue(java.lang.Object value)
Returns TRUE if the given object represents a prompted value.

Parameters:
value - the Object to examine
Returns:
TRUE if the given object represents a prompted value, FALSE otherwise

getPromptValueMap

java.util.Map getPromptValueMap()
Returns a Map containing all known prompts using their names for keys.

Returns:
the prompt lookup table

getPromptValueList

java.util.List getPromptValueList(java.lang.Object testNode)
Returns a List containing all known prompts filter values.

Parameters:
testNode - the object to return prompts for
Returns:
a List of FilterValueInterface objects containing all known prompts filter values

isEditedExpressionValue

boolean isEditedExpressionValue(java.lang.Object value)
Returns TRUE if the given object represents a value that was created by the expression editor.

Parameters:
value - the Object to examine
Returns:
TRUE if the given object was created by the expression editor

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

getMaxOutputObservations

int getMaxOutputObservations()
Returns the current maximum number of output observations returned when gathering a list of possible values to select from when creating a filter expression.

Returns:
the maximum number of output observations

setMaxOutputObservations

void setMaxOutputObservations(int max)
Sets the current maximum number of output observations to be returned when gathering a list of possible values to select from when creating a filter expression.

Parameters:
max - the new maximum number of output observations
See Also:
Governing

isValidFilter

boolean isValidFilter(FilterLogicTestNodeInterface testNode)
                      throws FilterException
Validates the filter. Returns true if the filter is valid. If the filter is invalid, then either a FilterException is thrown or false is returned. It may be possible to get more information about the reason of failure by calling getMessage() on the FilterException.

Parameters:
testNode - the testNode to validate the filter for
Returns:
true if the filter is valid otherwise false or a FilterException is thrown
Throws:
FilterException - if any errors occurred during the validation of the filter

isUserCreatedValue

boolean isUserCreatedValue(java.lang.Object value)
Returns TRUE if the given object represents a value that was created by a user entering a String expression value in the filter selector.

Parameters:
value - the Object to examine
Returns:
TRUE if the given object was created by a user entering a String expression value in the filter selector

isQuotedValue

boolean isQuotedValue(java.lang.Object value)
Returns TRUE if the given object represents a value that will be quoted during query generation.

Parameters:
value - the Object to examine
Returns:
TRUE if the given object represents a value that will be quoted during query generation



Copyright © 2009 SAS Institute Inc. All Rights Reserved.