com.businessobjects.rebean.wi
Interface Scope


public interface Scope

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

Represents the scope of analysis of a Query. This is used when drilling in a report; the scope level determines how many data will be ready for drill without having to modify the query to drill down ("drill out of scope").

See Also:
Query.getScope()

Method Summary
 void addScopeObject(DataSourceObject obj)
           Adds an object to the scope of analysis.
 ScopeLevel getScopeLevel()
          Gets the scope level.
 DataSourceObject getScopeObject(int index)
          Gets an object in the scope by index.
 int getScopeObjectCount()
          Gets the amount of objects in the scope.
 void removeAllScopeObjects()
          Removes any objects from the scope.
 void removeScopeObject(DataSourceObject obj)
          Removes an object from this scope.
 void setScopeLevel(ScopeLevel level)
          Sets the scope level.
 

Method Detail

getScopeLevel

ScopeLevel getScopeLevel()
Gets the scope level.

Returns:
the scope level

setScopeLevel

void setScopeLevel(ScopeLevel level)
Sets the scope level. When level is not ScopeLevel.CUSTOM, the objects in this scope object will depend on level.

Parameters:
level - the new level of scope of analysis

addScopeObject

void addScopeObject(DataSourceObject obj)

Adds an object to the scope of analysis. After calling this method, the scope level (Scope.getScopeLevel()) will be automatically updated.

Only objects that appear in one of the hierarchies (DataSource.getHierarchies()) can be added to scope; no error is generated for other objects.

For a description of the behaviour when obj is a class or a hierarchy, see Query.addResultObject(DataSourceObject).

Note that scope objects will also be present in the ReportDictionary, but they will not be affected by any conditions on the query.

Parameters:
obj - The object to add. When obj is already defined in the query, it will remain there and will not be added to scope.
Throws:
java.lang.IllegalArgumentException - when obj is a predefined condition
java.lang.NullPointerException - when obj is null

getScopeObject

DataSourceObject getScopeObject(int index)
Gets an object in the scope by index.

Parameters:
index - the index (0 based)
Returns:
the DataSourceObject at index
Throws:
java.lang.ArrayIndexOutOfBoundsException - when index is invalid

removeScopeObject

void removeScopeObject(DataSourceObject obj)
Removes an object from this scope. After calling this method, the scope level (Scope.getScopeLevel()) will be automatically updated.

Parameters:
obj - The DataSourceObject to remove. When obj is not in the scope or when it is null, no error is generated.

getScopeObjectCount

int getScopeObjectCount()
Gets the amount of objects in the scope.

Returns:
the amount of objects

removeAllScopeObjects

void removeAllScopeObjects()
Removes any objects from the scope. After calling this method, the scope level (Scope.getScopeLevel()) will be automatically updated.