To code a selection for a dimension, create the following objects that can be found in the in the oracle.dss.selection
package:
Step
objects to specify selection criteria
SortSpec
object to specify sorting criteria, if sorting is desired
Steps in a selection are ordered sequentially. For this reason, specify the Action
property of a Step
object to control the result of multiple steps.
To apply a selection to a query, invoke the applySelection
method of a Query
object.
You can create the following types of Step objects programmatically:
You can also wrap any step as a FavoriteStep
object that you might want to include in a Selection
object that is to be stored in the BI Beans Catalog.
The following code shows how to create a selection that selects explicitly the members Audio Division, Video Division, and Accounting Division for the PRODUCT dimension.
//strProductDim is the unique identifier of the PRODUCT dimension. //strStandardHier is the unique identifier of the STANDARD product hierarchy. Selection sel = new Selection (strProductDim); sel.setHierarchy (strStandardHier); MemberStep mStep = new MemberStep (strProductDim); mStep.addMember ("AUDIODIV"); mStep.addMember ("VIDEODIV"); mStep.addMember ("ACCDIV"); sel.addStep (mStep);
Understanding a Selection Object
Understanding a Series of Steps