|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FilterItem
Contains a single conditional expression which is used to filter data when running a query and typically yields a result set containing less data.
Often, this conditional expression takes the form <<data item>> - <<operator>> - <<constant>>, 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).
CompoundFilter
,
CompoundConditionalExpression
Field Summary | |
---|---|
static java.lang.String |
EVENT_FILTER_EXPRESSION_CHANGED
Indication that the filter expression has been changed. |
Fields inherited from interface com.sas.iquery.metadata.business.ModelItemWithIdentity |
---|
EVENT_DESCRIPTION_CHANGED, EVENT_HIDDEN_CHANGED, EVENT_ID_CHANGED, EVENT_LABEL_CHANGED |
Fields inherited from interface com.sas.iquery.metadata.business.ModelItem |
---|
EVENT_OBJECT_PROPERTY_CHANGED |
Fields inherited from interface com.sas.iquery.metadata.business.Base |
---|
EVENT_OBJECT_DEFINITION_CHANGED |
Fields inherited from interface com.sas.iquery.metadata.business.LocalizableModelObject |
---|
EVENT_LOCALIZABLE_DESCRIPTIONS_CHANGED, EVENT_LOCALIZABLE_LABELS_CHANGED |
Method Summary | |
---|---|
java.util.List<DataItem> |
getDataItems(int searchCriteria)
Provides a way for consumer to determine what DataItems a given filter may have on it. |
ExpressionInterface |
getExpression()
Gets the filter's conditional expression. |
java.util.List<Prompt> |
getPrompts(int searchCriteria)
A utility function for returning the list of prompts used (directly or indirectly) in in the definition of this filter. |
void |
setExpression(ExpressionInterface condExpr)
Sets the filter's conditional expression to be the given expression. |
Methods inherited from interface com.sas.iquery.metadata.business.BusinessModelObject |
---|
getBusinessModel, isContainedInBusinessModel, isIDOK, isReadOnly |
Methods inherited from interface com.sas.iquery.metadata.business.ModelItemWithIdentity |
---|
getID, getIdentityString, getIntraModelID, isHidden, isUnresolved, setDescription, setIntraModelID, setIsHidden, setLabel |
Methods inherited from interface com.sas.iquery.metadata.PropertyChangeListenee |
---|
addListener, getListeners, removeListener |
Methods inherited from interface com.sas.iquery.metadata.business.UsabilityInterface |
---|
getReasonsUnusable, isUsableInQuery |
Methods inherited from interface com.sas.iquery.metadata.business.BusinessModelResource |
---|
isUnresolved |
Methods inherited from interface com.sas.iquery.metadata.business.BusinessModelResourceReferencer |
---|
getResources |
Methods inherited from interface com.sas.iquery.metadata.business.ExtendedAttributes |
---|
getExtendedAttributes, setExtendedAttributes |
Methods inherited from interface com.sas.iquery.metadata.business.LocalizableModelObject |
---|
getLocalizableProperties, getLocalizationPrependKey, setDescription, setDescriptions, setLabel, setLabels, setLocalizableProperties |
Methods inherited from interface com.sas.iquery.metadata.LocalizableNamedObjectInterface |
---|
getDescription, getDescriptions, getLabel, getLabels |
Methods inherited from interface com.sas.iquery.metadata.NamedObjectInterface |
---|
getDescription, getLabel |
Methods inherited from interface com.sas.iquery.metadata.business.FilterCascadeContainer |
---|
getCascades |
Field Detail |
---|
static final java.lang.String EVENT_FILTER_EXPRESSION_CHANGED
Method Detail |
---|
ExpressionInterface getExpression()
getExpression
in interface CascadableFilter
void setExpression(ExpressionInterface condExpr) throws MetadataException
condExpr
- the filter's expression.
MetadataNotChangeableException
- if this object is read-only
MetadataException
java.util.List<Prompt> getPrompts(int searchCriteria)
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:
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 }
@Nonnull java.util.List<DataItem> getDataItems(int searchCriteria)
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:
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 }
|
Query |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |