|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.olap4j.query.QueryDimension
public class QueryDimension
Usage of a dimension for an OLAP query.
It references an Dimension
and allows the
query creator to manage the member selections for the dimension.
The state of a QueryDimension does not affect the
Dimension object in any way so a single Dimension object
can be referenced by many QueryDimension objects.
Nested Class Summary | |
---|---|
static class |
QueryDimension.HierarchizeMode
Defines in which way the hierarchize operation should be performed. |
Constructor Summary | |
---|---|
QueryDimension(Query query,
Dimension dimension)
|
Method Summary | |
---|---|
void |
addQueryNodeListener(QueryNodeListener l)
Registers a new listener for a QueryNode. |
void |
clearExclusions()
Clears the current member inclusions from this query dimension. |
void |
clearHierarchizeMode()
Tells the QueryDimension not to hierarchyze it's included selections. |
void |
clearInclusions()
Clears the current member inclusions from this query dimension. |
void |
clearSelection()
Deprecated. This method is deprecated in favor of clearInclusions() |
void |
clearSort()
Clears the current sorting settings. |
void |
exclude(Member member)
Selects members and excludes them from the query. |
void |
exclude(Selection.Operator operator,
Member member)
Selects members and excludes them from the query. |
void |
exclude(Selection.Operator operator,
java.lang.String... nameParts)
Selects members and excludes them from the query. |
void |
exclude(java.lang.String... nameParts)
Selects members and excludes them from the query. |
QueryAxis |
getAxis()
|
Dimension |
getDimension()
Returns the underlying dimension object onto which this query dimension is based. |
java.util.List<Selection> |
getExclusions()
Returns a list of the exclusions within this dimension. |
QueryDimension.HierarchizeMode |
getHierarchizeMode()
Returns the current mode of hierarchyzation, or null if no hierarchyzation is currently performed. |
java.util.List<Selection> |
getInclusions()
Returns a list of the inclusions within this dimension. |
java.lang.String |
getName()
|
static java.lang.String[] |
getNameParts(java.lang.String sel)
|
Query |
getQuery()
|
java.util.List<Selection> |
getSelections()
Deprecated. Use getInclusions() |
SortOrder |
getSortOrder()
Returns the current order in which the dimension members are sorted. |
void |
include(Member member)
Selects members and includes them in the query. |
void |
include(Selection.Operator operator,
Member member)
Selects members and includes them in the query. |
void |
include(Selection.Operator operator,
java.lang.String... nameParts)
Selects members and includes them in the query. |
void |
include(java.lang.String... nameParts)
Selects members and includes them in the query. |
void |
removeQueryNodeListener(QueryNodeListener l)
De-registers a new listener for a QueryNode. |
java.util.List<Member> |
resolve(Selection selection)
Resolves a selection of members into an actual list of the root member and it's relatives selected by the Selection object. |
void |
select(Member member)
Deprecated. |
void |
select(Selection.Operator operator,
Member member)
Deprecated. |
void |
select(Selection.Operator operator,
java.lang.String... nameParts)
Deprecated. |
void |
select(java.lang.String... nameParts)
Deprecated. |
void |
setAxis(QueryAxis axis)
|
void |
setDimension(Dimension dimension)
Forces a change onto which dimension is the current base of this QueryDimension object. |
void |
setHierarchizeMode(QueryDimension.HierarchizeMode hierarchizeMode)
Triggers the hierarchization of the included members within this QueryDimension. |
void |
sort(SortOrder order)
Sorts the dimension members by name in the order supplied as a parameter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryDimension(Query query, Dimension dimension)
Method Detail |
---|
public Query getQuery()
public void setAxis(QueryAxis axis)
public QueryAxis getAxis()
public java.lang.String getName()
@Deprecated public void select(java.lang.String... nameParts) throws OlapException
OlapException
@Deprecated public void select(Selection.Operator operator, java.lang.String... nameParts) throws OlapException
OlapException
@Deprecated public void select(Member member)
@Deprecated public void select(Selection.Operator operator, Member member)
@Deprecated public void clearSelection()
clearInclusions()
public void include(java.lang.String... nameParts) throws OlapException
This method selects and includes a single member with the
Selection.Operator.MEMBER
operator.
nameParts
- Name of the member to select and include.
OlapException
- If no member corresponding to the supplied
name parts could be resolved in the cube.public void include(Selection.Operator operator, java.lang.String... nameParts) throws OlapException
This method selects and includes a member along with it's
relatives, depending on the supplied Selection.Operator
operator.
operator
- Selection operator that defines what relatives of the
supplied member name to include along.nameParts
- Name of the root member to select and include.
OlapException
- If no member corresponding to the supplied
name parts could be resolved in the cube.public void include(Member member)
This method selects and includes a single member with the
Selection.Operator.MEMBER
selection operator.
member
- The member to select and include in the query.public void include(Selection.Operator operator, Member member)
This method selects and includes a member along with it's
relatives, depending on the supplied Selection.Operator
operator.
operator
- Selection operator that defines what relatives of the
supplied member name to include along.member
- Root member to select and include.public void clearInclusions()
public void exclude(java.lang.String... nameParts) throws OlapException
This method selects and excludes a single member with the
Selection.Operator.MEMBER
operator.
nameParts
- Name of the member to select and exclude.
OlapException
- If no member corresponding to the supplied
name parts could be resolved in the cube.public void exclude(Selection.Operator operator, java.lang.String... nameParts) throws OlapException
This method selects and excludes a member along with it's
relatives, depending on the supplied Selection.Operator
operator.
operator
- Selection operator that defines what relatives of the
supplied member name to exclude along.nameParts
- Name of the root member to select and exclude.
OlapException
- If no member corresponding to the supplied
name parts could be resolved in the cube.public void exclude(Member member)
This method selects and excludes a single member with the
Selection.Operator.MEMBER
selection operator.
member
- The member to select and exclude from the query.public void exclude(Selection.Operator operator, Member member)
This method selects and excludes a member along with it's
relatives, depending on the supplied Selection.Operator
operator.
operator
- Selection operator that defines what relatives of the
supplied member name to exclude along.member
- Root member to select and exclude.public void clearExclusions()
public static java.lang.String[] getNameParts(java.lang.String sel)
public java.util.List<Member> resolve(Selection selection) throws OlapException
selection
- The selection of members to resolve.
OlapException
- If resolving the selections triggers an exception
while looking up members in the underlying cube.@Deprecated public java.util.List<Selection> getSelections()
getInclusions()
Be aware that modifications to this list might have unpredictable consequences.
public java.util.List<Selection> getInclusions()
Be aware that modifications to this list might have unpredictable consequences.
public java.util.List<Selection> getExclusions()
Be aware that modifications to this list might have unpredictable consequences.
public Dimension getDimension()
Returns a mutable object so operations on it have unpredictable consequences.
public void setDimension(Dimension dimension)
Forcing a change in the duimension assignment has unpredictable consequences.
dimension
- The new dimension to assign to this
query dimension.public void sort(SortOrder order)
order
- The SortOrder
to use.public SortOrder getSortOrder()
SortOrder
public void clearSort()
public QueryDimension.HierarchizeMode getHierarchizeMode()
public void setHierarchizeMode(QueryDimension.HierarchizeMode hierarchizeMode)
The dimension inclusions will be wrapped in an MDX Hierarchize function call.
hierarchizeMode
- If parents should be included before or after
their children. (Equivalent to the POST/PRE MDX literal for the
Hierarchize() function)
inside the Hierarchize() MDX function call.public void clearHierarchizeMode()
public void addQueryNodeListener(QueryNodeListener l)
l
- The new listener object, implementation of QueryNodeListenerQueryNodeListener
public void removeQueryNodeListener(QueryNodeListener l)
l
- The listener object to de-register.QueryNodeListener
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |