com.sas.dataselectors.filters
Class BaseFilterObjectFactory

com.sas.dataselectors.filters.BaseFilterObjectFactory
All Implemented Interfaces:
FilterObjectFactoryInterface
Direct Known Subclasses:
BaseAdvancedFilterObjectFactory, BusinessQueryFilterObjectFactory, InformationMapFilterObjectFactory

public class BaseFilterObjectFactory
implements FilterObjectFactoryInterface

The BaseFilterObjectFactory is the base implementation of the FilterObjectFactoryInterface. This class provides the primary interface between native objects and the filter specific objects the filter model works with. All methods included in this class are in some way involved with converting objects back and forth between the filter model and a native model. This base implementation deals mainly with BIQ models but also includes support for a handful of physical level objects.


Field Summary
protected  FilterBaseModelData _baseModel
           
protected  com.sas.iquery.metadata.business.BusinessModel _businessModel
          The BusinessModel object this factory instance relies on.
protected  com.sas.iquery.dataservices.IQDataServices _dataService
          An IQDataServices instance used when getting lists of values for DataItems.
protected  com.sas.iquery.metadata.expr.ResourceScope _scope
          The scope to use when referring to resources in the IQ model.
 FilterConditionInterface CODE_BLOCK
           
static int DEFAULT_GOVERNING_LIMIT
          The default limit on the number of distinct values returned when getting a list of values to use in a filter for any given DataItem.
static com.sas.iquery.metadata.expr.ResourceScope DEFAULT_SCOPE
           
protected  int environment
           
 FilterConditionInterface IS_AFTER
           
 FilterConditionInterface IS_AFTER_OR_EQUAL
           
 FilterConditionInterface IS_BEFORE
           
 FilterConditionInterface IS_BEFORE_OR_EQUAL
           
 FilterConditionInterface IS_BETWEEN
          The "is in between" filter condition.
 FilterConditionInterface IS_EQUALS
          The "is equal to" filter condition.
 FilterConditionInterface IS_GREATER_THAN
          The "is greater than" filter condition.
 FilterConditionInterface IS_GREATER_THAN_OR_EQUAL
          The "is greater than or equal to" filter condition.
 FilterConditionInterface IS_IN_LIST
          The "is in list" filter condition.
 FilterConditionInterface IS_LESS_THAN
          The "is less than" filter condition.
 FilterConditionInterface IS_LESS_THAN_OR_EQUAL
          The "is less than or equal to" filter condition.
 FilterConditionInterface IS_NOT_BETWEEN
          The "is not in between" filter condition.
 FilterConditionInterface IS_NOT_EQUALS
          The "is not equal to" filter condition.
 FilterConditionInterface IS_NOT_IN_LIST
          The "is not in list" filter condition.
 FilterConditionInterface IS_NOT_NULL
          The "is not null" filter condition.
 FilterConditionInterface IS_NULL
          The "is null" filter condition.
static java.lang.String RB_KEY
          Resource key for factory specific properties.
static java.lang.String RB_KEY2
          Resource key for condition properties.
 
Constructor Summary
BaseFilterObjectFactory(FilterBaseModelData baseModel, com.sas.iquery.metadata.expr.ResourceScope scope)
          Constructs a new factory from the given BusinessModel and using the specified resource scope.
 
Method Summary
 void addFilterItem(com.sas.iquery.metadata.business.FilterItem filterItem)
          Adds the filter item to the business model.
 boolean clearFilterCondition(com.sas.iquery.metadata.business.FilterItem filterItem)
          Clears the expression for the given filter item.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Column columnItem, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given column to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.expr.ConstantExpression constantExpression, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given expression to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Dimension olapDimension, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given Dimension to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.expr.ExpressionInterface expression, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given expression to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.expr.FunctionCall functionCall, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given function call to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Hierarchy olapHierarchy, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given Hierarchy to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Level olapLevel, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given Level to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Measure olapMeasure, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given OLAP Measure to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Member olapMember, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given OLAP member to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.expr.StringExpression stringExpression, java.lang.String itemName, com.sas.iquery.metadata.business.DataItem dataItem, FilterQualifierListInterface qualifiers)
          Converts the given expression to a FilterItemInterface for use throughout the filter model.
 FilterItemInterface convertToFilterItem(java.lang.Object item, com.sas.iquery.metadata.business.DataItem dataItem, FilterItemListInterface filterItemList)
           
 com.sas.iquery.metadata.expr.ExpressionInterface createExpressionFromNative(java.lang.Object nativeObject, int expressionType)
          Attempts to create a new ExpressionInterface instance from the given native Object for the specified expression type.
 com.sas.iquery.metadata.expr.ExpressionInterface createExpressionFromNative(java.lang.Object nativeObject, int expressionType, boolean userCreated)
           
 FilterItemInterface createFilterItemFromNative(java.lang.Object data, FilterItemListInterface fili)
          Creates and returns a new FilterItemInterface wrapper around the given native object.
 FilterQualifierInterface createFilterQualifierFromNative(java.lang.Object nativeObject)
          Creates and returns a filter qualifier for the given object from the native filter model.
 java.util.List createFilterQualifierListFromNativeList(java.util.List nativeList, FilterItemInterface filterItem)
          Creates and returns a list of filter qualifiers to represent the list of objects from the native filter model.
 FilterValueInterface createFilterValueFromNative(java.lang.Object nativeObject)
          Creates a FilterValueInterface object that encapsulates the given native object.
 FilterValueInterface createFilterValueFromNative(java.lang.Object nativeObject, FilterLogicTestNodeInterface testNode)
          Creates a FilterValueInterface object that encapsulates the given native object.
 FilterValueInterface createFilterValueFromNative(java.lang.Object nativeObject, long itemType, java.lang.String sasFormatText)
          Creates a FilterValueInterface object that encapsulates the given native object.
 FilterValueInterface createFilterValueFromNative(java.lang.Object nativeObject, long itemType, java.lang.String sasFormatText, boolean formatValue)
          Creates a FilterValueInterface object that encapsulates the given native object.
protected  java.util.List createFilterValueList(FilterItemInterface filterItem)
          Creates and returns a list containing a FilterValueInterface wrapper for the OLAPTimeBasedFilterAdapterInterface contained in the given FilterItemInterface.
 java.util.List createFilterValueListFromNativeList(java.util.List nativeList, FilterItemInterface filterItem)
          Creates and returns a list of FilterValueInterface wrappers for the given list of native filter object values.
 java.util.Date createJavaDateFromSASDate(double value)
          Deprecated. use DateAndTimeUtil.createJavaDateFromSASDate(double) instead
 java.util.Date createJavaDateFromSASDateTime(double value)
          Deprecated. use DateAndTimeUtil.createJavaDateFromSASDateTime(double) instead
 java.util.Date createJavaDateFromSASTime(double value)
          Deprecated. use DateAndTimeUtil.createJavaDateFromSASTime(double) instead
protected  java.util.List createStringExpressionList(java.util.List values)
          Creates and returns a List of StringExpression instances for the given List of values.
protected  java.util.List createStringExpressionList(java.util.List values, int type)
          Creates and returns a List of StringExpression instances for the given List of values.
static com.sas.util.ValueItem createValueItem(TupleElementInterface tupleElement)
           
static com.sas.util.ValueItem createValueItemFromUniqueMemberID(com.sas.iquery.metadata.business.DataItem dataItem, java.lang.String memberName)
           
 boolean enforceBooleanPrecedence()
          Returns TRUE if boolean precedence will be applied when filter models are converted to the IQ model, FALSE otherwise.
 FilterConditionInterface findMatchingConditionObject(FilterItemInterface filterItem, java.lang.Object conditionObject, boolean isNegated)
          This method attempts to locate and return the filter condition that matches the search value from the native filter model.
 FilterConditionInterface findMatchingConditionObject(FilterItemInterface filterItem, java.lang.Object conditionObject, boolean isNegated, java.util.List qualifiers)
          This method attempts to locate and return the filter condition that matches the search value from the native filter model.
 FilterConditionInterface findMatchingConditionObject(java.lang.Object conditionObject, boolean isNegated, FilterConditionListInterface fcli)
          This method attempts to locate and return the filter condition that matches the search value from the native filter model.
 FilterItemInterface findMatchingFilterItem(FilterItemListInterface fili, java.lang.Object itemObject)
          This method attempts to locate and return the filter item that matches the search value from the native filter model.
 FilterQualifierInterface findMatchingFilterQualifier(FilterItemInterface filterItem, java.lang.Object searchValue)
          This method attempts to locate and return a filter qualifier that matches the search value from the native filter model.
 FilterValueInterface findMatchingFilterValue(FilterItemInterface filterItem, java.lang.Object searchValue)
          This method attempts to locate and return any previously constructed filter value object for the given search value from the native filter model.
static java.lang.String formatFunctionCall(com.sas.iquery.metadata.expr.FunctionCall expr)
           
protected static long getAdjustedFilterItemType(FilterItemInterface item)
          This method is intended to be used if an item's effective data type can not be determined by simply checking the ItemType property on a filter item.
protected  java.util.List getAlternateConditions()
           
protected  com.sas.iquery.metadata.expr.ComparisonOperator getComparisonOperator(FilterLogicTestNodeInterface testNode)
          Returns the ComparisonOperator stored in the given test node.
static com.sas.iquery.metadata.business.DataItem getDataItem(FilterItemInterface filterItem)
           
 java.util.List getDataItems(boolean includeBaseModels)
          Returns a list of all data items present in the active BusinessModel.
 java.util.List getDataServiceValues(com.sas.iquery.metadata.business.DataItem dataItem)
          Creates and returns a list of values for the given data item as retrieved by the IQDataServices class.
static java.util.Date getDateOrNullFromNative(java.lang.Object nativeObject, int expressionType, java.util.Locale locale)
          Attempts to extract a Date value from the given native object.
 int getEnvironment()
          Gets the current operating environment.
protected  java.util.List getExpressionListFromTestNodeValues(FilterLogicTestNodeInterface testNode)
          Constructs a List of expressions from the values assigned to the given test node.
 java.util.List getFilterableItems(boolean includeBaseModels, java.util.Map filterItemLookup)
          Creates and returns a List of filterable items for the active business model.
protected static java.lang.String getFilterItemSASFormatText(java.lang.Object item)
          Deprecated. Use DateAndTimeUtil#getFilterItemSASFormatText(Object) instead
 com.sas.iquery.metadata.business.step.StepInterface getFilterStep(com.sas.iquery.metadata.business.DataItem dataItem)
          Returns the effective filter step for the given data item.
protected  long getItemType(FilterLogicTestNodeInterface testNode)
          Returns the effective item type based on the selected item and qualifiers in the given test node.
 java.util.Map getLevelProperties(MetadataInterface metadata, com.sas.iquery.metadata.business.DataItem di)
           
 java.util.Map getLevelProperties(MetadataInterface metadata, com.sas.iquery.metadata.business.DataItem di, java.lang.String cubeName)
          Gathers and returns a Map of levels and the filterable properties for each level.
 java.util.Map getLevelProperties(OLAPDataSetInterface model, com.sas.iquery.metadata.business.DataItem di)
           
 java.util.Locale getLocale()
          Returns the Locale value set for this instance of the factory.
 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.
protected  java.util.List getMemberListFromTestNodeQualifiers(FilterLogicTestNodeInterface testNode)
          Creates and returns a List of members from the given test node.
 MetadataInterface getMetadataInterface()
          Returns a MetadataInterface instance that should connect with the first DataSource in the current BusinessModel.
 FilterConditionListInterface getOLAPMeasureConditionList()
          Returns a FilterConditionListInterface instance containing the list of all conditions to be used in data-based filters for OLAP DataItems.
 FilterConditionListInterface getOLAPMemberConditionList()
          Returns a FilterConditionListInterface instance containing the list of all conditions to be used in member-based filters for OLAP DataItems.
 FilterQualifierListInterface getQualifiers(java.util.List items)
          Creates and returns a filter qualifier list for the given list of objects.
 FilterConditionInterface[] getRelationalCharacterConditions(boolean forcedFormatting)
          Returns the condition list for relational filter items that are for character data.
 FilterConditionInterface[] getRelationalConditions(boolean forcedFormatting)
          Returns a FilterConditionListInterface instance containing the list of all conditions to be used for relational DataItem based filters.
 FilterConditionListInterface getRelationalConditions(com.sas.iquery.metadata.business.DataItem item)
          Returns the condition list appropriate for the given DataItem assuming it is for relational data.
 FilterConditionListInterface getRelationalConditions(com.sas.iquery.metadata.expr.ExpressionInterface expression)
          Returns the condition list appropriate for the given expression assuming it is for relational data.
 FilterConditionListInterface getRelationalConditions(com.sas.iquery.metadata.expr.ExpressionInterface expression, boolean forcedFormatting)
          Returns the condition list appropriate for the given expression assuming it is for relational data.
 FilterConditionInterface[] getRelationalNumericConditions(boolean forcedFormatting)
          Returns the condition list for relational filter items that are for numeric data.
 com.sas.iquery.metadata.serverprop.ServerProperties getServerProperties()
          Returns the ServerProperties object derived from the active BusinessModel.
protected  java.util.List getStringExpressionListFromTestNodeValues(FilterLogicTestNodeInterface testNode)
          Constructs a List of StringExpressions from the values assigned to the given test node.
static com.sas.iquery.dataservices.IQDataServices initDataService(com.sas.iquery.metadata.business.BusinessModel businessModel)
          Create and return an IQDataServices instance from the given BusinessModel.
protected  boolean isOLAP()
          Returns TRUE if the business model represents OLAP data, FALSE otherwise.
protected  boolean isTimeDimension(com.sas.iquery.metadata.business.DataItem item)
           
 com.sas.iquery.metadata.expr.CompoundConditionalExpression newCompoundConditionalExpression(com.sas.iquery.metadata.expr.ExpressionInterface exprLeft, com.sas.iquery.metadata.expr.ExpressionInterface exprRight, com.sas.iquery.metadata.expr.ConditionalRelationType relationType, boolean isNegated)
          Creates and returns a new CompoundConditionalExpression object based on the specified parameters.
 com.sas.iquery.metadata.business.CompoundFilter newCompoundFilter()
          Creates and returns a new CompoundFilter instance from the active BusinessModel.
 com.sas.iquery.metadata.business.step.CompoundStep newCompoundStep()
          Creates and returns a new CompoundStep instance for use in the OLAP step model.
 com.sas.iquery.metadata.expr.ConditionalExpression newConditionalExpression(FilterLogicTestNodeInterface testNode)
          Creates and returns a new ConditionalExpression object from the given test node.
static com.sas.iquery.metadata.expr.ConstantExpression newConstantExpression(java.lang.String value, int type)
          Creates a new ConstantExpression with the given type and value.
 com.sas.iquery.metadata.business.CompoundFilter newCoumpoundFilter(com.sas.iquery.metadata.business.FilterItem left, com.sas.iquery.metadata.business.FilterItem right, com.sas.iquery.metadata.expr.ConditionalRelationType relationType, boolean isNegated)
          Constructs and returns a new CompoundFilter object from the given parameters.
 FilterValueInterface newFilterDataValue(com.sas.iquery.metadata.business.LookupValue value, com.sas.iquery.metadata.business.DataItem dataItem)
          Creates a new FilterValueInterface instance from the given LookupValue for the specified DataItem.
 FilterValueInterface newFilterDataValue(com.sas.iquery.dataservices.PossibleFilterValue value)
          Constructs a new FilterValueInterface instance from the given PossibleFilterValue object.
 com.sas.iquery.metadata.business.FilterItem newFilterItem()
          Creates and returns a new FilterItem instance from the active BusinessModel.
 com.sas.iquery.metadata.business.step.StepInterface newFilterStep(FilterLogicTestNodeInterface testNode)
          Creates and returns a new StepInterface instance for use in the OLAP step model.
 FilterValueInterface newFilterValue(java.lang.Object nativeObject, FilterLogicTestNodeInterface testNode)
          Creates a FilterValueInterface object that encapsulates the given native object.
