com.businessobjects.rebean.wi
Interface ConditionContainer

All Superinterfaces:
FilterConditionContainer, FilterConditionNode, TreeNode

public interface ConditionContainer
extends FilterConditionContainer

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

A FilterConditionContainer interface is used to define query conditions. If a ConditionContainer has a parent (TreeNode), then that parent is always another ConditionContainer. The root ConditionContainer can only be attached to a Query.

See Also:
Query

Method Summary
 AdvancedCondition copyAdvancedCondition(AdvancedCondition cond)
          Makes a copy of cond as a child node of this ConditionContainer.
 ConditionContainer copyConditionContainer(ConditionContainer cont)
          Makes a copy of cont and makes that a child of this condition container.
 ConditionObject copyConditionObject(ConditionObject obj)
          Makes a copy of obj and makes that a child of this condition container.
 RankCondition copyRankCondition(RankCondition rk)
          Creates a copy of the RankCondition passed as a parameter, which is set as a child of the current ConditionContainer.
 AdvancedCondition createAdvancedCondition(DataSourceObject[] filterObject, ConditionOperator condOperator, ComparisonOperator compOperator, DataSourceObject[] resultObject)
          Create a new AdvancedCondition added to the current ConditionContainer.
 ConditionObject createConditionObject(DataSourceObject obj)
          Creates and adds a new condition object to this container.
 RankCondition createRankCondition(Podium op, int size, DataSourceObject filtered, DataSourceObject basedOn)
          Create a new RankCondition to be added add to the container.
 FilterConditionNode getNode(java.lang.String ID)
          Returns a FilterConditionNode identified by its unique ID.
 
Methods inherited from interface com.businessobjects.rebean.wi.FilterConditionContainer
checkValid, createFilterConditionContainer, getOperator, setOperator
 
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

createConditionObject

ConditionObject createConditionObject(DataSourceObject obj)
Creates and adds a new condition object to this container.

Parameters:
obj - The DataSourceObject to base the new condition object on.
Returns:
The new condition object.
Throws:
java.lang.NullPointerException - When obj is null.
java.lang.IllegalArgumentException - When obj is a class or a hierarchy.
UnsupportedFeatureException - if DataProviderFeature.EDIT_QUERY isn't granted.

copyConditionObject

ConditionObject copyConditionObject(ConditionObject obj)
Makes a copy of obj and makes that a child of this condition container. If obj already is a child of this container, the copy will still be added.

Parameters:
obj - The object to use for this container.
Returns:
The new condition container (the copy of obj).
Throws:
UnsupportedFeatureException - if DataProviderFeature.EDIT_QUERY isn't granted.

copyConditionContainer

ConditionContainer copyConditionContainer(ConditionContainer cont)
Makes a copy of cont and makes that a child of this condition container. If cont already is a child of this container, the copy will still be added.

Parameters:
cont - The container to use for this container.
Returns:
The new condition container (the copy of cont).
Throws:
UnsupportedFeatureException - if DataProviderFeature.EDIT_QUERY isn't granted.

copyAdvancedCondition

AdvancedCondition copyAdvancedCondition(AdvancedCondition cond)
Makes a copy of cond as a child node of this ConditionContainer.

Even if this ConditionContainer object already has cond as a child node, a second child node containing cond is added to the ConditionContainer tree.

Parameters:
cond - The AdvancedCondition to add added to the ConditionContainer tree.
Returns:
The AdvancedCondition that has been added to the ConditionContainer tree.
Throws:
java.lang.NullPointerException - when cond is null
UnsupportedFeatureException - if QueryFeature.CREATE_ADVANCED_CONDITION isn't supported.
UnsupportedFeatureException - if DataProviderFeature.EDIT_QUERY isn't granted.

createAdvancedCondition

AdvancedCondition createAdvancedCondition(DataSourceObject[] filterObject,
                                          ConditionOperator condOperator,
                                          ComparisonOperator compOperator,
                                          DataSourceObject[] resultObject)
