org.apache.wicket.extensions.markup.html.repeater.util
Class SingleSortState

java.lang.Object
  extended by org.apache.wicket.extensions.markup.html.repeater.util.SingleSortState
All Implemented Interfaces:
Serializable, ISortState, IClusterable

public class SingleSortState
extends Object
implements ISortState, IClusterable

Implementation of ISortState that can keep track of sort information for a single property.

Author:
Igor Vaynberg (ivaynberg)
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.apache.wicket.extensions.markup.html.repeater.data.sort.ISortState
ASCENDING, DESCENDING, NONE
 
Constructor Summary
SingleSortState()
           
 
Method Summary
 int getPropertySortOrder(String property)
          Gets the sort order of a property
 SortParam getSort()
           
 void setPropertySortOrder(String property, int dir)
          Sets sort order of the property
 void setSort(SortParam param)
          Sets the current sort state
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingleSortState

public SingleSortState()
Method Detail

setPropertySortOrder

public void setPropertySortOrder(String property,
                                 int dir)
Description copied from interface: ISortState
Sets sort order of the property

Specified by:
setPropertySortOrder in interface ISortState
Parameters:
property - the name of the property to sort on
dir - new sort state of the property. must be one of ASCENDING, DESCENDING, or NONE
See Also:
ISortState.setPropertySortOrder(java.lang.String, int)

getPropertySortOrder

public int getPropertySortOrder(String property)
Description copied from interface: ISortState
Gets the sort order of a property

Specified by:
getPropertySortOrder in interface ISortState
Parameters:
property - sort property to be checked
Returns:
one of ASCENDING, DESCENDING, or NONE
See Also:
ISortState.getPropertySortOrder(java.lang.String)

getSort

public SortParam getSort()
Returns:
current sort state

setSort

public void setSort(SortParam param)
Sets the current sort state

Parameters:
param - parameter containing new sorting information

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.