static com.sas.iquery.metadata.expr.StringExpression newStringExpression(java.lang.String text)
          Creates a new StringExpression from the given text.
static com.sas.iquery.metadata.expr.StringExpression newStringExpression(java.lang.String text, int type)
          Creates a new StringExpression from the given text and expression type.
 FilterLogicTestNodeInterface newTestNode(com.sas.iquery.metadata.business.BusinessQuery bq, com.sas.iquery.metadata.business.DataItem dataItem, com.sas.iquery.metadata.business.step.StepInterface filterObject, FilterItemListInterface filterItemList)
          Creates a new test node from the given OLAP Step model filter.
 FilterLogicTestNodeInterface newTestNode(com.sas.iquery.metadata.business.DataItem dataItem, FilterItemListInterface filterItemList)
          Creates and returns a new test node to describe the effective OLAP filter step for the given DataItem.
 FilterLogicTestNodeInterface newTestNode(com.sas.iquery.metadata.business.DataItem dataItem, com.sas.iquery.metadata.business.step.StepInterface filterObject, FilterItemListInterface filterItemList)
          Creates a new test node from the given OLAP Step model filter.
 FilterLogicTestNodeInterface newTestNode(com.sas.iquery.metadata.business.FilterItem filter, FilterItemListInterface filterItemList)
          Creates a new test node if-and-only-if the filter is a simple filter.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.olap.DataBasedFilterExpression filterExpr, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.FunctionCall fCall, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.olap.MemberFilterExpression filterExpression, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, java.lang.Object item, java.util.List qualifiers, java.lang.Object conditionObject, boolean isNegated, java.util.List values, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, java.lang.Object item, java.lang.Object conditionObject, boolean isNegated, java.util.List values, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_Between betweenExpr, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_Comparison compExpr, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_Contains containsExpr, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_In inExpr, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_Like likeExpr, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_TestForNull nullExpr, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.olap.TimeFilterExpression filterExpression, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 FilterLogicTestNodeInterface newTestNode(java.lang.String name, java.lang.String desc, com.sas.iquery.metadata.expr.olap.TimeRangeFilterExpression filterExpression, FilterItemListInterface filterItemList)
          Creates and returns a new test node from the given properties.
 void releaseResources()
           
 void removeFilterItem(java.lang.Object filterItem)
          Remove the specified filter item from the business model.
 void setEnvironment(int environment)
          Sets the operating environment to the specified value.
 void setFilterBaseModelData(FilterBaseModelData baseModel)
           
protected  void setFilterItemProperties(FilterItemInterface filterItem, com.sas.iquery.metadata.business.DataItem dataItem)
          Sets any additional DataItem specific properties on the filter item.
protected  void setFilterItemProperties(FilterItemInterface filterItem, com.sas.iquery.metadata.expr.ResourceAwareStringExpression expression)
          Sets any additional expression specific properties on the filter item.
 void setLocale(java.util.Locale locale)
          Sets the locale to be used when creating/retrieving text that will be visible to a user.
 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.
 boolean updateCompoundConditionalFilter(com.sas.iquery.metadata.business.FilterItem filterItem, com.sas.iquery.metadata.expr.ExpressionInterface expression, com.sas.iquery.metadata.expr.ExpressionInterface exprLeft, com.sas.iquery.metadata.expr.ExpressionInterface exprRight, com.sas.iquery.metadata.expr.ConditionalRelationType relationType, boolean isNegated)
          Updates the given filter item from the specified parameters.
 boolean updateCompoundFilter(com.sas.iquery.metadata.business.FilterItem filterItem, com.sas.iquery.metadata.business.FilterItem left, com.sas.iquery.metadata.business.FilterItem right, com.sas.iquery.metadata.expr.ConditionalRelationType relationType, boolean isNegated)
          Updates the given CompoundFilter object from the specified parameters.
 boolean updateCompoundStep(com.sas.iquery.metadata.business.step.CompoundStep compoundFilter, com.sas.iquery.metadata.business.step.StepInterface left, com.sas.iquery.metadata.business.step.StepInterface right, com.sas.iquery.metadata.expr.ConditionalRelationType relationType, boolean isNegated)
          Updates the given compound step object from the specified parameters.
 boolean updateSimpleFilter(com.sas.iquery.metadata.business.FilterItem filterItem, java.lang.String name, java.lang.String description, com.sas.iquery.metadata.expr.ExpressionInterface result)
          Sets properties on the given filter item from the given parameters.
 boolean updateSimpleFilterFromTestNode(com.sas.iquery.metadata.business.FilterItem filterItem, FilterLogicTestNodeInterface testNode)
          Save the testNode data to the filter and then make sure the filter is in the business model.
 boolean updateSimpleFilterFromTestNode(java.lang.Object filterItemObject, FilterLogicTestNodeInterface testNode)
          Saves the test node data to the filter.
 boolean updateSimpleFilterFromTestNode(com.sas.iquery.metadata.business.step.StepInterface filterStep, FilterLogicTestNodeInterface testNode)
          Save the testNode data to the filter and then make sure the filter is in the business model.
 void wrapValueListDates(FilterLogicTestNodeInterface testNode)
          Encapsulates all Date objects in the given test node's value list in FilterValueInterface instances.
 

Field Detail

DEFAULT_GOVERNING_LIMIT

public static final int DEFAULT_GOVERNING_LIMIT
The default limit on the number of distinct values returned when getting a list of values to use in a filter for any given DataItem.

See Also:
Constant Field Values

_businessModel

protected com.sas.iquery.metadata.business.BusinessModel _businessModel
The BusinessModel object this factory instance relies on.


_dataService

protected com.sas.iquery.dataservices.IQDataServices _dataService
An IQDataServices instance used when getting lists of values for DataItems.


_scope

protected com.sas.iquery.metadata.expr.ResourceScope _scope
The scope to use when referring to resources in the IQ model.


environment

protected int environment

_baseModel

protected FilterBaseModelData _baseModel

DEFAULT_SCOPE

public static final com.sas.iquery.metadata.expr.ResourceScope DEFAULT_SCOPE

RB_KEY2

public static final java.lang.String RB_KEY2
Resource key for condition properties.

See Also:
Constant Field Values

RB_KEY

public static final java.lang.String RB_KEY
Resource key for factory specific properties.

See Also:
Constant Field Values

IS_EQUALS

public FilterConditionInterface IS_EQUALS
The "is equal to" filter condition.


IS_NOT_EQUALS

public FilterConditionInterface IS_NOT_EQUALS
The "is not equal to" filter condition.


IS_IN_LIST

public FilterConditionInterface IS_IN_LIST
The "is in list" filter condition.


IS_NOT_IN_LIST

public FilterConditionInterface IS_NOT_IN_LIST
The "is not in list" filter condition.


IS_LESS_THAN

public FilterConditionInterface IS_LESS_THAN
The "is less than" filter condition.


IS_LESS_THAN_OR_EQUAL

public FilterConditionInterface IS_LESS_THAN_OR_EQUAL
The "is less than or equal to" filter condition.


IS_GREATER_THAN

public FilterConditionInterface IS_GREATER_THAN
The "is greater than" filter condition.


IS_GREATER_THAN_OR_EQUAL

public FilterConditionInterface IS_GREATER_THAN_OR_EQUAL
The "is greater than or equal to" filter condition.


IS_BETWEEN

public FilterConditionInterface IS_BETWEEN
The "is in between" filter condition.


IS_NOT_BETWEEN

public FilterConditionInterface IS_NOT_BETWEEN
The "is not in between" filter condition.


IS_NULL

public FilterConditionInterface IS_NULL
The "is null" filter condition.


IS_NOT_NULL

public FilterConditionInterface IS_NOT_NULL
The "is not null" filter condition.


CODE_BLOCK

public FilterConditionInterface CODE_BLOCK

IS_BEFORE

public FilterConditionInterface IS_BEFORE

IS_BEFORE_OR_EQUAL

public FilterConditionInterface IS_BEFORE_OR_EQUAL

IS_AFTER

public FilterConditionInterface IS_AFTER

IS_AFTER_OR_EQUAL

public FilterConditionInterface IS_AFTER_OR_EQUAL
Constructor Detail

BaseFilterObjectFactory

public BaseFilterObjectFactory(FilterBaseModelData baseModel,
                               com.sas.iquery.metadata.expr.ResourceScope scope)
Constructs a new factory from the given BusinessModel and using the specified resource scope.

Parameters:
businessModel - the BusinessModel being dealt with
scope - the intended resource scope.
Method Detail

enforceBooleanPrecedence

public boolean enforceBooleanPrecedence()
Returns TRUE if boolean precedence will be applied when filter models are converted to the IQ model, FALSE otherwise.

Specified by:
enforceBooleanPrecedence in interface FilterObjectFactoryInterface
Returns:
TRUE if boolean precedence will be enforced

isOLAP

protected boolean isOLAP()
Returns TRUE if the business model represents OLAP data, FALSE otherwise.

Returns:
TRUE if the business model represents OLAP data

initDataService

public static com.sas.iquery.dataservices.IQDataServices initDataService(com.sas.iquery.metadata.business.BusinessModel businessModel)
Create and return an IQDataServices instance from the given BusinessModel.

Parameters:
businessModel - the BusinessModel to derive the IQDataServices instance from
Returns:
an IQDataServices instance for the given BusinessModel

getDataItems

public java.util.List getDataItems(boolean includeBaseModels)
Returns a list of all data items present in the active BusinessModel.

Parameters:
includeBaseModels - TRUE if the base models for the active BusinessModel should be recursed into as well.
Returns:
a list of all DataItems in the BusinessModel

newFilterItem

public com.sas.iquery.metadata.business.FilterItem newFilterItem()
Creates and returns a new FilterItem instance from the active BusinessModel. The new FilterItem is not added to BusinessModel. The 'hidden' flag on the new FilterItem is set to TRUE before the object is returned.

Specified by:
newFilterItem in interface FilterObjectFactoryInterface
Returns:
the new FilterItem instance

newFilterStep

public com.sas.iquery.metadata.business.step.StepInterface newFilterStep(FilterLogicTestNodeInterface testNode)
Creates and returns a new StepInterface instance for use in the OLAP step model. The type of object returned is based on the properties of the given test node. If qualifiers are present in the test node, a DataItemDataBasedFilter object is returned, otherwise a DataItemMemberFilter object is returned. The new instance is not added to the model. The action type on the new StepInterface instance is set to StepFilterInterface.INITIAL_ACTION_TYPE.

Specified by:
newFilterStep in interface FilterObjectFactoryInterface
Parameters:
testNode - the test node used to determine the type of object to return
Returns:
the new StepInterface instance or null if the testNode parameter was null

newCompoundFilter

public com.sas.iquery.metadata.business.CompoundFilter newCompoundFilter()
Creates and returns a new CompoundFilter instance from the active BusinessModel. The new CompoundFilter is not added to BusinessModel. The 'hidden' flag on the new CompoundFilter is set to TRUE before the object is returned.

Specified by:
newCompoundFilter in interface FilterObjectFactoryInterface
Returns:
the new CompoundFilter instance

newCompoundStep

public com.sas.iquery.metadata.business.step.CompoundStep newCompoundStep()
Creates and returns a new CompoundStep instance for use in the OLAP step model. The new instance is not added to the model.

Specified by:
newCompoundStep in interface FilterObjectFactoryInterface
Returns:
the new CompoundStep instance

removeFilterItem

public void removeFilterItem(java.lang.Object filterItem)
Remove the specified filter item from the business model.

Specified by:
removeFilterItem in interface FilterObjectFactoryInterface
Parameters:
filterItem - the filter item to remove from the active BusinessModel

addFilterItem

public void addFilterItem(com.sas.iquery.metadata.business.FilterItem filterItem)
Adds the filter item to the business model.

Parameters:
filterItem - the filter item to add to the active BusinessModel

getServerProperties

public com.sas.iquery.metadata.serverprop.ServerProperties getServerProperties()
Returns the ServerProperties object derived from the active BusinessModel.

Returns:
the model's ServerProperties object

newConstantExpression

public static com.sas.iquery.metadata.expr.ConstantExpression newConstantExpression(java.lang.String value,
                                                                                    int type)
Creates a new ConstantExpression with the given type and value.

Parameters:
value - the value to assign the new expression
type - the expression type to assign the new expression
Returns:
the new ConstantExpression instance

newStringExpression

public static com.sas.iquery.metadata.expr.StringExpression newStringExpression(java.lang.String text)
Creates a new StringExpression from the given text. The expression type defaults to 'character'.

Parameters:
text - the text to assign as the value for the new expression
Returns:
the new expression

newStringExpression

public static com.sas.iquery.metadata.expr.StringExpression newStringExpression(java.lang.String text,
                                                                                int type)
Creates a new StringExpression from the given text and expression type.

Parameters:
text - the text to assign as the value for the new expression
type - the expression type to assign the new expression
Returns:
the new expression

updateSimpleFilterFromTestNode

public boolean updateSimpleFilterFromTestNode(java.lang.Object filterItemObject,
                                              FilterLogicTestNodeInterface testNode)
Saves the test node data to the filter.

Specified by:
updateSimpleFilterFromTestNode in interface FilterObjectFactoryInterface
Parameters:
filterItemObject - the target filter
testNode - the source data
Returns:
TRUE if everything succeeds, FALSE otherwise

updateSimpleFilterFromTestNode

public boolean updateSimpleFilterFromTestNode(com.sas.iquery.metadata.business.FilterItem filterItem,
                                              FilterLogicTestNodeInterface testNode)
Save the testNode data to the filter and then make sure the filter is in the business model.

Specified by:
updateSimpleFilterFromTestNode in interface FilterObjectFactoryInterface
Parameters:
filterItem - the filter item to modify (may be null)
testNode - the test node to process
Returns:
TRUE if everything succeeds, FALSE otherwise

getExpressionListFromTestNodeValues

protected java.util.List getExpressionListFromTestNodeValues(FilterLogicTestNodeInterface testNode)
Constructs a List of expressions from the values assigned to the given test node. If a value already implements ExpressionInterface, it is added to the list directly. Currently, new expressions generated by this method are StringExpression instances, but this method should attempt to return the most appropriate expression class to fit the test node.

Parameters:
testNode - the test node to process
Returns:
the List of expression instances derived from the test node's value list

getStringExpressionListFromTestNodeValues

protected java.util.List getStringExpressionListFromTestNodeValues(FilterLogicTestNodeInterface testNode)
Constructs a List of StringExpressions from the values assigned to the given test node. If a value already is an instance of StringExpression, it is added to the list directly.

Parameters:
testNode - the test node to process
Returns:
the List of StringExpression instances derived from the test node's value list

createStringExpressionList

protected java.util.List createStringExpressionList(java.util.List values)
Creates and returns a List of StringExpression instances for the given List of values. If an object in the given list is already a StringExpression, it is added to the results directly, otherwise the object's toString() value is used in a new StringExpression whose data type is set to the the default type of 'character'.

Parameters:
values - the input list of objects
Returns:
the new list of StringExpressions

createStringExpressionList

protected java.util.List createStringExpressionList(java.util.List values,
                                                    int type)