Create a new AdvancedCondition added to the current ConditionContainer. An AdvancedCondition is a special query condition such as [Country] equals to any occurrence of [Country of Origin] or [Country] is different from all occurrence of [Country of Origin].

Parameters:
filterObject - An array of DataSourceObject such as:
  • Country
  • Resort
  • ...
condOperator - A ConditionOperator instance such as:
  • EQUAL
  • IN_LIST
  • ...
compOperator - A ComparisonOperator instance such as:
  • ANY
  • ALL
  • ...
compOperator must be null when condOperator is IN_LIST or NOT_IN_LIST. If the condOperator is: EQUAL ComparisonOperator should be ComparisonOperator.ANY. For other values of condOperator, compOperator can be ComparisonOperator.ANY or ComparisonOperator.ALL.
resultObject - An array of DataSourceObject such as:
  • Sales
  • Revenue
  • ...
Returns:
The new AdvancedCondition.
Throws:
java.lang.NullPointerException - When filterObject, resultObject or condOperator.
java.lang.IllegalArgumentException - When filterObject is empty.
java.lang.UnsupportedOperationException - when AdvancedCondion isn't supported by data source DataSource.isAdvancedConditionSupported().
FilterConditionException - when uncompatibility between value of ConditionOperator and value of ComparisonOperator.
UnsupportedFeatureException - if DataProviderFeature.EDIT_QUERY isn't granted.
Since:
11.5

createRankCondition

RankCondition createRankCondition(Podium op,
                                  int size,
                                  DataSourceObject filtered,
                                  DataSourceObject basedOn)
Create a new RankCondition to be added add to the container.

Parameters:
op - a Podium to define whether the Podium.TOP or Podium.BOTTOM ranked values are returned. For example, set to Podium.TOP to return the top 3 Sales Per Revenue.
size - The number of ranked values to be returned as result of Query. If you want the size defined when running query, you should call RankCondition.setPromptForSize(String) on new RankCondition instance. For example, set to 3 to return the Top 3 Sales Per Revenue.
filtered - The dimension or detail object to be filtered on. For example, Sale in 'Top 3 Sales Per Revenue.
basedOn - The measure object the ranking is based on. For example, Revenue in 'Top 3 Sales Per Revenue.
Returns:
The new rank condition.
Throws:
java.lang.NullPointerException - When op, filtered or basedOn is null.
java.lang.IllegalArgumentException - When size < 0.
FilterConditionException - while op &eq; TOP_PERCENTAGE/BOTTOM_PERCENTAGE and size > 100.
java.lang.IllegalArgumentException - When the filtered DataSourceObject isn't of type ObjectQualification.DIMENSION, ObjectQualification.DETAIL or ObjectQualification.MEASURE.
java.lang.IllegalArgumentException - When the basedOn DataSourceObject isn't a of type ObjectQualification.MEASURE.
java.lang.UnsupportedOperationException - when RankCondition isn't supported by data source DataSource.isRankConditionSupported()
UnsupportedFeatureException - if DataProviderFeature.EDIT_QUERY isn't granted.
Since:
11.5
See Also:
ObjectQualification

copyRankCondition

RankCondition copyRankCondition(RankCondition rk)
Creates a copy of the RankCondition passed as a parameter, which is set as a child of the current ConditionContainer.

If rk is already a child of this container, a second copy will be added.

Parameters:
rk - The RankCondition to be copied.
Returns:
A copy of rk.
Throws:
java.lang.NullPointerException - When rk is null.
UnsupportedFeatureException - if QueryFeature.CREATE_RANK_CONDITION isn't supported.
Since:
11.5

getNode

FilterConditionNode getNode(java.lang.String ID)
Returns a FilterConditionNode identified by its unique ID.

A FilterConditionNode is a specialization of TreeNode for filters and conditions on a Query.

Parameters:
ID - The unique identifier for a FilterConditionNode.
Returns:
The FilterConditionNode.
Since:
11.5
See Also:
TreeNode, Query