Contains a single conditional expression
which is used to filter data when running a query and typically yields a
resultset containing less data.
Often, this conditional expression takes the form <> - <> - <>, for example PRICE >= 150.0.
It does not provide data in the result set.
It specifies which result set rows are
returned based on the filtering criteria.
As with the composition of a data item's expression, the expression that makes
up a FilterItem must directly or indirectly be based upon data sources
defined in the business model chain that the filter is contained in.
For example, any columns used in the filter definition whether directly
or indirectly through data item definitions, must be associated with
(owned by) tables for which there exist data source definitions somewhere
in the business model chain.
Unless otherwise noted, all getter/setter method pairs do not copy
their outputs or inputs, respectively. That is, if one calls the
setter method and immediately calls the getter method for that same
attribute, the object that was just given on the setter method will
be returned by the getter.
The only general exception to this rule, which is not documented further
on the getter/setter methods, is when the output or input is a List,
in which case the List is copied but the contents of the list are not copied.
(A shallow copy of the List is made in both the setter and getter methods).
A utility function for returning the list of prompts used (directly or indirectly) in
in the definition of this filter.
That is, a recursive search can be made on this filter's expression to
return any prompts used within its recursive definition.
A search criteria parameter is provided to control the search.
The search criteria controls whether data items that make up the
recursive definition of this filter are to be searched for prompts
in their recursive definitions ... and if this is a compound filter,
whether subfilters that make up the recursive definition of this filter
are to be searched for prompts in their recursive definitions.
Parameters:
searchCriteria - defines the search criteria for this method. These flags are
found in com.sas.meta.business.BusinessModel.
The following flags are valid for this method and can be OR'd together to combine
behaviors:
SEARCH_NONRECURSIVELY - specifying this flag causes this method to return only the prompts
in this filter's definition ... not recursively asking any data items or subfilters
for prompts used in their recursive definitions.
SEARCH_THRU_SUBFILTERS - specifying this flag causes this method to return
the prompts for this filter as well as prompts for any sub-filters used in
the recursive definition of this filter. This flag is only meaningful
when this filter is a compound filter. Specifying this flag when not
a compound filter is not harmful, it just doesn't do anything.
SEARCH_THRU_SUBDATAITEMS - specifying this flag causes this method to return
the prompts for this filter as well as prompts for any data items used in
the recursive definition of this filter's expression.
SEARCH_THRU_ALL - specifying this flag causes this method to return
all prompts used in the recursive definition of this filter's expression.
All data items and subfilters found in the recursive definition of this filter's
expression are searched for prompts making up their definitions.
Usage examples:
Determining whether a filter has prompts only on the immediate filter and no filters that
make up the filter:
List prompts = filterItem.getPrompts(BusinessModel.SEARCH_NONRECURSIVELY);
if ( prompts.size() > 0 ) {
// has prompts
}
Determining whether a filter has prompts on the immediate filter and filters that
make up the filter:
List prompts = filterItem.getPrompts(BusinessModel.SEARCH_THRU_SUBFILTERS);
if ( prompts.size() > 0 ) {
// has prompts
}
Determining whether a filter has prompts on the immediate filter and data items that
make up the filter:
List prompts = filterItem.getPrompts(BusinessModel.SEARCH_THRU_SUBDATAITEMS);
if ( prompts.size() > 0 ) {
// has prompts
}
Returns:
A list of prompts. If the list size is zero, there are no prompts.
Provides a way for consumer to determine what DataItems a given filter may have on it.
Returns a list of data items that are set on the filter.
Parameters:
searchCriteria - defines the search criteria for this method. These flags are
found in com.sas.meta.business.BusinessModel.
The following flags are valid for this method and can be OR'd together to combine
behaviors:
SEARCH_NONRECURSIVELY - specifying this flag causes this method to return only the DataItems
for this filter. No other DataItems from filters that make up the
current filter will be returned.
SEARCH_THRU_SUBFILTERS - specifying this flag causes this method to return
the DataItems for this filter as well as DataItems for any filters that
make up this filter.
SEARCH_THRU_SUBDATAITEMS - specifying this flag causes this method to return
the DataItems for this filter as well as DataItems for any data items that
are part of this filter.
SEARCH_THRU_ALL - specifying this flag causes this method to return
the DataItems for this filter as well as DataItems for any items that
are part of this filter.
Usage examples:
Determining whether a filter has data items only on the immediate filter and no filters that
make up the filter:
List dataItems = filterItem.getDataItems(BusinessModel.SEARCH_NONRECURSIVELY);
if ( dataItems.size() > 0 ) {
// has data items
}
Determining whether a filter has DataItems on the immediate filter and filters that
make up the filter:
List dataItems = filterItem.getDataItems(BusinessModel.SEARCH_THRU_SUBFILTERS);
if ( dataItems.size() > 0 ) {
// has data items
}
Determining whether a filter has DataItems on the immediate filter and data items that
make up the filter:
List dataItems = filterItem.getDataItems(BusinessModel.SEARCH_THRU_SUBDATAITEMS);
if ( dataItems.size() > 0 ) {
// has data items
}
Determining whether a filter has any DataItems on itself or its descendants:
List dataItems = filterItem.getDataItems(BusinessModel.SEARCH_THRU_ALL);
if ( dataItems.size() > 0 ) {
// has data items
}
Returns:
A list of data items. If the list size is zero, there are no data items.