Creates and returns a List of StringExpression instances for the given List of values. If an object in the given list is already a StringExpression, it is added to the results directly, otherwise the object's toString() value is used in a new StringExpression whose data type is set to the type value specified as a parameter.

Parameters:
values - the input list of objects
type - the type assigned to new StringExpressions
Returns:
the new list of StringExpressions

getMemberListFromTestNodeQualifiers

protected java.util.List getMemberListFromTestNodeQualifiers(FilterLogicTestNodeInterface testNode)
Creates and returns a List of members from the given test node. The objects in the list will either be a StringExpression representing a member or the actual IQ layer object for a measure.

Parameters:
testNode - the test node to process
Returns:
the List of members representing all selected qualifiers

getComparisonOperator

protected com.sas.iquery.metadata.expr.ComparisonOperator getComparisonOperator(FilterLogicTestNodeInterface testNode)
Returns the ComparisonOperator stored in the given test node. Null will be returned if the test node is null, no condition was assigned to the test node, or if the assigned condition was not an instance of ComparisonOperator.

Parameters:
testNode - the test node to process
Returns:
the ComparisonOperator for the test node or null if one isn't available

updateSimpleFilterFromTestNode

public boolean updateSimpleFilterFromTestNode(com.sas.iquery.metadata.business.step.StepInterface filterStep,
                                              FilterLogicTestNodeInterface testNode)
Save the testNode data to the filter and then make sure the filter is in the business model.

Parameters:
filterStep - the OLAP step model filter to update
testNode - the test node to examine
Returns:
TRUE if everything succeeded, FALSE otherwise

getItemType

protected long getItemType(FilterLogicTestNodeInterface testNode)
Returns the effective item type based on the selected item and qualifiers in the given test node.

Parameters:
testNode - the test node to examine
Returns:
the effective item type

updateSimpleFilter

public boolean updateSimpleFilter(com.sas.iquery.metadata.business.FilterItem filterItem,
                                  java.lang.String name,
                                  java.lang.String description,
                                  com.sas.iquery.metadata.expr.ExpressionInterface result)
Sets properties on the given filter item from the given parameters.

Parameters:
filterItem - the filter item to modify
name - the name to assign the filter item
description - the description to assign the filter item
result - the expression to assign the filter item
Returns:
TRUE if all assignments succeeded, FALSE otherwise

newCoumpoundFilter

public com.sas.iquery.metadata.business.CompoundFilter newCoumpoundFilter(com.sas.iquery.metadata.business.FilterItem left,
                                                                          com.sas.iquery.metadata.business.FilterItem right,
                                                                          com.sas.iquery.metadata.expr.ConditionalRelationType relationType,
                                                                          boolean isNegated)
Constructs and returns a new CompoundFilter object from the given parameters.

Parameters:
left - the left child to apply to the new filter item
right - the right child to apply to the new filter item
relationType - the logical relationship between the new filter's children
isNegated - the negation status to assign to the new filter item
Returns:
the new compound filter item

updateCompoundFilter

public boolean updateCompoundFilter(com.sas.iquery.metadata.business.FilterItem filterItem,
                                    com.sas.iquery.metadata.business.FilterItem left,
                                    com.sas.iquery.metadata.business.FilterItem right,
                                    com.sas.iquery.metadata.expr.ConditionalRelationType relationType,
                                    boolean isNegated)
Updates the given CompoundFilter object from the specified parameters.

Specified by:
updateCompoundFilter in interface FilterObjectFactoryInterface
Parameters:
filterItem - the compound filter to update
left - the left child to apply to the filter item
right - the right child to apply to the filter item
relationType - the logical relationship between the filter's children
isNegated - the negation status to assign to the filter item
Returns:
TRUE if the update was successful, FALSE otherwise

updateCompoundStep

public boolean updateCompoundStep(com.sas.iquery.metadata.business.step.CompoundStep compoundFilter,
                                  com.sas.iquery.metadata.business.step.StepInterface left,
                                  com.sas.iquery.metadata.business.step.StepInterface right,
                                  com.sas.iquery.metadata.expr.ConditionalRelationType relationType,
                                  boolean isNegated)
Updates the given compound step object from the specified parameters.

Specified by:
updateCompoundStep in interface FilterObjectFactoryInterface
Parameters:
compoundFilter - the filter to update
left - the left child to apply to the filter item
right - the right child to apply to the filter item
relationType - the logical relationship between the filter's children
isNegated - the negation status to assign to the filter item
Returns:
TRUE if the update was successful, FALSE otherwise

findMatchingFilterItem

public FilterItemInterface findMatchingFilterItem(FilterItemListInterface fili,
                                                  java.lang.Object itemObject)
This method attempts to locate and return the filter item that matches the search value from the native filter model.

Specified by:
findMatchingFilterItem in interface FilterObjectFactoryInterface
Parameters:
fili - the list of filter items to search
itemObject - the search value from the native model
Returns:
the filter item that represents the object from the native model or null if none applied

findMatchingConditionObject

public FilterConditionInterface findMatchingConditionObject(FilterItemInterface filterItem,
                                                            java.lang.Object conditionObject,
                                                            boolean isNegated,
                                                            java.util.List qualifiers)
This method attempts to locate and return the filter condition that matches the search value from the native filter model.

Parameters:
filterItem - the filter item holding the list of conditions to search
conditionObject - the search value from the native filter model
isNegated - TRUE if the condition is the negation of another (ex: Is not equal to)
qualifiers - an optional list of qualifiers that could affect the list of available conditions
Returns:
the filter condition that represents the object from the native model or null if none applied

findMatchingConditionObject

public FilterConditionInterface findMatchingConditionObject(FilterItemInterface filterItem,
                                                            java.lang.Object conditionObject,
                                                            boolean isNegated)
This method attempts to locate and return the filter condition that matches the search value from the native filter model.

Specified by:
findMatchingConditionObject in interface FilterObjectFactoryInterface
Parameters:
filterItem - the filter item holding the list of conditions to search
conditionObject - the search value from the native filter model
isNegated - TRUE if the condition is the negation of another (ex: Is not equal to)
Returns:
the filter condition that represents the object from the native model or null if none applied

findMatchingConditionObject

public FilterConditionInterface findMatchingConditionObject(java.lang.Object conditionObject,
                                                            boolean isNegated,
                                                            FilterConditionListInterface fcli)
This method attempts to locate and return the filter condition that matches the search value from the native filter model.

Parameters:
conditionObject - the search value from the native filter model
isNegated - TRUE if the condition is the negation of another (ex: Is not equal to)
fcli - the list of filter conditions to search
Returns:
the filter condition that represents the object from the native model or null if none applied

getAlternateConditions

protected java.util.List getAlternateConditions()

clearFilterCondition

public boolean clearFilterCondition(com.sas.iquery.metadata.business.FilterItem filterItem)
Clears the expression for the given filter item.

Specified by:
clearFilterCondition in interface FilterObjectFactoryInterface
Parameters:
filterItem - the item to clear
Returns:
TRUE if everything succeeded, FALSE otherwise

updateCompoundConditionalFilter

public boolean updateCompoundConditionalFilter(com.sas.iquery.metadata.business.FilterItem filterItem,
                                               com.sas.iquery.metadata.expr.ExpressionInterface expression,
                                               com.sas.iquery.metadata.expr.ExpressionInterface exprLeft,
                                               com.sas.iquery.metadata.expr.ExpressionInterface exprRight,
                                               com.sas.iquery.metadata.expr.ConditionalRelationType relationType,
                                               boolean isNegated)
Updates the given filter item from the specified parameters.

Parameters:
filterItem - the filter item to update
expression - the expression instance to update (if compound)
exprLeft - the left child expression to apply to the filter item
exprRight - the right child expression to apply to the filter item
relationType - the logical relationship between the filter's children
isNegated - the negation status to assign to the filter item
Returns:
TRUE if the update was successful, FALSE otherwise

newCompoundConditionalExpression

public com.sas.iquery.metadata.expr.CompoundConditionalExpression newCompoundConditionalExpression(com.sas.iquery.metadata.expr.ExpressionInterface exprLeft,
                                                                                                   com.sas.iquery.metadata.expr.ExpressionInterface exprRight,
                                                                                                   com.sas.iquery.metadata.expr.ConditionalRelationType relationType,
                                                                                                   boolean isNegated)
Creates and returns a new CompoundConditionalExpression object based on the specified parameters.

Parameters:
exprLeft - the left child expression to apply to the new expression
exprRight - the right child expression to apply to the new expression
relationType - the logical relationship between the new expression's children
isNegated - the negation status to assign to the filter item
Returns:
the new expression

newConditionalExpression

public com.sas.iquery.metadata.expr.ConditionalExpression newConditionalExpression(FilterLogicTestNodeInterface testNode)
Creates and returns a new ConditionalExpression object from the given test node.

Parameters:
testNode - the test node to process
Returns:
the derived expression

findMatchingFilterQualifier

public FilterQualifierInterface findMatchingFilterQualifier(FilterItemInterface filterItem,
                                                            java.lang.Object searchValue)
This method attempts to locate and return a filter qualifier that matches the search value from the native filter model.

Parameters:
filterItem - the filter item holding the qualifiers to search
searchValue - the search value from the native filter model
Returns:
the matching filter qualifier or null if none could be found

createFilterQualifierListFromNativeList

public java.util.List createFilterQualifierListFromNativeList(java.util.List nativeList,
                                                              FilterItemInterface filterItem)
Creates and returns a list of filter qualifiers to represent the list of objects from the native filter model.

Parameters:
nativeList - the list of objects to process from the native filter model
filterItem - the filter item to be associated with the new qualifiers
Returns:
the list of filter qualifiers representing the list of native objects

createFilterQualifierFromNative

public FilterQualifierInterface createFilterQualifierFromNative(java.lang.Object nativeObject)
Creates and returns a filter qualifier for the given object from the native filter model.

Parameters:
nativeObject - the value to process
Returns:
the filter qualifier that represents the given native filter model object

findMatchingFilterValue

public FilterValueInterface findMatchingFilterValue(FilterItemInterface filterItem,
                                                    java.lang.Object searchValue)
                                             throws DataRetrievalError
This method attempts to locate and return any previously constructed filter value object for the given search value from the native filter model.

Parameters:
filterItem - the filter item the value is associated with
searchValue - the value to search for from the native model
Returns:
the filter value representing the search value or null if none applied
Throws:
DataRetrievalError - when any problem occurs while communicating with a data server while gathering possible values for an item

createFilterValueListFromNativeList

public java.util.List createFilterValueListFromNativeList(java.util.List nativeList,
                                                          FilterItemInterface filterItem)
Creates and returns a list of FilterValueInterface wrappers for the given list of native filter object values.

Parameters:
nativeList - the list of native values to process
filterItem - the filter item the values are intended to be used with
Returns:
the list of filter values

createFilterValueList

protected java.util.List createFilterValueList(FilterItemInterface filterItem)
Creates and returns a list containing a FilterValueInterface wrapper for the OLAPTimeBasedFilterAdapterInterface contained in the given FilterItemInterface.

Parameters:
filterItem - the filter item that contains the OLAPTimeBasedFilterAdapterInterface to wrap into a FilterValueInterface.
Returns:
the list containing the FilterValueInterface wrapper.

createFilterValueFromNative

public FilterValueInterface createFilterValueFromNative(java.lang.Object nativeObject,
                                                        FilterLogicTestNodeInterface testNode)
Creates a FilterValueInterface object that encapsulates the given native object.

Parameters:
nativeObject - the object to encapsulate
testNode - the selection model the value is being created for
Returns:
a FilterValueInterface instance that represents an object from a native model

newFilterValue

public FilterValueInterface newFilterValue(java.lang.Object nativeObject,
                                           FilterLogicTestNodeInterface testNode)
Creates a FilterValueInterface object that encapsulates the given native object.

Parameters:
nativeObject - the object to encapsulate
testNode - the selection model the value is being created for
Returns:
a FilterValueInterface instance that represents an object from a native model

createFilterValueFromNative

public FilterValueInterface createFilterValueFromNative(java.lang.Object nativeObject)
Creates a FilterValueInterface object that encapsulates the given native object.

Parameters:
nativeObject - the object to encapsulate
Returns:
a FilterValueInterface instance that represents an object from a native model

createFilterValueFromNative

public FilterValueInterface createFilterValueFromNative(java.lang.Object nativeObject,
                                                        long itemType,
                                                        java.lang.String sasFormatText)
Creates a FilterValueInterface object that encapsulates the given native object.

Parameters:
nativeObject - the object to encapsulate
itemType - the item type to assign the filter value
sasFormatText - the SAS format text to use to generate formatted values
Returns:
a FilterValueInterface instance that represents an object from a native model

createFilterValueFromNative

public FilterValueInterface createFilterValueFromNative(java.lang.Object nativeObject,
                                                        long itemType,
                                                        java.lang.String sasFormatText,
                                                        boolean formatValue)
Creates a FilterValueInterface object that encapsulates the given native object.

Parameters:
nativeObject - the object to encapsulate
itemType - the item type to assign the filter value
sasFormatText - the SAS format text to use to generate formatted values
Returns:
a FilterValueInterface instance that represents an object from a native model

formatFunctionCall

public static java.lang.String formatFunctionCall(com.sas.iquery.metadata.expr.FunctionCall expr)

newTestNode

public FilterLogicTestNodeInterface newTestNode(com.sas.iquery.metadata.business.DataItem dataItem,
                                                com.sas.iquery.metadata.business.step.StepInterface filterObject,
                                                FilterItemListInterface filterItemList)
Creates a new test node from the given OLAP Step model filter.

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
dataItem - the DataItem the step filter affects
filterObject - the step filter to examine
filterItemList - the list of previously created filter items
Returns:
the new test node encapsulating the OLAP step model filter

newTestNode

public FilterLogicTestNodeInterface newTestNode(com.sas.iquery.metadata.business.BusinessQuery bq,
                                                com.sas.iquery.metadata.business.DataItem dataItem,
                                                com.sas.iquery.metadata.business.step.StepInterface filterObject,
                                                FilterItemListInterface filterItemList)
Creates a new test node from the given OLAP Step model filter.

Parameters:
bq - the associated BusinessQuery, if any
dataItem - the DataItem the step filter affects
filterObject - the step filter to examine
filterItemList - the list of previously created filter items
Returns:
the new test node encapsulating the OLAP step model filter

newTestNode

