com.businessobjects.rebean.wi
Interface AdvancedCondition

All Superinterfaces:
FilterConditionNode, TreeNode

public interface AdvancedCondition
extends FilterConditionNode

Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.

The AdvancedCondition interface represents a sub query.

An AdvancedCondition is defined by:

The following code shows how to create an AdvancedCondition.

 
 ConditionContainer condCont = null;
 condCont = query.createCondition(LogicalOperator.AND);
 AdvancedCondition aCond = condCont.createAdvancedCondition(
 new DataSourceObject[] { query.getResultObject(0)},ConditionOperator.IN_LIST,null,
 new DataSourceObject[] { query.getResultObject(1)});
 myDataProvider.runQuery();
 
 

This class can have only one child node, for more information see AdvancedCondition.createCondition(LogicalOperator).

See Also:
ConditionContainer.createAdvancedCondition(DataSourceObject[], ConditionOperator, ComparisonOperator, DataSourceObject[])

Method Summary
 void addFilterObject(DataSourceObject dso)
          Add a DataSourceObject to filter this AdvancedCondition.
 void addResultObject(DataSourceObject dso)
          Add a result object to this AdvancedCondition.
 ConditionContainer copyCondition(ConditionContainer cont)
          Makes a copy of cont and adds it to this advanced condition.
 ConditionContainer createCondition(LogicalOperator op)
          Creates a ConditionContainer for this advanced condition.
 ComparisonOperator getComparisonOperator()
          Returns the ComparisonOperator from the AdvancedCondition tree.
 ConditionContainer getCondition()
          Returns the ConditionContainer set in this AdvancedCondition.
 ConditionOperator getConditionOperator()
          Returns the ConditionOperator defined in this AdvancedCondition object.
 DataSourceObject getDimension(int index)
          Deprecated. Use AdvancedCondition.getFilterObject(int) instead.
 int getDimensionCount()
          Deprecated. Use AdvancedCondition.getFilterObjectCount() instead.
 DataSourceObject getFilterObject(int index)
          Returns the DataSourceObject at index used to filter this AdvancedCondition.
 int getFilterObjectCount()
          Returns the number of DataSourceObject instances used as filter objects on this AdvancedCondition.
 DataSourceObject getResultObject(int index)
          Returns the DataSourceObject at the specific index in the result part of the AdvancedCondition tree.
 int getResultObjectCount()
          Returns the number of DataSourceObject instances in the result part of the AdvancedCondition.
 boolean hasCondition()
          Returns true when at least one ConditionContainer has been added to this AdvancedCondition object.
 void removeCondition()
          Deletes the condition part of this AdvancedCondition.
 void removeFilterObject(int index)
          Remove a filter object from a specific index in this AdvancedCondition object.
 void removeResultObject(int index)
          Remove a result object from this AdvancedCondition.
 void setComparisonOperator(ComparisonOperator operator)
          Set a ComparisonOperator such as ANY or ALL in the AdvancedCondition tree.
 void setConditionOperator(ConditionOperator operator)
          Set a ConditionOperator such as EQUAL or NOT_EQUAL in the AdvancedCondition tree.
 
Methods inherited from interface com.businessobjects.rebean.wi.FilterConditionNode
getFilterConditionNode, getID, getName, remove, removeAllChildren
 
Methods inherited from interface com.businessobjects.rebean.wi.TreeNode
getChildAt, getChildCount, getIndex, getParent, isLeaf
 

Method Detail

getDimensionCount

@Deprecated
int getDimensionCount()
Deprecated. Use AdvancedCondition.getFilterObjectCount() instead.

Returns the number of dimensions this AdvancedCondition uses.

Returns:
The number of dimensions this AdvancedCondition uses.

getDimension

@Deprecated
DataSourceObject getDimension(int index)
Deprecated. Use AdvancedCondition.getFilterObject(int) instead.

Returns a DataSourceObject containing a dimension stored at a specific index in the AdvancedCondition.

Returns:
A DataSourceObject containing a dimension stored at a specific index in this AdvancedCondition.

getFilterObjectCount

int getFilterObjectCount()
Returns the number of DataSourceObject instances used as filter objects on this AdvancedCondition.

Returns:
The number of DataSourceObject instances in this AdvancedCondition filter.
Since:
11.5

getFilterObject

DataSourceObject getFilterObject(int index)
Returns the DataSourceObject at index used to filter this AdvancedCondition.

Parameters:
index - The position of filter object to be retrieved.
Returns:
The DataSourceObject at position index.
Throws:
java.lang.IndexOutOfBoundsException - When index < 0 || index >= AdvancedCondition.getFilterObjectCount()
Since:
11.5

addFilterObject

void addFilterObject(DataSourceObject dso)
Add a DataSourceObject to filter this AdvancedCondition.

