Skip to content

Commit

Permalink
Added sugar method to sort an axis by the default measure.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@276 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Aug 4, 2009
1 parent a4cef50 commit 8492829
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/org/olap4j/query/QueryAxis.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,21 @@ public static enum SortOrder {
BDESC
}

/**
* <p>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".
* @param order The {@link SortOrder} to apply
* @throws OlapException If an error occurs while resolving
* the default measure of the underlying cube.
*/
public void sort(SortOrder order) throws OlapException {
sort(
order,
query.getCube().getDimensions().get("Measures")
.getDefaultHierarchy().getDefaultMember());
}

/**
* <p>Sorts the axis according to the supplied order
* and member unique name.
Expand Down

0 comments on commit 8492829

Please sign in to comment.