|
SAP BI Java SDK | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The OLAP Command Processor, which provides a simplified command API to
dynamically change the status of an OLAP query. An OLAP query is created
with the
IBIMainFactory.createQuery(Cube)
method. This query can be executed "as-is" in its default state,
however in this state it is very unspecific.
If nothing additional is specified, in its initial state a query selects
all dimensions on the slicer axis without any restrictions, and the measure
dimension is assigned with all its measures selected to the columns axis.
This query selects a single cell per measure, for which all dimensions are
filtered to their default members, which are the ALL MEMBERS in case of ODBO.
The methods of IBICommandProcessor
allow you
to control many details of a query, such as layout and filters, dynamically
at runtime without rebuilding a query from scratch. The implementation of
the methods manipulate the more complex low-level query object model.
You can therefore think of IBICommandProcessor
as a set of
macros that simplify the manipulation of the query model object tree.
Field Summary | |
static int |
COLUMNS_AXIS_INDEX
The constant which represents the columns axis and can be used for the moveDimension command. |
static int |
ROWS_AXIS_INDEX
The constant which represents the rows axis and can be used for the moveDimension command. |
static int |
SLICER_AXIS_INDEX
The constant which represents the slicer axis and can be used for the moveDimension command. |
Method Summary | |
IBICalculatedMember |
addCalculatedMember(org.omg.cwm.analysis.olap.Dimension dimension,
IBIInputReference formula,
int solveOrder)
Creates an IBICalculatedMember for the specified dimension
based on the specified formula and adds it to the member set of the
dimension. |
IBIDimensionMembers |
addDimensionMembers(org.omg.cwm.analysis.olap.Dimension dimension)
Adds all members of the specified dimension to the dimensions member set. |
IBILevelMembers |
addLevelMembers(org.omg.cwm.analysis.olap.Level level)
Adds all members of the specified level to the dimensions member set. |
void |
addMember(IBIMember member)
Adds a single member to the member set of the dimension to which the member belongs. |
void |
addMemberList(IBIMemberList memberList)
Adds a member list to the member set of the dimension to which the members of the member list belong. |
void |
addRange(IBIRange memberRange)
Adds a member range to the member set of the dimension to which the members of the member range belong. |
void |
addSapVariableValue(IBISapMemberVariable variable,
IBISapRangeSignType sign,
IBIRelationalOperatorType option,
IBIMember low,
IBIMember high)
Adds a variable value range specification for an SAP variable of type IBISapMemberVariable with selection type
IBISapVariableSelectionTypeEnum.COMPLEX . |
void |
addSapVariableValue(IBISapNumericVariable variable,
IBISapRangeSignType sign,
IBIRelationalOperatorType option,
Object low,
Object high)
Adds a variable value range specification for an SAP variable of type IBISapNumericVariable with selection type
IBISapVariableSelectionTypeEnum.COMPLEX . |
void |
clearMemberSet(org.omg.cwm.analysis.olap.Dimension dimension)
Deletes all IBIMemberSetExpressions which have been added to
the IBIMemberSet of the specified dimension.
|
void |
clearSapVariableValue(IBISapVariable variable)
Clears the variable specification of the specified variable. |
IBIRankingFilter |
createBottomCountFilter(org.omg.cwm.analysis.olap.Dimension dimension,
int bottomValue,
IBIMember measure)
Creates a new ranking filter and applies it to the specified dimension. |
IBIRankingFilter |
createBottomPercentFilter(org.omg.cwm.analysis.olap.Dimension dimension,
double bottomPercentage,
IBIMember measure)
Creates a new ranking filter and applies it to the specified dimension. |
IBIRankingFilter |
createBottomSumFilter(org.omg.cwm.analysis.olap.Dimension dimension,
double threshold,
IBIMember measure)
Creates a new ranking filter and applies it to the specified dimension. |
IBIConditionBasedFilter |
createSearchFilterBetween(org.omg.cwm.analysis.olap.Dimension dimension,
double lowerLimit,
double upperLimit,
IBIMember measure)
Creates a new search filter and applies it to the specified dimension. |
IBIConditionBasedFilter |
createSearchFilterEqual(org.omg.cwm.analysis.olap.Dimension dimension,
double searchValue,
IBIMember measure)
Creates a new search filter and applies it to the specified dimension. |
IBIConditionBasedFilter |
createSearchFilterGreaterThan(org.omg.cwm.analysis.olap.Dimension dimension,
double lowerLimit,
IBIMember measure)
Creates a new search filter and applies it to the specified dimension. |
IBIConditionBasedFilter |
createSearchFilterGreaterThanEqual(org.omg.cwm.analysis.olap.Dimension dimension,
double lowerLimit,
IBIMember measure)
Creates a new search filter and applies it to the specified dimension. |
IBIConditionBasedFilter |
createSearchFilterLessThan(org.omg.cwm.analysis.olap.Dimension dimension,
double upperLimit,
IBIMember measure)
Creates a new search filter and applies it to the specified dimension. |
IBIConditionBasedFilter |
createSearchFilterLessThanEqual(org.omg.cwm.analysis.olap.Dimension dimension,
double upperLimit,
IBIMember measure)
Creates a new search filter and applies it to the specified dimension. |
IBIConditionBasedFilter |
createSearchFilterNotEqual(org.omg.cwm.analysis.olap.Dimension dimension,
double searchValue,
IBIMember measure)
Creates a new search filter and applies it to the specified dimension. |
IBIRankingFilter |
createTopCountFilter(org.omg.cwm.analysis.olap.Dimension dimension,
int topValue,
IBIMember measure)
Creates a new ranking filter and applies it to the specified dimension. |
IBIRankingFilter |
createTopPercentFilter(org.omg.cwm.analysis.olap.Dimension dimension,
double topPercentage,
IBIMember measure)
Creates a new ranking filter and applies it to the specified dimension. |
IBIRankingFilter |
createTopSumFilter(org.omg.cwm.analysis.olap.Dimension dimension,
double threshold,
IBIMember measure)
Creates a new ranking filter and applies it to the specified dimension. |
void |
deselectAttribute(org.omg.cwm.analysis.olap.Dimension dimension,
org.omg.cwm.objectmodel.core.Attribute attribute)
Deselects a dimension attribute of a specific dimension to be requested by the query from the data source to which the query is connected. |
IBIMemberDrill |
drillDownMember(IBIMember member)
Adds the children of the specified member to the set. |
IBITupleDrill |
drillDownTuple(IBITuple tuple,
IBIMember member)
Adds the children of the specified member of a tuple to the set. |
IBIMemberDrill |
drillUpMember(IBIMember member)
Removes all descendants of the specified member from the member set. |
IBITupleDrill |
drillUpTuple(IBITuple tuple,
IBIMember member)
Removes all descendants of the specified member of a tuple from the member set. |
IBIAxisDimension |
getAxisDimension(org.omg.cwm.analysis.olap.Dimension dimension)
Returns the axis dimension of the query which references the specified dimension. |
List |
getMemberSetExpression(org.omg.cwm.analysis.olap.Dimension dimension)
Returns an interface to the collection of IBIMemberSetExpression for this dimension. |
IBIQueryFactory |
getQueryFactory()
Retrieves the IBIQueryFactory which can be used to create
all different kinds of objects of the query model. |
List |
getSapVariables()
Returns an unmodifiable list of all variables of this query. |
IBISetExpression |
getSetExpressionById(String id)
Retrieves set expressions by their IDs. |
IBISort |
getSortOrder(org.omg.cwm.analysis.olap.Dimension dimension)
Returns an interface to access the sort properties of this dimension. |
List |
getTupleSetExpression(int axisIndex)
Returns an interface to the collection of IBITupleSetExpression for this axis. |
boolean |
isSuppressingEmptyColumns()
Returns the current setting for the columns axis of the query, whether empty tuples are eliminated or not. |
boolean |
isSuppressingEmptyRows()
Returns the current setting for the rows axis of the query, whether empty tuples are suppressed or not. |
void |
moveDimension(org.omg.cwm.analysis.olap.Dimension dimension,
int axisIndex,
int positionIndex)
Populates axes with dimensions. |
void |
moveDimensionToColumns(org.omg.cwm.analysis.olap.Dimension dimension)
Populates axes with dimensions, using a "columns" shortcut from the moveDimension method with a specific set of parameters. |
void |
moveDimensionToRows(org.omg.cwm.analysis.olap.Dimension dimension)
Populates axes with dimensions, using a "rows" shortcut from the moveDimension method with a specific set of parameters. |
void |
moveDimensionToSlicer(org.omg.cwm.analysis.olap.Dimension dimension)
Populates axes with dimensions, using a "slicer" shortcut from the moveDimension method with a specific set of parameters. |
IBICompositeMemberSetExpression |
moveMemberSetExpressionsToComposite(org.omg.cwm.analysis.olap.Dimension dimension,
IBIJoinType joinType,
boolean addCompositeToMemberSet)
Creates and returns an interface to an IBICompositeMemberSetExpression . |
void |
removeSetExpression(IBISetExpression setExpression)
Removes the specified IBISetExpression setExpression from
the IBIMemberSet or IBITupleSet .
|
void |
revealEmptyColumns()
Reveals empty tuples on the columns axis. |
void |
revealEmptyRows()
Reveals empty tuples on the rows axis. |
void |
selectAttribute(org.omg.cwm.analysis.olap.Dimension dimension,
org.omg.cwm.objectmodel.core.Attribute attribute)
Selects a dimension attribute of a specific dimension to be requested by the query from the data source to which the query is connected. |
void |
setInitialState()
Sets the query back to its initial state, where the measures dimension is moved to the columns axis and all measures are selected. |
IBISort |
setOrderByAttribute(org.omg.cwm.analysis.olap.Dimension dimension,
IBISortDirectionType sortDirection,
boolean breakingHierarchy,
org.omg.cwm.objectmodel.core.Attribute attribute)
Sets the order of the specified dimension to be ordered by an attribute. |
IBISort |
setOrderByMeasureValue(org.omg.cwm.analysis.olap.Dimension dimension,
IBISortDirectionType sortDirection,
boolean breakingHierarchy,
IBIMember measure)
Sets the order of the specified dimension to be ordered by the given measure. |
void |
setSapVariableValue(IBISapHierarchyVariable variable,
org.omg.cwm.analysis.olap.Hierarchy hierarchy)
Sets a variable value for an SAP variable of type IBISapHierarchyVariable with selection type
IBISapVariableSelectionTypeEnum.SINGLEVALUE . |
void |
setSapVariableValue(IBISapMemberVariable variable,
IBIMember member)
Sets a variable value for an SAP variable of type IBISapMemberVariable with selection type
IBISapVariableSelectionTypeEnum.SINGLEVALUE . |
void |
setSapVariableValue(IBISapMemberVariable variable,
IBIMember low,
IBIMember high)
Sets a variable value range for an SAP variable of type IBISapMemberVariable with selection type
IBISapVariableSelectionTypeEnum.INTERVAL . |
void |
setSapVariableValue(IBISapNumericVariable variable,
Object value)
Sets a variable value for an SAP variable of type IBISapNumericVariable with selection type
IBISapVariableSelectionTypeEnum.SINGLEVALUE . |
void |
setSapVariableValue(IBISapNumericVariable variable,
Object low,
Object high)
Sets a variable value range for an SAP variable of type IBISapNumericVariable with selection type
IBISapVariableSelectionTypeEnum.INTERVAL . |
void |
suppressEmptyColumns()
Suppresses all empty tuples on the columns axis from the result set of the query. |
void |
suppressEmptyRows()
Suppresses all empty tuples on the rows axis from the result set of the query. |
void |
swapAxes()
Exchanges all dimensions on the columns axis with the dimensions on the rows axis, and vice versa. |
IBIMemberDrill |
zoomInMember(IBIMember member)
Clears the member set of the specified dimension and adds the children of the given member. |
IBITupleDrill |
zoomInTuple(IBITuple tuple,
IBIMember member)
Clears the member set of the tuple members dimensions and adds the children of the given member of a tuple. |
IBIMemberDrill |
zoomOutMember(IBIMember member)
Clears the member set of the specified dimension and adds the parent of the given member and its siblings to the set. |
IBITupleDrill |
zoomOutTuple(IBITuple tuple,
IBIMember member)
Clears the member set of the tuple members dimensions and adds the parent of the given member of a tuple and its siblings to the set. |
Field Detail |
public static final int SLICER_AXIS_INDEX
moveDimension
command.public static final int COLUMNS_AXIS_INDEX
moveDimension
command.public static final int ROWS_AXIS_INDEX
moveDimension
command.Method Detail |
public void moveDimension(org.omg.cwm.analysis.olap.Dimension dimension, int axisIndex, int positionIndex) throws BIOlapQueryException
axisIndex
, which defines the target axis, is the same as
the axis where the dimension currently is. positionIndex
is
the index position the dimension will hold after the move. All dimensions
with a position index greater or equal to the target index are moved to
the right.
moveDimensionToRows(Dimension)
and
moveDimensionToColumns(Dimension)
,
which do not require the axisIndex
and positionIndex
parameters.dimension
- dimension to be movedaxisIndex
- axis ordinal of the target axispositionIndex
- position index of the target positionBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic void moveDimensionToColumns(org.omg.cwm.analysis.olap.Dimension dimension) throws BIOlapQueryException
dimension
- dimension to be movedBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic void moveDimensionToRows(org.omg.cwm.analysis.olap.Dimension dimension) throws BIOlapQueryException
dimension
- dimension to be movedBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic void moveDimensionToSlicer(org.omg.cwm.analysis.olap.Dimension dimension) throws BIOlapQueryException
dimension
- dimension to be movedBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic IBIAxisDimension getAxisDimension(org.omg.cwm.analysis.olap.Dimension dimension) throws BIOlapQueryException
dimension
- dimension which is referenced by the requested
axis dimension of the queryBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic IBIQueryFactory getQueryFactory()
IBIQueryFactory
which can be used to create
all different kinds of objects of the query model.public void swapAxes()
suppressingEmptyTuples
of interface
IBIAxis
and distinct
, hierarchized
of the interface IBITupleSet
of the axis.public IBIRankingFilter createTopCountFilter(org.omg.cwm.analysis.olap.Dimension dimension, int topValue, IBIMember measure) throws BIOlapQueryException
IBIRankingFilter
interface to the created filter instance.dimension
- dimension to which the ranking filter is to be appliedtopValue
- number of members to be isolatedmeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is based, or if topValue is negativepublic IBIRankingFilter createBottomCountFilter(org.omg.cwm.analysis.olap.Dimension dimension, int bottomValue, IBIMember measure) throws BIOlapQueryException
IBIRankingFilter
interface to the created filter instance.dimension
- dimension to which the ranking filter is to be appliedbottomValue
- number of members to be isolatedmeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is based, or if bottomValue is negativepublic IBIRankingFilter createTopPercentFilter(org.omg.cwm.analysis.olap.Dimension dimension, double topPercentage, IBIMember measure) throws BIOlapQueryException
IBIRankingFilter
interface to the created filter instance.
The filter isolates at least as many members from the dimension so that
it matches as a fraction at least the specified percentage.dimension
- dimension to which the ranking filter is to be
appliedtopPercentage
- percentage of members to be isolatedmeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is based, or if topPercentage is negativepublic IBIRankingFilter createBottomPercentFilter(org.omg.cwm.analysis.olap.Dimension dimension, double bottomPercentage, IBIMember measure) throws BIOlapQueryException
IBIRankingFilter
interface to the created filter instance.
The filter isolates at least as many members from the dimension so that
it matches as a fraction at least the specified percentage.dimension
- dimension to which the ranking filter is to be
appliedbottomPercentage
- percentage of members to be isolatedmeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is based, or if bottomPercentage is negativepublic IBIRankingFilter createTopSumFilter(org.omg.cwm.analysis.olap.Dimension dimension, double threshold, IBIMember measure) throws BIOlapQueryException
IBIRankingFilter
interface to the
created filter instance.dimension
- dimension to which the ranking filter is to be
appliedthreshold
- the value the sum of isolated members must at
least matchmeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic IBIRankingFilter createBottomSumFilter(org.omg.cwm.analysis.olap.Dimension dimension, double threshold, IBIMember measure) throws BIOlapQueryException
IBIRankingFilter
interface to the
created filter instance.dimension
- dimension to which the ranking filter is to be
appliedthreshold
- the value the sum of isolated members may at
the maximum matchmeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic IBIConditionBasedFilter createSearchFilterGreaterThan(org.omg.cwm.analysis.olap.Dimension dimension, double lowerLimit, IBIMember measure) throws BIOlapQueryException
lowerLimit
.
The method returns an IBIConditionBasedFilter
interface
to the created filter instance.dimension
- dimension to which the ranking filter is to be
appliedlowerLimit
- the value members must be greater than to be
isolated by the filtermeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic IBIConditionBasedFilter createSearchFilterLessThan(org.omg.cwm.analysis.olap.Dimension dimension, double upperLimit, IBIMember measure) throws BIOlapQueryException
upperLimit
.
The method returns an IBIConditionBasedFilter
interface
to the created filter instance.dimension
- dimension to which the ranking filter is to be
appliedupperLimit
- the value members must be less than to be
isolated by the filtermeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic IBIConditionBasedFilter createSearchFilterGreaterThanEqual(org.omg.cwm.analysis.olap.Dimension dimension, double lowerLimit, IBIMember measure) throws BIOlapQueryException
lowerLimit
.
The method returns an IBIConditionBasedFilter
interface
to the created filter instance.dimension
- dimension to which the ranking filter is to be
appliedlowerLimit
- the value to which members must be greater than or
equal to be isolated by the filtermeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic IBIConditionBasedFilter createSearchFilterLessThanEqual(org.omg.cwm.analysis.olap.Dimension dimension, double upperLimit, IBIMember measure) throws BIOlapQueryException
upperLimit
.
The method returns an IBIConditionBasedFilter
interface
to the created filter instance.dimension
- dimension to which the ranking filter is to be
appliedupperLimit
- the value to which members must be less than or equal
to be isolated by the filtermeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic IBIConditionBasedFilter createSearchFilterBetween(org.omg.cwm.analysis.olap.Dimension dimension, double lowerLimit, double upperLimit, IBIMember measure) throws BIOlapQueryException
lowerLimit
and
the upperLimit
.
The method returns an IBIConditionBasedFilter
interface
to the created filter instance.dimension
- dimension to which the ranking filter is to be
appliedlowerLimit
- the value to which members must be greater than
or equal to be isolated by the filterupperLimit
- the value to which members must be less than or equal
to be isolated by the filtermeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic IBIConditionBasedFilter createSearchFilterEqual(org.omg.cwm.analysis.olap.Dimension dimension, double searchValue, IBIMember measure) throws BIOlapQueryException
searchValue
.
The method returns an IBIConditionBasedFilter
interface
to the created filter instance.dimension
- dimension to which the ranking filter is to be
appliedsearchValue
- the value to which members must be equal to be
isolated by the filtermeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic IBIConditionBasedFilter createSearchFilterNotEqual(org.omg.cwm.analysis.olap.Dimension dimension, double searchValue, IBIMember measure) throws BIOlapQueryException
searchValue
.
The method returns an IBIConditionBasedFilter
interface
to the created filter instance.dimension
- dimension to which the ranking filter is to be
appliedsearchValue
- the value to which members must be not equal to be
isolated by the filtermeasure
- measure on which the ranking is basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is basedpublic void removeSetExpression(IBISetExpression setExpression) throws BIOlapQueryException
IBISetExpression
setExpression from
the IBIMemberSet
or IBITupleSet
.
With this, you can delete previously created filter, tuple/member
selection or drill operations. The method allows to delete
everything which is of type IBISetExpression
from the containing list.setExpression
- the IBISetExpression
which is
to be removedBIOlapQueryException
- if setExpression is not referenced
by the querypublic List getMemberSetExpression(org.omg.cwm.analysis.olap.Dimension dimension) throws BIOlapQueryException
IBIMemberSetExpression
for this dimension.dimension
- dimension for which the collection of
IBIMemberSetExpression
is requestedIBIMemberSetExpression
for this dimensionBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic List getTupleSetExpression(int axisIndex) throws BIOlapQueryException
IBITupleSetExpression
for this axis.axisIndex
- axis ordinal of the target axisIBITupleSetExpression
for this axisBIOlapQueryException
- if axis does not exist for this querypublic IBICompositeMemberSetExpression moveMemberSetExpressionsToComposite(org.omg.cwm.analysis.olap.Dimension dimension, IBIJoinType joinType, boolean addCompositeToMemberSet) throws BIOlapQueryException
IBICompositeMemberSetExpression
. The member set expressions
of the dimensions member set are moved to the composite. The composite is
then optionally added to the dimensions member set.dimension
- dimension, the member set expressions of which are moved
to the compositejoinType
- join type which specifies how the member set expressions
of the composite are joined with previously defined member set expressions.
If the composite is added to the member set, only the join type INITIAL
makes sense.addCompositeToMemberSet
- flag which specifies whether or not the
newly created IBICompositeMemberSetExpression
is added
to the dimensions member setIBICompositeMemberSetExpression
BIOlapQueryException
- public IBISort getSortOrder(org.omg.cwm.analysis.olap.Dimension dimension) throws BIOlapQueryException
dimension
- dimension to which the ranking filter is to be appliedBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic IBISort setOrderByMeasureValue(org.omg.cwm.analysis.olap.Dimension dimension, IBISortDirectionType sortDirection, boolean breakingHierarchy, IBIMember measure) throws BIOlapQueryException
sortDirection
and breakingHierarchy
.dimension
- dimension for which the order properties are setsortDirection
- specifies ascending or descending orderbreakingHierarchy
- if true
, the hierarchical sort
order of the members is retainedmeasure
- measure on which the sort should be basedBIOlapQueryException
- if dimension or measure is not referenced
by the cube upon which the query is based, or if sortDirection is nullpublic IBISort setOrderByAttribute(org.omg.cwm.analysis.olap.Dimension dimension, IBISortDirectionType sortDirection, boolean breakingHierarchy, org.omg.cwm.objectmodel.core.Attribute attribute) throws BIOlapQueryException
sortDirection
and breakingHierarchy
.dimension
- dimension for which the order properties are setsortDirection
- specifies ascending or descending orderbreakingHierarchy
- if set to true the hierarchical sort order of
the members is retainedattribute
- attribute on which the sort should be basedBIOlapQueryException
- if dimension or attribute is not referenced
by the cube upon which the query is based, or if sortDirection is nullpublic void clearMemberSet(org.omg.cwm.analysis.olap.Dimension dimension) throws BIOlapQueryException
IBIMemberSetExpressions
which have been added to
the IBIMemberSet
of the specified dimension.
Member selections on a dimension are made through the
IBIMemberSet
interface, exposed by an AxisDimension.
When a query is created by the method
IBIMainFactory.createQuery(Cube)
of the IBIMainFactory
interface,
the member sets of all dimensions are empty.
If there are no IBIMemberSetExpressions
defined for a member
set of a dimension, implicitly all dimension members are selected.
To make a query more specific or restrictive, members or sets of
members can be added to the member set.dimension
- dimension for which the member set should be clearedBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic void addMember(IBIMember member) throws BIOlapQueryException
member
- member which is added to the member setBIOlapQueryException
- if member is not referenced by the cube
upon which the query is basedpublic IBICalculatedMember addCalculatedMember(org.omg.cwm.analysis.olap.Dimension dimension, IBIInputReference formula, int solveOrder) throws BIOlapQueryException
IBICalculatedMember
for the specified dimension
based on the specified formula and adds it to the member set of the
dimension.dimension
- dimension for which the calculated member is created.
The calculated member is added to the dimensions member set.formula
- formula which acts as definition for the calculated membersolveOrder
- integer value which specifies the calculated member's
position in the calculation order of all calculated members of this queryBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is based or the formula is nullpublic void addMemberList(IBIMemberList memberList) throws BIOlapQueryException
memberList
- member list which is added to the member setBIOlapQueryException
- if the members of the memberList are not
referenced by the cube upon which the query is based, or if it contains
members of different dimensionspublic void addRange(IBIRange memberRange) throws BIOlapQueryException
memberRange
- member range which is added to the member setBIOlapQueryException
- if the members of the member range are not
referenced by the cube upon which the query is based, or if it contains
members of different dimensionspublic IBIDimensionMembers addDimensionMembers(org.omg.cwm.analysis.olap.Dimension dimension) throws BIOlapQueryException
dimension
- dimension of which all members are added to the
dimensions member setIBIDimensionMembers
objectBIOlapQueryException
- if dimension is not referenced by the cube
upon which the query is basedpublic IBILevelMembers addLevelMembers(org.omg.cwm.analysis.olap.Level level) throws BIOlapQueryException
Adds all members of the specified level to the dimensions member set. In MDX terms, it adds a set value expression to the dimension of the type <level>.MEMBERS.
About member selection based on level:
Many hierarchies have at least two levels, the first of which is the ALL
level. The ALL level usually contains just one member, the ALL member,
which represents the aggregated values of all members.
It's important to note that it is often not meaningful to return the ALL member in a result set, but rather to return results based on a specific level, beginning with the second level, which begins the set of "real" members. Consider the hierarchy diagram below:
This is a geography hierarchy, with three levels shown:
If you create a query that returns the top five countries based on sales without restricting to a specific level, the first result returned would be "All Countries," because the highest sales would be the total of all sales values across the hierarchy - the ALL member. The second two results would be "Europe" and "America." Instead, you would want to create a query based on a specific level - the Country level.
See the following source code snippet for an example of using
addLevelMembers
to select the members of the right
level for this query:
Level countryLevel = olap.
getObjectFinder
().
findLevelFirst
(geographyHierarchy, "Country");
commandProcessor.addLevelMembers
(countryLevel);
commandProcessor.createTopCountFilter
(geographyDimension, 5, salesMeasure);
level
- level of which all members are added to the
levels dimensions member setIBILevelMembers
objectBIOlapQueryException
- if level is not referenced by the cube
upon which the query is basedpublic IBIMemberDrill drillDownMember(IBIMember member) throws BIOlapQueryException
zoomIn
),
the method retains the parent member.
Hierarchy structure: [All countries] [USA] [Germany] [France] Initial state: [All countries] drillDown on [All countries] returns [All countries] [USA] [Germany] [France]
member
- the member which is drilled onBIOlapQueryException
- if member is not referenced by the cube
upon which the query is basedpublic IBIMemberDrill drillUpMember(IBIMember member) throws BIOlapQueryException
Initial state: [All regions] [USA] [Germany] [North] [South] [East] [West] [France] drillUp on [South] returns [All countries] [USA] [Germany] [France]
member
- the member which is drilled onBIOlapQueryException
- if member is not referenced by the cube
upon which the query is basedpublic IBIMemberDrill zoomInMember(IBIMember member) throws BIOlapQueryException
drillDownMember
), the method does not retain the
parent member.
Hierarchy structure: [All countries] [USA] [Germany] [France] Initial state: [All countries] zoomIn on [All countries] returns [USA] [Germany] [France]
member
- the member which is zoomed in uponBIOlapQueryException
- if member is not referenced by the cube
upon which the query is basedpublic IBIMemberDrill zoomOutMember(IBIMember member) throws BIOlapQueryException
Hierarchy structure: [All countries] [USA] [Germany] [France] Initial state: [All countries] zoomOut on [France] returns [All countries]
member
- the member which is zoomed out uponBIOlapQueryException
- if member is not referenced by the cube
upon which the query is basedpublic IBITupleDrill drillDownTuple(IBITuple tuple, IBIMember member) throws BIOlapQueryException
zoomIn
),
the method retains the parent member.
In order to execute a drill down on a tuple member, the existing query has
to be executed and transformed into a pure specification of tuples for
all axes. All existing IBIMemberSet
specifications of all
dimensions are cleared and transformed into the according
IBITupleSet
specifications for the existing axes.
Hierarchy structure: [All countries] [USA] [Germany] [France] Initial state: ([Beer],[All countries]) ([Wine],[All countries]) drillDown on [All countries] of tuple ([Wine],[All countries]) returns ([Beer],[All countries]) ([Wine],[All countries]) [USA] [Germany] [France]
tuple
- tuple which contains the member which is drilled down uponmember
- member of the tuple which is drilled down uponBIOlapQueryException
- if member is not referenced by the cube
upon which the query is based, or if the tuple has a dimensionality which
does not correspond to any of the dimensionalities of the axes of the querypublic IBITupleDrill drillUpTuple(IBITuple tuple, IBIMember member) throws BIOlapQueryException
IBIMemberSet
specifications of all
dimensions are cleared and transformed into the according
IBITupleSet
specifications for the existing axes.
Initial state: ([Beer],[All countries]) [USA] [Germany] [France] ([Wine],[All countries]) [USA] [Germany] [France] drillUp on [Germany] of tuple ([Wine],[Germany]) returns ([Beer],[All countries]) [USA] [Germany] [France] ([Wine],[All countries])
tuple
- tuple which contains the member which is drilled up uponmember
- member of the tuple which is drilled up uponBIOlapQueryException
- if member is not referenced by the cube
upon which the query is based, or the if tuple has a dimensionality which
does not correspond to any of the dimensionalities of the axes of the querypublic IBITupleDrill zoomInTuple(IBITuple tuple, IBIMember member) throws BIOlapQueryException
drillDownTuple
), the method does not retain the parent
member.
In order to execute a zoom in on a tuple member, the existing query has
to be executed and transformed into a pure specification of tuples for
all axes. All existing IBIMemberSet
specifications of all
dimensions are cleared and transformed into the according
IBITupleSet
specifications for the existing axes.
Hierarchy structure: [All countries] [USA] [Germany] [France] Initial state: ([Beer],[All countries]) ([Wine],[All countries]) zoomIn on [All countries] of tuple ([Wine],[All countries]) returns ([Wine],[USA]) ([Wine],[Germany]) ([Wine],[France])
tuple
- tuple which contains the member which is zoomed in uponmember
- member of the tuple which is zoomed in uponBIOlapQueryException
- if member is not referenced by the cube
upon which the query is based, or if the tuple has a dimensionality which
does not correspond to any of the dimensionalities of the axes of the querypublic IBITupleDrill zoomOutTuple(IBITuple tuple, IBIMember member) throws BIOlapQueryException
IBIMemberSet
specifications of all
dimensions are cleared and transformed into the according
IBITupleSet
specifications for the existing axes.
Initial state: ([Beer],[All countries]) ([Wine],[All countries]) [USA] [CA] [OR] [WA] [Germany] [France] zoomOut on [CA] of tuple ([Wine],[CA]) returns ([Wine],[USA]) ([Wine],[Germany]) ([Wine],[France])
tuple
- tuple which contains the member which is zoomed out uponmember
- member of the tuple which is zoomed out uponBIOlapQueryException
- if member is not referenced by the cube
upon which the query is based, or if the tuple has a dimensionality which
does not correspond to any of the dimensionalities of the axes of the querypublic void selectAttribute(org.omg.cwm.analysis.olap.Dimension dimension, org.omg.cwm.objectmodel.core.Attribute attribute) throws BIOlapQueryException
dimension
- dimension to which the attribute belongsattribute
- attribute to be requested from the data sourceBIOlapQueryException
- if dimension or attribute is not referenced
by the cube upon which the query is basedpublic void deselectAttribute(org.omg.cwm.analysis.olap.Dimension dimension, org.omg.cwm.objectmodel.core.Attribute attribute) throws BIOlapQueryException
dimension
- dimension to which the attribute belongsattribute
- attribute not to be requested any more from the
data sourceBIOlapQueryException
- if dimension or attribute is not referenced
by the cube upon which the query is basedpublic void suppressEmptyRows()
public void suppressEmptyColumns()
public void revealEmptyRows()
public void revealEmptyColumns()
public boolean isSuppressingEmptyRows()
public boolean isSuppressingEmptyColumns()
public void setInitialState()
public IBISetExpression getSetExpressionById(String id) throws BIOlapQueryException
set expressions
by their IDs. The ID
which is used to search for them is the attribute id
of the
interface IBIIdentifiable
.
null
is returned.
setActive(false)
.id
- the id of the to-be-retrieved set expression. This can be a filter,
a sort operation, etc.BIOlapQueryException
- if the set expression with the specified id
could not be foundpublic List getSapVariables()
public void clearSapVariableValue(IBISapVariable variable) throws BIOlapQueryException
IBISapVariableSelectionTypeEnum.SINGLEVALUE
or
IBISapVariableSelectionTypeEnum.INTERVAL
, the variable value
is set to null. When the selection type is
IBISapVariableSelectionTypeEnum.COMPLEX
, the list of range
specifications is cleared.variable
- variable, the value or values of which should be clearedBIOlapQueryException
- if the variable does not exist for this querypublic void setSapVariableValue(IBISapHierarchyVariable variable, org.omg.cwm.analysis.olap.Hierarchy hierarchy) throws BIOlapQueryException
IBISapHierarchyVariable
with selection type
IBISapVariableSelectionTypeEnum.SINGLEVALUE
.variable
- the variable for which a value should be sethierarchy
- the hierarchy which should be used for the valueBIOlapQueryException
- if variable or hierarchy is nullpublic void setSapVariableValue(IBISapMemberVariable variable, IBIMember member) throws BIOlapQueryException
IBISapMemberVariable
with selection type
IBISapVariableSelectionTypeEnum.SINGLEVALUE
.variable
- the variable for which a value should be setmember
- the member which should be used for the valueBIOlapQueryException
- if variable or member is nullpublic void setSapVariableValue(IBISapMemberVariable variable, IBIMember low, IBIMember high) throws BIOlapQueryException
IBISapMemberVariable
with selection type
IBISapVariableSelectionTypeEnum.INTERVAL
.variable
- the variable for which a value should be setlow
- the member which should be used for the lower limit
of the rangehigh
- the member which should be used for the upper limit
of the rangeBIOlapQueryException
- if variable, low, or high is nullpublic void addSapVariableValue(IBISapMemberVariable variable, IBISapRangeSignType sign, IBIRelationalOperatorType option, IBIMember low, IBIMember high) throws BIOlapQueryException
IBISapMemberVariable
with selection type
IBISapVariableSelectionTypeEnum.COMPLEX
. You can specify a
complex selection by iteratively calling this method. You can delete the
list of selection specifications by calling the
clearSapVariableValue(IBISapVariable)
method.variable
- the variable for which a value should be setsign
- the sign designating whether the members of this
SAP variable value range specification should be included
or excluded from the selectionoption
- the option which specifies how members should be
selected based on the specified low and high valuelow
- the member which should be used for the lower
limit of the rangehigh
- the member which should be used for the upper
limit of the range or null, for all
IBIRelationalOperatorType
except for the
type IBIRelationalOperatorTypeEnum.BETWEEN
BIOlapQueryException
- if variable, low, or high is nullpublic void setSapVariableValue(IBISapNumericVariable variable, Object value) throws BIOlapQueryException
IBISapNumericVariable
with selection type
IBISapVariableSelectionTypeEnum.SINGLEVALUE
.variable
- the variable for which a value should be setvalue
- the value of type Java Wrapper class which should be setBIOlapQueryException
- if variable or value is nullpublic void setSapVariableValue(IBISapNumericVariable variable, Object low, Object high) throws BIOlapQueryException
IBISapNumericVariable
with selection type
IBISapVariableSelectionTypeEnum.INTERVAL
.variable
- the variable for which a value should be setlow
- the lower limit of the range of type Java Wrapper classhigh
- the upper limit of the range of type Java Wrapper classBIOlapQueryException
- if variable, low, or high is nullpublic void addSapVariableValue(IBISapNumericVariable variable, IBISapRangeSignType sign, IBIRelationalOperatorType option, Object low, Object high) throws BIOlapQueryException
IBISapNumericVariable
with selection type
IBISapVariableSelectionTypeEnum.COMPLEX
. You can specify a
complex selection by iteratively calling this method. You can delete the
list of selection specifications by calling the
clearSapVariableValue
method.variable
- the variable for which a value should be setsign
- the sign designating whether the members of this
SAP variable value range specification should be included
or excluded from the selection.option
- the option which specifies how members should be
selected based on the specified low and high valuelow
- the lower limit of the range of type Java Wrapper classhigh
- the upper limit of the range of type Java Wrapper class
or null, for all IBIRelationalOperatorType
except for the type
IBIRelationalOperatorTypeEnum.BETWEEN
BIOlapQueryException
- if variable, low, or high is null
|
SAP BI Java SDK | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |