|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.olap4j.query.QueryAxis
public class QueryAxis
An axis within an OLAP Query
.
An axis has a location (columns, rows, etc) and has zero or more dimensions that are placed on it.
Constructor Summary | |
---|---|
QueryAxis(Query query,
Axis location)
Creates a QueryAxis. |
Method Summary | |
---|---|
void |
addDimension(int index,
QueryDimension dimension)
Places a QueryDimension object on this axis at
a specific index. |
void |
addDimension(QueryDimension dimension)
Places a QueryDimension object on this axis. |
void |
addQueryNodeListener(QueryNodeListener l)
Registers a new listener for a QueryNode. |
void |
clearSort()
Clears the sort parameters from this axis. |
List<QueryDimension> |
getDimensions()
Returns a list of the dimensions placed on this QueryAxis. |
Axis |
getLocation()
Returns the location of this QueryAxis in the query;
null if unused. |
String |
getName()
Returns the name of this QueryAxis. |
String |
getSortIdentifierNodeName()
Returns the current sort evaluation expression, or null if none are currently defined. |
SortOrder |
getSortOrder()
Returns the current sort order in which this axis will be sorted. |
boolean |
isNonEmpty()
Returns whether this QueryAxis filters out empty rows. |
void |
pullUp(int index)
Places a QueryDimension object one position before in the list of current dimensions. |
void |
pushDown(int index)
Places a QueryDimension object one position lower in the list of current dimensions. |
void |
removeDimension(QueryDimension dimension)
Removes a QueryDimension object on this axis. |
void |
removeQueryNodeListener(QueryNodeListener l)
De-registers a new listener for a QueryNode. |
void |
setNonEmpty(boolean nonEmpty)
Sets whether this QueryAxis filters out empty rows. |
void |
sort(SortOrder order)
Sorts the axis according to the supplied order. |
void |
sort(SortOrder order,
List<IdentifierSegment> nameParts)
Sorts the axis according to the supplied order and member unique name. |
void |
sort(SortOrder order,
Member member)
Sorts the axis according to the supplied order and member. |
void |
sort(SortOrder order,
String sortEvaluationLiteral)
Sorts the axis according to the supplied order and evaluation expression. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public QueryAxis(Query query, Axis location)
query
- Query that the axis belongs tolocation
- Location of axis (e.g. ROWS, COLUMNS)Method Detail |
---|
public Axis getLocation()
QueryAxis
in the query;
null
if unused.
public List<QueryDimension> getDimensions()
Be aware that modifications to this list might have unpredictable consequences.
public String getName()
public void pullUp(int index)
index
- The index of the dimension to move up one notch.
It uses a zero based index.public void pushDown(int index)
index
- The index of the dimension to move down one notch.
It uses a zero based index.public void addDimension(QueryDimension dimension)
QueryDimension
object on this axis.
dimension
- The QueryDimension
object to add
to this axis.public void addDimension(int index, QueryDimension dimension)
QueryDimension
object on this axis at
a specific index.
dimension
- The QueryDimension
object to add
to this axis.index
- The position (0 based) onto which to place
the QueryDimensionpublic void removeDimension(QueryDimension dimension)
QueryDimension
object on this axis.
dimension
- The QueryDimension
object to remove
from this axis.public boolean isNonEmpty()
setNonEmpty(boolean)
public void setNonEmpty(boolean nonEmpty)
nonEmpty
- Whether this axis should filter out empty rowsisNonEmpty()
public void sort(SortOrder order) throws OlapException
Sorts the axis according to the supplied order. The sort evaluation expression will be the default member of the default hierarchy of the dimension named "Measures".
order
- The SortOrder
to apply
OlapException
- If an error occurs while resolving
the default measure of the underlying cube.public void sort(SortOrder order, List<IdentifierSegment> nameParts) throws OlapException
Using this method will try to resolve the supplied name parts from the underlying cube and find the corresponding member. This member will then be passed as a sort evaluation expression.
order
- The SortOrder
in which to
sort the axis.nameParts
- The unique name parts of the sort
evaluation expression.
OlapException
- If the supplied member cannot be resolved
with Cube.lookupMember(java.util.List)
public void sort(SortOrder order, Member member)
Sorts the axis according to the supplied order and member.
This method is most commonly called by passing
it a Measure
.
order
- The SortOrder
in which to
sort the axis.member
- The member that will be used as a sort
evaluation expression.public void sort(SortOrder order, String sortEvaluationLiteral)
Sorts the axis according to the supplied order and evaluation expression.
The string value passed as the sortEvaluationLitteral parameter will be used literally as a sort evaluator.
order
- The SortOrder
in which to
sort the axis.sortEvaluationLiteral
- The literal expression that
will be used to sort against.public void clearSort()
public SortOrder getSortOrder()
SortOrder
public String getSortIdentifierNodeName()
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 |