com.sap.netweaver.bc.uwl.config

Class CompoundExpression

java.lang.Object
  extended bycom.sap.netweaver.bc.uwl.config.CompoundExpression
All Implemented Interfaces:
Cloneable, Serializable

public final class CompoundExpression
extends Object
implements Cloneable, Serializable

Contains one or more Expression and CompondExpression objects. These contained objects are either "OR" ed or "AND" ed. CompoundExpression is used for specifying Filters.

 Following examples illustrate how to build complex expressions.
 In these example A, B, C are atomic units i.e. Expressions. For example A Could be priority = high  or days > 3 etc.
 1. A & B & C
 <CompoundExpression operator=AND>
     <Expression A> <Expression B> <Expression C>
 </CompoundExpression>
 2. (A & B) || C || D
 <CompoundExpression operator=OR>
         <CompoundExpression operator=AND>
             <Expression A> <Expression B>
         </CompoundExpression>
         <Expression C>
         <Expression D>
 </CompoundExpression>
 

See Also:
Expression, Serialized Form

Constructor Summary
CompoundExpression(ArrayList conds, ArrayList compoundExprs, Descriptions displNames, boolean or)
           
CompoundExpression(ArrayList conds, ArrayList compoundExprs, Descriptions displNames, String bundle, boolean or)
           
 
Method Summary
 Object clone()
           
 boolean equals(CompoundExpression obj)
           
 CompoundExpression[] getCompoundExpressions()
           
 Descriptions getDisplayNames()
          Returns the descriptions.
 Expression[] getExpressions()
           
 String getReferenceBundle()
          Could be null
 Object internalGetFilterSql()
          Used for internal purposes to cache the SQL for filtering.
 void internalSetFilterSql(Object sql)
          Used for internal purposes to cache the SQL for filtering.
 boolean isDefaultFilter()
          This is used to determine which filter should be applied to a view the first time it displayed.
 boolean isOr()
           
 void setDefaultFilter(boolean b)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompoundExpression

public CompoundExpression(ArrayList conds,
                          ArrayList compoundExprs,
                          Descriptions displNames,
                          boolean or)
Parameters:
conds - null is okey.Modifying the conds after creating the CompoundExpression object has no effect.
compoundExprs - null is okey.Modifying the compoundExprs after creating the CompoundExpression object has no effect.
displNames - could be null
or - means ORed or ANDed

CompoundExpression

public CompoundExpression(ArrayList conds,
                          ArrayList compoundExprs,
                          Descriptions displNames,
                          String bundle,
                          boolean or)
Parameters:
conds - null is okey. Modifying the conds after creating the CompoundExpression object has no effect.
compoundExprs - null is okey. Modifying the compoundExprs after creating the CompoundExpression object has no effect.
displNames - could be null
bundle - could be null
or - means ORed or ANDed
Method Detail

getReferenceBundle

public String getReferenceBundle()
Could be null

Returns:
could be null

isOr

public boolean isOr()
Returns:
true if it is OR

getExpressions

public Expression[] getExpressions()
Returns:
immutable value. Caller shoudlnt change it.

getCompoundExpressions

public CompoundExpression[] getCompoundExpressions()
Returns:
immutable value. Caller shouldnt change it.

getDisplayNames

public Descriptions getDisplayNames()
Returns the descriptions.

Returns:
Descriptions

internalGetFilterSql

public Object internalGetFilterSql()
Used for internal purposes to cache the SQL for filtering.

Returns:
could be null

internalSetFilterSql

public void internalSetFilterSql(Object sql)
Used for internal purposes to cache the SQL for filtering. This is not meant for public usage and consequences of using this may result in unwanted results. Another cuation for internal usage, do not set time or context or user dependent query here.

Parameters:
sql - coule be null

clone

public Object clone()
             throws CloneNotSupportedException
Throws:
CloneNotSupportedException

equals

public boolean equals(CompoundExpression obj)

toString

public String toString()

isDefaultFilter

public boolean isDefaultFilter()
This is used to determine which filter should be applied to a view the first time it displayed.

Returns:

setDefaultFilter

public void setDefaultFilter(boolean b)
Parameters:
b -


Copyright 2006 SAP AG Complete Copyright Notice