***  This class is subject to change.  ***

com.sas.iquery.metadata.expr
Class CompoundConditionalExpression

com.sas.iquery.metadata.expr.CompoundConditionalExpression
All Implemented Interfaces:
Base, BusinessModelResourceReferencer, CascadableFilter, FilterCascadeContainer, FilterCascadeContainerUpdater, ModelItem, UsabilityInterface, ExpressionInterface, PropertyChangeListenee, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener

public class CompoundConditionalExpression
implements FilterCascadeContainerUpdater, CascadableFilter

Models a conditional expression that is made up of one or two sub-conditional expressions adjoined by an AND or OR relation, and optionally negated.

The abstract form of the expression is

 
   [NOT] ( {Conditional or String Expression} {AND|OR} {Conditional or String Expression} )
 

The left and right expressions, when set, should have an expression type of ExpressionTypes.EXP_TYPE_BOOLEAN.


Field Summary
static java.lang.String EVENT_LEFT_EXPRESSION_CHANGED
          Indication that left portion of condition expression has changed.
static java.lang.String EVENT_RELATION_TYPE_CHANGED
          Indication that relational type has changed.
static java.lang.String EVENT_RIGHT_EXPRESSION_CHANGED
          Indication that right portion of condition expression has changed.
 
Fields inherited from class com.sas.iquery.metadata.expr.ConditionalExpression
EVENT_NEGATION_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
 
Constructor Summary
CompoundConditionalExpression()
           
 
Method Summary
 java.util.List getCascades(boolean recursive)
          Returns the list of FilterCascadeInterfaces set on the filter.
 ExpressionInterface getExpression()
          Returns the ExpressionInterface for this CascadableFilter.
 ExpressionInterface getLeftExpression()
          Returns left portion of condition expression.
 ConditionalRelationType getRelationType()
          Returns a relation type from the values in class ConditionalRelationType.
 ExpressionInterface getRightExpression()
          Returns right portion of condition expression.
 void setCascades(java.util.List filterCascades)
          Set the list of FilterCascadeInterfaces that are associated to this expression.
 void setLeftExpression(ExpressionInterface condExpr)
          Sets the left expression
 void setRelationType(ConditionalRelationType relationType)
          Sets the relation type with a value from class ConditionalRelationType
 void setRightExpression(ExpressionInterface condExpr)
          Sets the right expression
 
Methods inherited from class com.sas.iquery.metadata.expr.ConditionalExpression
getExpressionType, isNegated, setIsNegated
 
Methods inherited from interface com.sas.iquery.metadata.business.BusinessModelResourceReferencer
getResources
 
Methods inherited from interface com.sas.iquery.metadata.PropertyChangeListenee
addListener, getListeners, removeListener
 
Methods inherited from interface com.sas.iquery.metadata.business.UsabilityInterface
getReasonsUnusable, isUsableInQuery
 

Field Detail

EVENT_RELATION_TYPE_CHANGED

public static final java.lang.String EVENT_RELATION_TYPE_CHANGED
Indication that relational type has changed.

See Also:
Constant Field Values

EVENT_LEFT_EXPRESSION_CHANGED

public static final java.lang.String EVENT_LEFT_EXPRESSION_CHANGED
Indication that left portion of condition expression has changed.

See Also:
Constant Field Values

EVENT_RIGHT_EXPRESSION_CHANGED

public static final java.lang.String EVENT_RIGHT_EXPRESSION_CHANGED
Indication that right portion of condition expression has changed.

See Also:
Constant Field Values
Constructor Detail

CompoundConditionalExpression

public CompoundConditionalExpression()
Method Detail

getRelationType

public ConditionalRelationType getRelationType()
Returns a relation type from the values in class ConditionalRelationType.

Returns:
a relation type from the values in class ConditionalRelationType

setRelationType

public void setRelationType(ConditionalRelationType relationType)
Sets the relation type with a value from class ConditionalRelationType

Parameters:
relationType -
See Also:
ConditionalRelationType

setLeftExpression

public void setLeftExpression(ExpressionInterface condExpr)
Sets the left expression

Parameters:
condExpr - the Expression to use for the left side of the conditional

getLeftExpression

public ExpressionInterface getLeftExpression()
Returns left portion of condition expression.

Returns:
the left expression.

setRightExpression

public void setRightExpression(ExpressionInterface condExpr)
Sets the right expression

Parameters:
condExpr - the Expression to use for the right side of the conditional

getRightExpression

public ExpressionInterface getRightExpression()
Returns right portion of condition expression.

Returns:
the right expression.

setCascades

public void setCascades(java.util.List filterCascades)
Set the list of FilterCascadeInterfaces that are associated to this expression. This call will replace the current list of cascades.

Specified by:
setCascades in interface FilterCascadeContainerUpdater
Parameters:
filterCascades - list of FilterCascadeInterfaces

getCascades

public java.util.List getCascades(boolean recursive)
Description copied from interface: FilterCascadeContainer
Returns the list of FilterCascadeInterfaces set on the filter.

Specified by:
getCascades in interface FilterCascadeContainer
Parameters:
recursive - determines if the list of filter cascades returned includes all the cascades from filters that make up the current filter
Returns:
filterCascades list of FilterCascadeInterfaces
See Also:
FilterCascadeContainer.getCascades(boolean)

getExpression

public ExpressionInterface getExpression()
Description copied from interface: CascadableFilter
Returns the ExpressionInterface for this CascadableFilter.

Specified by:
getExpression in interface CascadableFilter
Returns:
The underlining ExpressionInterface
See Also:
CascadableFilter.getExpression()

***  This class is subject to change.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.