com.tonbeller.jpivot.test.olap
Class TestSortRank

java.lang.Object
  extended by com.tonbeller.jpivot.core.ExtensionSupport
      extended by com.tonbeller.jpivot.test.olap.TestExtensionSupport
          extended by com.tonbeller.jpivot.test.olap.TestSortRank
All Implemented Interfaces:
Extension, ExpressionConstants, SortRank

public class TestSortRank
extends TestExtensionSupport
implements SortRank

Created on 24.10.2002

Author:
av

Field Summary
 
Fields inherited from interface com.tonbeller.jpivot.olap.navi.SortRank
ID
 
Fields inherited from interface com.tonbeller.jpivot.olap.model.ExpressionConstants
ASC, BASC, BDESC, BOTTOMCOUNT, DESC, TOPCOUNT
 
Constructor Summary
TestSortRank()
           
 
Method Summary
 int getSortMode()
          Returns the sortMode.
 int getTopBottomCount()
          Returns the topBottomCount.
 boolean isCurrentSorting(Position position)
          return true if the result is sorted by the members of the position
 boolean isSortable(Position position)
          returns true, if one of the members is a measure
 boolean isSorting()
          turns sorting on / off (off = natural sorting)
 void setSorting(boolean sorting)
          Sets the enabled.
 void setSortMode(int sortMode)
          Sets the sortMode.
 void setTopBottomCount(int topBottomCount)
          Sets the topBottomCount.
 void sort(Axis membersToSort, Position position)
          changes current sorting.
 
Methods inherited from class com.tonbeller.jpivot.test.olap.TestExtensionSupport
fireModelChanged, model
 
Methods inherited from class com.tonbeller.jpivot.core.ExtensionSupport
decorate, getId, getModel, modelInitialized, setId, setModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.tonbeller.jpivot.core.Extension
decorate, getId, modelInitialized, setModel
 

Constructor Detail

TestSortRank

public TestSortRank()
Method Detail

isSortable

public boolean isSortable(Position position)
returns true, if one of the members is a measure

Specified by:
isSortable in interface SortRank

isCurrentSorting

public boolean isCurrentSorting(Position position)
Description copied from interface: SortRank
return true if the result is sorted by the members of the position

Specified by:
isCurrentSorting in interface SortRank
See Also:
SortRank.isCurrentSorting(Position)

sort

public void sort(Axis membersToSort,
                 Position position)
Description copied from interface: SortRank
changes current sorting. If mode is TOPCOUNT or BOTTOMCOUNT the current value of topBottomCount will be used.

Specified by:
sort in interface SortRank
Parameters:
membersToSort - the axis to sort. Its one of the "other" axes, that do not contain position
position - the sort criteria
See Also:
SortRank.sort(Axis, Position)

getSortMode

public int getSortMode()
Returns the sortMode.

Specified by:
getSortMode in interface SortRank
Returns:
int

getTopBottomCount

public int getTopBottomCount()
Returns the topBottomCount.

Specified by:
getTopBottomCount in interface SortRank
Returns:
int

setSortMode

public void setSortMode(int sortMode)
Sets the sortMode.

Specified by:
setSortMode in interface SortRank
Parameters:
sortMode - The sortMode to set

setTopBottomCount

public void setTopBottomCount(int topBottomCount)
Sets the topBottomCount.

Specified by:
setTopBottomCount in interface SortRank
Parameters:
topBottomCount - The topBottomCount to set

isSorting

public boolean isSorting()
Description copied from interface: SortRank
turns sorting on / off (off = natural sorting)

Specified by:
isSorting in interface SortRank

setSorting

public void setSorting(boolean sorting)
Sets the enabled.

Specified by:
setSorting in interface SortRank
Parameters:
enabled - The enabled to set