SAP BI Java SDK

Package com.sap.ip.bi.sdk.dac.relational.query.tree

Provides classes and interfaces to represent a WHERE condition in tree form.

See:
          Description

Interface Summary
IBIWhereTree The WHERE condition represented in tree form to simplify manipulation and SQL code generation.
IBIWhereTreeAndNode AND node of a WHERE tree.
IBIWhereTreeBinaryNode Node of a WHERE tree with two children (left and right).
IBIWhereTreeColumnJoinNode JOIN predicate node of a WHERE tree, as in, for example: <tableref>.<column> <oper> <other-tableref>.<other-column>.
IBIWhereTreeColumnNode Predicate node of a WHERE tree using a column with optional table reference (to allow self-joins).
IBIWhereTreeColumnSubQueryNode Subselect predicate node of a WHERE tree, as in, for example: <tableref>.<column> <oper> <sub-select>.
IBIWhereTreeColumnValueNode Value predicate node of a WHERE tree, as in, for example: <tableref>.<column> <oper> <value>.
IBIWhereTreeNode Node of a WHERE tree.
IBIWhereTreeNotNode NOT node of a WHERE tree.
IBIWhereTreeOrNode OR node of a WHERE tree.
IBIWhereTreePredicateNode Predicate node of a WHERE tree.
IBIWhereTreeUnaryNode Node of a WHERE tree with just one child.
 

Package com.sap.ip.bi.sdk.dac.relational.query.tree Description

Provides classes and interfaces to represent a WHERE condition in tree form.

Logical expressions used to specify WHERE conditions can be represented as trees containing the logical operations AND, OR, and NOT as internal nodes and predicates, such as a=1, as the leaves.

The predicates usually are of the form:

<column> <oper> <value>

In the above case, <value> can be one of the following:

For example:

where tree

The where condition specified by the above tree is:

( (a=1) OR (b=2) ) AND (NOT (c=3) )

This tree could be implemented using the following code:

  Column a = ...;
  Column b = ...;
  Column c = ...;
  BIWhereTree tree = new BIWhereTree();
  tree.push(a, IBISQLComparisonOperator.EQUALS), new Integer(1));
  tree.push(b, IBISQLComparisonOperator.EQUALS), new Integer(2));
  tree.push(IBISQLLogicalOperator.OR);
  tree.push(c, IBISQLComparisonOperator.EQUALS), new Integer(3));
  tree.push(IBISQLLogicalOperator.NOT);
  tree.push(IBISQLLogicalOperator.AND);
  tree.popRoot();

Since:
3.50

SAP BI Java SDK

Copyright © 2004-2006 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies (SAP Group) for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.