Parameters:
dso - A DataSourceObject representing an object in a Business Objects universe. An example of a universe object used to filter an AdvancedCondition is Country in the beach example universe.
Since:
11.5

removeFilterObject

void removeFilterObject(int index)
Remove a filter object from a specific index in this AdvancedCondition object.

Parameters:
index - The position of filter object in the AdvancedCondition tree.
Throws:
java.lang.IndexOutOfBoundsException - When index < 0 || index >= AdvancedCondition.getFilterObjectCount()
Since:
11.5

getResultObjectCount

int getResultObjectCount()
Returns the number of DataSourceObject instances in the result part of the AdvancedCondition.

Returns:
The number of DataSourceObject in the AdvancedCondition tree.
Since:
11.5

getResultObject

DataSourceObject getResultObject(int index)
Returns the DataSourceObject at the specific index in the result part of the AdvancedCondition tree.

Parameters:
index - The position of the result object to be retrieved.
Returns:
The DataSourceObject at position index.
Throws:
java.lang.IndexOutOfBoundsException - When index < 0 || index >= AdvancedCondition.getResultObjectCount()
Since:
11.5

addResultObject

void addResultObject(DataSourceObject dso)
Add a result object to this AdvancedCondition.

Parameters:
dso - A DataSourceObject representing an object in a Business Objects universe. An example of a universe object is Country in the beach example universe.
Since:
11.5

removeResultObject

void removeResultObject(int index)
Remove a result object from this AdvancedCondition.

Parameters:
index - The position of result object to be removed.
Throws:
java.lang.IndexOutOfBoundsException - When index < 0 || index >= getChildCount.
Since:
11.5
See Also:
TreeNode

setConditionOperator

void setConditionOperator(ConditionOperator operator)
Set a ConditionOperator such as EQUAL or NOT_EQUAL in the AdvancedCondition tree.

An example of a ConditionOperator in the club example universe is: when the revenue result in Query1 is greater than any occurrence of Revenue in Query2.

Parameters:
operator - A ConditionOperator instance.
Throws:
java.lang.NullPointerException - If operator is null.
Since:
11.5

getConditionOperator

ConditionOperator getConditionOperator()
Returns the ConditionOperator defined in this AdvancedCondition object.

An example of a ConditionOperator in the club example universe is: when the revenue result in Query1 is greater than any occurrence of Revenue in Query2.

Returns:
A ConditionOperator instance or null if no ConditionOperator has been defined.
Since:
11.5
See Also:
AdvancedCondition.setConditionOperator(ConditionOperator)

setComparisonOperator

void setComparisonOperator(ComparisonOperator operator)
Set a ComparisonOperator such as ANY or ALL in the AdvancedCondition tree.

Parameters:
operator - A ComparaisonOperator instance.
Throws:
FilterConditionException - when the ConditionOperator used is EQUAL or IN_LIST or NOT_IN_LIST and ComparaisonOperator is different from ANY.
Since:
11.5

getComparisonOperator

ComparisonOperator getComparisonOperator()
Returns the ComparisonOperator from the AdvancedCondition tree.

Note: When the ConditionOperator used in an AdvancedCondition is EQUAL or IN_LIST, do not add a ComparisonOperator to the AdvancedCondition as it will have no effect on the result when the Query is run.

Returns:
A ComparisonOperator instance.
Since:
11.5

hasCondition

boolean hasCondition()
Returns true when at least one ConditionContainer has been added to this AdvancedCondition object.

Returns:
Returns true when at least one condition has been set.
Since:
11.5
See Also:
ConditionContainer, LogicalOperator, AdvancedCondition.createCondition(LogicalOperator)

getCondition

ConditionContainer getCondition()
Returns the ConditionContainer set in this AdvancedCondition.

Note: Business Objects recommends calling AdvancedCondition.hasCondition() to validate the presence of a ConditionContainer before calling this method.

Returns:
The ConditionContainer or null when no condition has been applied to this AdvancedCondition.
Since:
11.5

createCondition

ConditionContainer createCondition(LogicalOperator op)
Creates a ConditionContainer for this advanced condition.

Note: if this AdvancedCondition already has a ConditionContainer it is replaced by this new one.

Parameters:
op - A LogicalOperator to be used as a condition.
Returns:
The new ConditionContainer.
Since:
11.5

copyCondition

ConditionContainer copyCondition(ConditionContainer cont)
Makes a copy of cont and adds it to this advanced condition. If this advanced condition has already a condition container, that will be replaced with the new one.

Parameters:
cont - the ConditionContainer to be copied.
Returns:
the new ConditionContainer.
Since:
11.5

removeCondition

void removeCondition()
Deletes the condition part of this AdvancedCondition.

Since:
11.5
See Also:
AdvancedCondition.createCondition(LogicalOperator), AdvancedCondition.copyCondition(ConditionContainer)