Set whether to toggle the ascending flag if the same property gets set again
(that is, setProperty(java.lang.String) gets called with already set property name again).
Copy constructor: create a new MutableSortDefinition
that mirrors the given sort definition.
Parameters:
source - the original sort definition
MutableSortDefinition
public MutableSortDefinition(java.lang.String property,
boolean ignoreCase,
boolean ascending)
Create a MutableSortDefinition for the given settings.
Parameters:
property - the property to compare
ignoreCase - whether upper and lower case in String values should be ignored
ascending - whether to sort ascending (true) or descending (false)
MutableSortDefinition
public MutableSortDefinition(boolean toggleAscendingOnSameProperty)
Create a new MutableSortDefinition.
Parameters:
toggleAscendingOnSameProperty - whether to toggle the ascending flag
if the same property gets set again (that is, setProperty gets
called with already set property name again).
Method Detail
setProperty
public void setProperty(java.lang.String property)
Set the property to compare.
If the property was the same as the current, the sort is reversed if
"toggleAscendingOnProperty" is activated, else simply ignored.
public void setToggleAscendingOnProperty(boolean toggleAscendingOnProperty)
Set whether to toggle the ascending flag if the same property gets set again
(that is, setProperty(java.lang.String) gets called with already set property name again).
This is particularly useful for parameter binding through a web request,
where clicking on the field header again might be supposed to trigger a
resort for the same field but opposite order.
isToggleAscendingOnProperty
public boolean isToggleAscendingOnProperty()
Gets the value of the property toggleAscendingOnProperty.