public FilterLogicTestNodeInterface newTestNode(com.sas.iquery.metadata.business.DataItem dataItem,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node to describe the effective OLAP filter step for the given DataItem.

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
dataItem - the DataItem to examine
filterItemList - the list of existing filter items to use during the conversion
Returns:
the new test node

getFilterStep

public com.sas.iquery.metadata.business.step.StepInterface getFilterStep(com.sas.iquery.metadata.business.DataItem dataItem)
Returns the effective filter step for the given data item. The step model is only used for OLAP items and the effective filter is the latest filter related step that was applied.

Parameters:
dataItem - the DataItem to examine
Returns:
the effect filter step for the item

newTestNode

public FilterLogicTestNodeInterface newTestNode(com.sas.iquery.metadata.business.FilterItem filter,
                                                FilterItemListInterface filterItemList)
Creates a new test node if-and-only-if the filter is a simple filter. This method delegates the actual construction of the test node to one of the other more specific newTestNode methods.

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
filter - the native filter item to convert to a test node
filterItemList - the list of existing filter items to use during the conversion
Returns:
the new test node that encapsulates the native filter

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.olap.MemberFilterExpression filterExpression,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Parameters:
name - a label for the test node
desc - a description for the test node
filterExpr - the filter expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.olap.DataBasedFilterExpression filterExpr,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Parameters:
name - a label for the test node
desc - a description for the test node
filterExpr - the filter expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.olap.TimeFilterExpression filterExpression,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Parameters:
name - a label for the test node
desc - a description for the test node
filterExpression - the filter expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.olap.TimeRangeFilterExpression filterExpression,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Parameters:
name - a label for the test node
desc - a description for the test node
filterExpression - the filter expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.FunctionCall fCall,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
name - a label for the test node
desc - a description for the test node
fCall - the function call object to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_Comparison compExpr,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties. This method handles most of the simple operators (<,<=,=,>=,>).

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
name - a label for the test node
desc - a description for the test node
compExpr - the comparison conditional expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_In inExpr,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
name - a label for the test node
desc - a description for the test node
inExpr - the 'is in' conditional expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_Between betweenExpr,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
name - a label for the test node
desc - a description for the test node
betweenExpr - the 'is between' conditional expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_Contains containsExpr,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Parameters:
name - a label for the test node
desc - a description for the test node
betweenExpr - the 'contains' conditional expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_Like likeExpr,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Parameters:
name - a label for the test node
desc - a description for the test node
betweenExpr - the 'contains' conditional expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                com.sas.iquery.metadata.expr.relational.SimpleConditionalExpression_TestForNull nullExpr,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
name - a label for the test node
desc - a description for the test node
nullExpr - the 'is null' conditional expression to process
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                java.lang.Object item,
                                                java.lang.Object conditionObject,
                                                boolean isNegated,
                                                java.util.List values,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Specified by:
newTestNode in interface FilterObjectFactoryInterface
Parameters:
name - a label for the test node
desc - a description for the test node
item - the selected filter item
conditionObject - the selected condition
isNegated - flag for setting negation on the test node
values - any selected value(s)
filterItemList - the list of known filter items
Returns:
the new test node

newTestNode

public FilterLogicTestNodeInterface newTestNode(java.lang.String name,
                                                java.lang.String desc,
                                                java.lang.Object item,
                                                java.util.List qualifiers,
                                                java.lang.Object conditionObject,
                                                boolean isNegated,
                                                java.util.List values,
                                                FilterItemListInterface filterItemList)
Creates and returns a new test node from the given properties.

Parameters:
name - a label for the test node
desc - a description for the test node
item - the selected filter item
qualifiers - the selected list of qualifiers
conditionObject - the selected condition
isNegated - flag for setting negation on the test node
values - any selected value(s)
filterItemList - the list of known filter items
Returns:
the new test node

getQualifiers

public FilterQualifierListInterface getQualifiers(java.util.List items)
Creates and returns a filter qualifier list for the given list of objects.

Parameters:
items - the list of items being converted
Returns:
the list of filter qualifiers representing the given list of objects

getDataServiceValues

public java.util.List getDataServiceValues(com.sas.iquery.metadata.business.DataItem dataItem)
Creates and returns a list of values for the given data item as retrieved by the IQDataServices class. The length of the list is governed by the max observations value for the factory.

Parameters:
dataItem - the DataItem to get values for
Returns:
the list of possible values for the given data item

newFilterDataValue

public FilterValueInterface newFilterDataValue(com.sas.iquery.dataservices.PossibleFilterValue value)
Constructs a new FilterValueInterface instance from the given PossibleFilterValue object. An non-null but empty value will be created if the value parameter is null.

Parameters:
value - the PossibleFilterValue used to derive the new FilterValueInterface
Returns:
a new FilterValueInterface instance

newFilterDataValue

public FilterValueInterface newFilterDataValue(com.sas.iquery.metadata.business.LookupValue value,
                                               com.sas.iquery.metadata.business.DataItem dataItem)
Creates a new FilterValueInterface instance from the given LookupValue for the specified DataItem.

Parameters:
value - the LookupValue to create the new filter value from
dataItem - the DataItem the LookupValue was derived from
Returns:
the new filter value

getFilterableItems

public java.util.List getFilterableItems(boolean includeBaseModels,
                                         java.util.Map filterItemLookup)
Creates and returns a List of filterable items for the active business model.

Specified by:
getFilterableItems in interface FilterObjectFactoryInterface
Parameters:
includeBaseModels - set to TRUE if the business model's base models should be examined, FALSE otherwise
filterItemLookup - a Map of previously created filter items
Returns:
the List of filterable items for the active business model

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Measure olapMeasure,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given OLAP Measure to a FilterItemInterface for use throughout the filter model.

Parameters:
olapMeasure - the measure to process
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Member olapMember,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given OLAP member to a FilterItemInterface for use throughout the filter model.

Parameters:
olapMember - the member to process
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Level olapLevel,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given Level to a FilterItemInterface for use throughout the filter model.

Parameters:
olapLevel - the level to process
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Hierarchy olapHierarchy,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given Hierarchy to a FilterItemInterface for use throughout the filter model.

Parameters:
olapHierarchy - the hierarchy to process
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Dimension olapDimension,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given Dimension to a FilterItemInterface for use throughout the filter model.

Parameters:
olapDimension - the dimension to process
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.expr.StringExpression stringExpression,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given expression to a FilterItemInterface for use throughout the filter model.

Parameters:
stringExpression - the expression to convert
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.physical.Column columnItem,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given column to a FilterItemInterface for use throughout the filter model.

Parameters:
columnItem - the Column to convert
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.expr.ConstantExpression constantExpression,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given expression to a FilterItemInterface for use throughout the filter model.

Parameters:
constantExpression - the expression to convert
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.expr.FunctionCall functionCall,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given function call to a FilterItemInterface for use throughout the filter model.

Parameters:
functionCall - the function call to convert
itemName - the name to assign the filter item
dataItem - the DataItem this item will be based on
qualifiers - the qualifiers for the filter item
Returns:
the filter item representing the given function call

convertToFilterableItem

public FilterItemInterface convertToFilterableItem(com.sas.iquery.metadata.expr.ExpressionInterface expression,
                                                   java.lang.String itemName,
                                                   com.sas.iquery.metadata.business.DataItem dataItem,
                                                   FilterQualifierListInterface qualifiers)
Converts the given expression to a FilterItemInterface for use throughout the filter model.

Parameters:
expression - the expression to convert
itemName - to assign the filter item
dataItem - the DataItem this filter is based on
qualifiers - the qualifiers for this filter item
Returns:
the filter item representing the expression

setFilterItemProperties

protected void setFilterItemProperties(FilterItemInterface filterItem,
                                       com.sas.iquery.metadata.business.DataItem dataItem)
Sets any additional DataItem specific properties on the filter item.

Parameters:
filterItem - the filter item to modify
dataItem - the DataItem to examine

setFilterItemProperties

protected void setFilterItemProperties(FilterItemInterface filterItem,
                                       com.sas.iquery.metadata.expr.ResourceAwareStringExpression expression)
Sets any additional expression specific properties on the filter item.

Parameters:
filterItem - the filter item to modify
expression - the ResourceAwareStringExpression to examine

getRelationalConditions

public FilterConditionListInterface getRelationalConditions(com.sas.iquery.metadata.expr.ExpressionInterface expression)
Returns the condition list appropriate for the given expression assuming it is for relational data.

Parameters:
expression - the expression to examine
Returns:
the condition list appropriate for the given expression

getRelationalConditions

public FilterConditionListInterface getRelationalConditions(com.sas.iquery.metadata.business.DataItem item)
Returns the condition list appropriate for the given DataItem assuming it is for relational data.

Parameters:
item - the item to examine
Returns:
the condition list appropriate for the given item

getRelationalConditions

public FilterConditionListInterface getRelationalConditions(com.sas.iquery.metadata.expr.ExpressionInterface expression,
                                                            boolean forcedFormatting)
Returns the condition list appropriate for the given expression assuming it is for relational data.

Parameters:
expression - the expression to examine
forcedFormatting - flag to specify if forced formatting should be considered while constructing the condition list
Returns:
the condition list appropriate for the given expression

getRelationalConditions

public FilterConditionInterface[] getRelationalConditions(boolean forcedFormatting)
Returns a FilterConditionListInterface instance containing the list of all conditions to be used for relational DataItem based filters.

Returns:
the conditions for relational filter items

getRelationalCharacterConditions

public FilterConditionInterface[] getRelationalCharacterConditions(boolean forcedFormatting)
Returns the condition list for relational filter items that are for character data.

Returns:
the condition list for alphanumeric relational filter items

getRelationalNumericConditions

public FilterConditionInterface[] getRelationalNumericConditions(boolean forcedFormatting)
Returns the condition list for relational filter items that are for numeric data.

Returns:
the condition list for numeric relational filter items

getOLAPMeasureConditionList

public FilterConditionListInterface getOLAPMeasureConditionList()
Returns a FilterConditionListInterface instance containing the list of all conditions to be used in data-based filters for OLAP DataItems.

Returns:
the conditions for OLAP measures

getOLAPMemberConditionList

public FilterConditionListInterface getOLAPMemberConditionList()
Returns a FilterConditionListInterface instance containing the list of all conditions to be used in member-based filters for OLAP DataItems.

Returns:
the condition list for OLAP member filter items

createFilterItemFromNative

public FilterItemInterface createFilterItemFromNative(java.lang.Object data,
                                                      FilterItemListInterface fili)
Creates and returns a new FilterItemInterface wrapper around the given native object. If a filter item list is passed in as well, an attempt is made to locate and return any previously made filter item for the native object.

Parameters:
data - the native object to convert to a filter item
fili - the list of previously created filter items
Returns:
FilterItemInterface the filter item for the native object

convertToFilterItem

public FilterItemInterface convertToFilterItem(java.lang.Object item,
                                               com.sas.iquery.metadata.business.DataItem dataItem,
                                               FilterItemListInterface filterItemList)

getMaxOutputObservations

public 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.

Specified by:
getMaxOutputObservations in interface FilterObjectFactoryInterface
Returns:
the maximum number of output observations

setMaxOutputObservations

public 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.

Specified by:
setMaxOutputObservations in interface FilterObjectFactoryInterface
Parameters:
max - the new maximum number of output observations
See Also:
Governing

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale to be used when creating/retrieving text that will be visible to a user.

Specified by:
setLocale in interface FilterObjectFactoryInterface
Parameters:
locale - the new locale

getLocale

public java.util.Locale getLocale()
Returns the Locale value set for this instance of the factory.

Specified by:
getLocale in interface FilterObjectFactoryInterface
Returns:
the current locale

getAdjustedFilterItemType

protected static long getAdjustedFilterItemType(FilterItemInterface item)
This method is intended to be used if an item's effective data type can not be determined by simply checking the ItemType property on a filter item.

Parameters:
item - the item to examine
Returns:
the adjusted effective item type

createExpressionFromNative

public com.sas.iquery.metadata.expr.ExpressionInterface createExpressionFromNative(java.lang.Object nativeObject,
                                                                                   int expressionType)
Attempts to create a new ExpressionInterface instance from the given native Object for the specified expression type. Special cases are taken into consideration for certain expression types and different classes may be returned as a result.

Parameters:
nativeObject - the source native object
expressionType - the type of expression to be made
Returns:
a new ExpressionInterface instance or null if there were problems during construction

createExpressionFromNative

public com.sas.iquery.metadata.expr.ExpressionInterface createExpressionFromNative(java.lang.Object nativeObject,
                                                                                   int expressionType,
                                                                                   boolean userCreated)

createJavaDateFromSASDate

public java.util.Date createJavaDateFromSASDate(double value)
Deprecated. use DateAndTimeUtil.createJavaDateFromSASDate(double) instead

Parameters:
value - the SAS double value
Returns:
the corresponding Java Date object

createJavaDateFromSASTime

public java.util.Date createJavaDateFromSASTime(double value)
Deprecated. use DateAndTimeUtil.createJavaDateFromSASTime(double) instead

Parameters:
value - the SAS double value
Returns:
the corresponding Java Date object

createJavaDateFromSASDateTime

public java.util.Date createJavaDateFromSASDateTime(double value)
Deprecated. use DateAndTimeUtil.createJavaDateFromSASDateTime(double) instead

Parameters:
value - the SAS double value
Returns:
the corresponding Java Date object

getDateOrNullFromNative

public static java.util.Date getDateOrNullFromNative(java.lang.Object nativeObject,
                                                     int expressionType,
                                                     java.util.Locale locale)
Attempts to extract a Date value from the given native object. The expression type is used to narrow down what potential formats to use when parsing the date value.

Parameters:
nativeObject - the source object
expressionType - the expression type (time/date/datetime)
locale -
Returns:
a Date object or null if none could be determined

wrapValueListDates

public void wrapValueListDates(FilterLogicTestNodeInterface testNode)
Encapsulates all Date objects in the given test node's value list in FilterValueInterface instances.

Parameters:
testNode - the test node to process

getFilterItemSASFormatText

protected static java.lang.String getFilterItemSASFormatText(java.lang.Object item)
Deprecated. Use DateAndTimeUtil#getFilterItemSASFormatText(Object) instead


setFilterBaseModelData

public void setFilterBaseModelData(FilterBaseModelData baseModel)

getMetadataInterface

public MetadataInterface getMetadataInterface()
                                       throws FilterException
Returns a MetadataInterface instance that should connect with the first DataSource in the current BusinessModel. Once connected, the same instance will be returned each time this method is called avoiding the overhead of searching for login credentials and using them to connect to a server.

Returns:
the (potentially cached) metadata connection or null if none was available.
Throws:
FilterException - for any unrecoverable errors that occur while connecting with the OLAP metadata server

releaseResources

public void releaseResources()

getLevelProperties

public java.util.Map getLevelProperties(OLAPDataSetInterface model,
                                        com.sas.iquery.metadata.business.DataItem di)
                                 throws OLAPException
Throws:
OLAPException

getLevelProperties

public java.util.Map getLevelProperties(MetadataInterface metadata,
                                        com.sas.iquery.metadata.business.DataItem di)
                                 throws OLAPException
Throws:
OLAPException

getLevelProperties

public java.util.Map getLevelProperties(MetadataInterface metadata,
                                        com.sas.iquery.metadata.business.DataItem di,
                                        java.lang.String cubeName)
                                 throws OLAPException
Gathers and returns a Map of levels and the filterable properties for each level. The DataItem must be for a Hierarchy object for this method to succeed.

Parameters:
metadata - the OLAP server metadata connection
di - the DataItem to examine
cubeName - the name of the cube to explore
Returns:
a Map of Levels w/ Lists of PropertyInterface objects
Throws:
OLAPException

isTimeDimension

protected boolean isTimeDimension(com.sas.iquery.metadata.business.DataItem item)

getEnvironment

public int getEnvironment()
Gets the current operating environment.

Returns:
The operating environment. Valid values are defined in com.sas.util.OperatingEnvironmentInterface.

setEnvironment

public void setEnvironment(int environment)
Sets the operating environment to the specified value.

Parameters:
environment - The environment to set. Valid values are defined in com.sas.util.OperatingEnvironmentInterface.

getDataItem

public static com.sas.iquery.metadata.business.DataItem getDataItem(FilterItemInterface filterItem)

createValueItemFromUniqueMemberID

public static com.sas.util.ValueItem createValueItemFromUniqueMemberID(com.sas.iquery.metadata.business.DataItem dataItem,
                                                                       java.lang.String memberName)
                                                                throws com.sas.iquery.metadata.MetadataException,
                                                                       OLAPException
Throws:
com.sas.iquery.metadata.MetadataException
OLAPException

createValueItem

public static com.sas.util.ValueItem createValueItem(TupleElementInterface tupleElement)
                                              throws OLAPException
Throws:
OLAPException



Copyright © 2009 SAS Institute Inc. All Rights Reserved.