|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.dataselectors.filters.DefaultFilterItem
public class DefaultFilterItem
The default implementation of the FilterItemInterface, this class contains lists of supported conditionals and values. The label is displayed to the user for selection but when this item is selected for creating a filter, only the object returned by getItem() is stored in the SelectionLogicNode result. This also supports a list of 'subitems' for an item. If getSubitemIsRequired() returns true the dialog will enforce the picking of at lease one of the subitems. At this time, the subitems are not evaluated for over-riding the active condition and values lists, this is a possible future enhancement. Actual values are derived from data while possible values come from SAS formats or predefined lists of values.
Field Summary |
---|
Fields inherited from interface com.sas.dataselectors.filters.FilterItemInterface |
---|
ITEMTYPE_ALPHANUMERIC, ITEMTYPE_BITSTRING, ITEMTYPE_BOOLEAN, ITEMTYPE_CURRENCY, ITEMTYPE_DATE, ITEMTYPE_DATETIME, ITEMTYPE_INTERVAL_DT, ITEMTYPE_INTERVAL_YM, ITEMTYPE_NUMERIC, ITEMTYPE_TIME, ITEMTYPE_UNKNOWN |
Constructor Summary | |
---|---|
DefaultFilterItem()
Constructs a new filter item with the default properties. |
|
DefaultFilterItem(java.lang.String itemLabel)
Constructs a new filter item with the given label. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues)
Constructs a new filter item with the given properties. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues,
java.util.List itemPossibleValues,
java.util.List itemActualValues)
Constructs a new filter item with the given properties. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues,
java.util.List itemPossibleValues,
java.util.List itemActualValues,
FilterItemListInterface itemSubitems,
boolean subitemsRequired)
Constructs a new filter item with the given properties. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues,
java.util.List itemPossibleValues,
java.util.List itemActualValues,
FilterQualifierListInterface itemQualfiers,
boolean qualifiersRequired)
Constructs a new filter item with the given properties. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues,
java.util.List itemPossibleValues,
java.util.List itemActualValues,
FilterQualifierListInterface itemQualfiers,
boolean qualifiersRequired,
FilterItemListInterface itemSubitems,
boolean subitemsRequired)
Constructs a new filter item with the given properties. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues,
java.lang.Object[] itemPossibleValues,
java.lang.Object[] itemActualValues)
Constructs a new filter item with the given properties. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues,
java.lang.Object[] itemPossibleValues,
java.lang.Object[] itemActualValues,
FilterItemListInterface itemSubitems,
boolean subitemsRequired)
Constructs a new filter item with the given properties. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues,
java.lang.Object[] itemPossibleValues,
java.lang.Object[] itemActualValues,
FilterQualifierListInterface itemQualfiers,
boolean qualifiersRequired)
Constructs a new filter item with the given properties. |
|
DefaultFilterItem(java.lang.String itemLabel,
FilterConditionListInterface itemConditions,
boolean allowUserValues,
java.lang.Object[] itemPossibleValues,
java.lang.Object[] itemActualValues,
FilterQualifierListInterface itemQualfiers,
boolean qualifiersRequired,
FilterItemListInterface itemSubitems,
boolean subitemsRequired)
Constructs a new filter item with the given properties. |
Method Summary | |
---|---|
java.lang.Object |
createUserValue(java.lang.String valueTyped)
Returns a new object that the Client will understand as a user typed value This should throw an IllegalArgument exception if the valueTyped is NOT valid for this Item. |
boolean |
equals(java.lang.Object o)
Compares for equality this object with the specified other object. |
FilterValuesInterface |
getActualValues()
Gets an interface that can be used to incrementally retrieve and iterate just the actual values to be used for equivelance tests in the filter. |
FilterConditionListInterface |
getConditionList()
Gets an interface to the list of conditional operators supported for this item. |
java.lang.Object |
getItem()
This object is defined by the adaptor implementor and will be returned as part of the completed filter data structure. |
java.lang.String |
getItemLabel()
This is the label to display to the user for the item object when it is being used to build a filter. |
long |
getItemType()
A type value that is used to determine value checking when user typed values allowed. |
FilterValuesInterface |
getPossibleValues()
Gets an interface that can be used to incrementally retrieve and iterate all the possible values to be used for equivelance tests in the filter. |
FilterItemInterface |
getQualifiedItem(java.util.List qualifiers)
When an item is qualified, it's value lists, conditions and user values allowed may change. |
FilterQualifierListInterface |
getQualifierList()
If this item allows or requires additional items to be selected to refine the selection then return them here. |
FilterItemListInterface |
getSubitemList()
This is provided if the items are actually to be represented by a tree rather than a linear list The Item returned by the selection logic interface will actually be the subitem selected. |
java.text.Format |
getUserValueFormatter()
Returns the Format object used to parse the typed string into an object returned by createUserValue(); If null returned, then the object from createUserValue was created by "new String( value )" where value is the String object passed into the method. |
boolean |
isQualifierRequired()
If this item is not sufficient to define the filter, then it may be neccessary to 'add definition' to the item. |
boolean |
isSubitemRequired()
If this item is not sufficient to define the filter, then it may be neccessary to 'drill down' to the item. |
boolean |
isUserValueAllowed()
Returns TRUE is users are allowed to type in their own values in addition to any values from the Actual or Possible Values Interfaces; |
void |
setActualValues(java.util.Collection valuesCollection)
Sets the list of values to return from a call to getActualValues . |
void |
setActualValues(FilterValuesInterface valueInterface)
Sets the list of values to return from a call to getActualValues . |
void |
setActualValues(java.lang.Object[] valuesArray)
Sets the list of values to return from a call to getActualValues . |
void |
setConditionList(FilterConditionInterface[] itemConditionArray)
Sets the list of conditions available for this filter item. |
void |
setConditionList(FilterConditionListInterface itemConditions)
Sets the list of conditions available for this item. |
void |
setConditionList(java.util.List itemConditionList)
Sets the list of conditions available for this filter item. |
void |
setItem(java.lang.Object itemObject)
Sets the native model object this filter item represents. |
void |
setItemLabel(java.lang.String itemLabel)
Sets the label for this filter item. |
void |
setItemType(long itemType)
Assigns the type of data this item represents. |
void |
setPossibleValues(java.util.Collection valuesCollection)
Sets the list of values to return from a call to getPossibleValues . |
void |
setPossibleValues(FilterValuesInterface valueInterface)
Sets the list of values to return from a call to getPossibleValues . |
void |
setPossibleValues(java.lang.Object[] valuesArray)
Sets the list of values to return from a call to getPossibleValues . |
void |
setQualifiedItem(FilterItemInterface qualifiedItem)
Sets the default qualified item that will be returned by any calls to getQualifiedItem . |
void |
setQualifierList(FilterQualifierListInterface qualifiers)
Sets the list of qualifiers available for this filter item. |
void |
setQualifierRequired(boolean qualifierRequired)
Sets the flag for whether a qualifier is required to complete a filter for this item or not. |
void |
setSubitemList(FilterItemInterface[] subitemArray)
Sets the list of sub-items available for this item. |
void |
setSubitemList(FilterItemListInterface subitems)
Sests the list of sub-items available for this item. |
void |
setSubitemList(java.util.List subitemList)
Sets the list of sub-items available for this item. |
void |
setSubitemRequired(boolean subitemRequired)
Sets the flag for whether a sub-item is required to complete a filter for this item or not. |
void |
setUserValueAllowed(boolean allowed)
Sets the flag for allowing users to type in their own values to complete a conditional filter. |
void |
setUserValueFormatter(java.text.Format formatter)
Sets the format object used when parsing user entered text and converting it to usable value objects. |
java.lang.String |
toString()
Returns a String representation of this filter item. |
Constructor Detail |
---|
public DefaultFilterItem()
public DefaultFilterItem(java.lang.String itemLabel)
itemLabel
- the label for this itempublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwisepublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues, java.lang.Object[] itemPossibleValues, java.lang.Object[] itemActualValues)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwiseitemPossibleValues
- the list of possible values for this itemitemActualValues
- the list of actual values for this itempublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues, java.lang.Object[] itemPossibleValues, java.lang.Object[] itemActualValues, FilterItemListInterface itemSubitems, boolean subitemsRequired)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwiseitemPossibleValues
- the list of possible values for this itemitemActualValues
- the list of actual values for this itemitemSubitems
- the list of sub-items available for this itemsubitemsRequired
- TRUE if a sub-item must be selected to completely
define a filter using this item, FALSE otherwisepublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues, java.util.List itemPossibleValues, java.util.List itemActualValues)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwiseitemPossibleValues
- the list of possible values for this itemitemActualValues
- the list of actual values for this itempublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues, java.util.List itemPossibleValues, java.util.List itemActualValues, FilterItemListInterface itemSubitems, boolean subitemsRequired)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwiseitemPossibleValues
- the list of possible values for this itemitemActualValues
- the list of actual values for this itemitemSubitems
- the list of sub-items available for this itemsubitemsRequired
- TRUE if a sub-item must be selected to completely
define a filter using this item, FALSE otherwisepublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues, java.lang.Object[] itemPossibleValues, java.lang.Object[] itemActualValues, FilterQualifierListInterface itemQualfiers, boolean qualifiersRequired)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwiseitemPossibleValues
- the list of possible values for this itemitemActualValues
- the list of actual values for this itemitemQualfiers
- the list of qualifiers available for this itemqualifiersRequired
- TRUE if a qualifier must be selected to completely
define a filter using this item, FALSE otherwisepublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues, java.lang.Object[] itemPossibleValues, java.lang.Object[] itemActualValues, FilterQualifierListInterface itemQualfiers, boolean qualifiersRequired, FilterItemListInterface itemSubitems, boolean subitemsRequired)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwiseitemPossibleValues
- the list of possible values for this itemitemActualValues
- the list of actual values for this itemitemQualfiers
- the list of qualifiers available for this itemqualifiersRequired
- TRUE if a qualifier must be selected to completely
define a filter using this item, FALSE otherwiseitemSubitems
- the list of sub-items available for this itemsubitemsRequired
- TRUE if a sub-item must be selected to completely
define a filter using this item, FALSE otherwisepublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues, java.util.List itemPossibleValues, java.util.List itemActualValues, FilterQualifierListInterface itemQualfiers, boolean qualifiersRequired)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwiseitemPossibleValues
- the list of possible values for this itemitemActualValues
- the list of actual values for this itemitemQualfiers
- the list of qualifiers available for this itemqualifiersRequired
- TRUE if a qualifier must be selected to completely
define a filter using this item, FALSE otherwisepublic DefaultFilterItem(java.lang.String itemLabel, FilterConditionListInterface itemConditions, boolean allowUserValues, java.util.List itemPossibleValues, java.util.List itemActualValues, FilterQualifierListInterface itemQualfiers, boolean qualifiersRequired, FilterItemListInterface itemSubitems, boolean subitemsRequired)
itemLabel
- the label for this itemitemConditions
- the list of conditions available for this itemallowUserValues
- TRUE if users may supply typed-in values, FALSE otherwiseitemPossibleValues
- the list of possible values for this itemitemActualValues
- the list of actual values for this itemitemQualfiers
- the list of qualifiers available for this itemqualifiersRequired
- TRUE if a qualifier must be selected to completely
define a filter using this item, FALSE otherwiseitemSubitems
- the list of sub-items available for this itemsubitemsRequired
- TRUE if a sub-item must be selected to completely
define a filter using this item, FALSE otherwiseMethod Detail |
---|
public java.lang.Object getItem()
getItem
in interface FilterItemInterface
public void setItem(java.lang.Object itemObject)
itemObject
- the native model object for this itempublic java.lang.String getItemLabel()
getItemLabel
in interface FilterItemInterface
public void setItemLabel(java.lang.String itemLabel)
itemLabel
- the new labelpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the object to compare with this one
public boolean isSubitemRequired()
isSubitemRequired
in interface FilterItemInterface
public void setSubitemRequired(boolean subitemRequired)
subitemRequired
- TRUE if a sub-item is required for this item,
FALSE otherwisepublic FilterItemListInterface getSubitemList()
getSubitemList
in interface FilterItemInterface
public void setSubitemList(FilterItemListInterface subitems)
subitems
- the new list of sub-itemspublic boolean isQualifierRequired()
isQualifierRequired
in interface FilterItemInterface
public void setQualifierRequired(boolean qualifierRequired)
qualifierRequired
- TRUE if a qualifier is required for this item,
FALSE otherwisepublic FilterQualifierListInterface getQualifierList()
getQualifierList
in interface FilterItemInterface
public void setQualifierList(FilterQualifierListInterface qualifiers)
qualifiers
- the new list of qualifierspublic FilterConditionListInterface getConditionList()
getConditionList
in interface FilterItemInterface
public void setConditionList(FilterConditionListInterface itemConditions)
itemConditions
- the new condition listpublic boolean isUserValueAllowed()
isUserValueAllowed
in interface FilterItemInterface
public void setUserValueAllowed(boolean allowed)
allowed
- TRUE if users are allowed to type in their own values, FALSE otherwisepublic void setPossibleValues(FilterValuesInterface valueInterface)
getPossibleValues
.
valueInterface
- the new list of valuespublic void setPossibleValues(java.lang.Object[] valuesArray)
getPossibleValues
.
valuesArray
- the new list of valuespublic void setPossibleValues(java.util.Collection valuesCollection)
getPossibleValues
.
valuesCollection
- the new list of valuespublic FilterValuesInterface getPossibleValues()
getPossibleValues
in interface FilterItemInterface
public void setActualValues(FilterValuesInterface valueInterface)
getActualValues
.
valuesInterface
- the new list of valuespublic void setActualValues(java.lang.Object[] valuesArray)
getActualValues
.
valuesArray
- the new list of valuespublic void setActualValues(java.util.Collection valuesCollection)
getActualValues
.
valuesCollection
- the new list of valuespublic FilterValuesInterface getActualValues()
getActualValues
in interface FilterItemInterface
public void setSubitemList(FilterItemInterface[] subitemArray)
subitemArray
- an array of the sub-items to make available for
this itempublic void setSubitemList(java.util.List subitemList)
FilterItemInterface
will be utilized from the input
list.
subitemList
- the new list of available sub-itemsFilterItemInterface
public void setConditionList(FilterConditionInterface[] itemConditionArray)
itemConditionArray
- the array of conditions to make available
for this itempublic void setConditionList(java.util.List itemConditionList)
FilterConditionInterface
will be utilized.
itemConditionList
- the new list of conditionsFilterConditionInterface
public long getItemType()
getItemType
in interface FilterItemInterface
public void setItemType(long itemType)
itemType
- the new type to assign to this itempublic void setUserValueFormatter(java.text.Format formatter)
formatter
- the new user value formatterpublic java.text.Format getUserValueFormatter()
getUserValueFormatter
in interface FilterItemInterface
public java.lang.Object createUserValue(java.lang.String valueTyped)
createUserValue
in interface FilterItemInterface
valueTyped
- the text as entered by the user
public FilterItemInterface getQualifiedItem(java.util.List qualifiers)
getQualifiedItem
in interface FilterItemInterface
qualifiers
- the list of any objects that can affect the returned filter item (unused here)
public void setQualifiedItem(FilterItemInterface qualifiedItem)
getQualifiedItem
.
qualifiedItem
- the new default qualified item
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |