java.lang.Object | |
↳ | org.springframework.beans.support.MutableSortDefinition |
Mutable implementation of the SortDefinition
interface.
Supports toggling the ascending value on setting the same property again.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create an empty MutableSortDefinition,
to be populated via its bean properties.
| |||||||||||
Copy constructor: create a new MutableSortDefinition
that mirrors the given sort definition.
| |||||||||||
Create a MutableSortDefinition for the given settings.
| |||||||||||
Create a new MutableSortDefinition.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Return the name of the bean property to compare.
| |||||||||||
Return whether to sort ascending (true) or descending (false).
| |||||||||||
Return whether upper and lower case in String values should be ignored.
| |||||||||||
Return whether to toggle the ascending flag if the same property gets set again
(that is,
setProperty(String) gets called with already set property name again). | |||||||||||
Set whether to sort ascending (true) or descending (false).
| |||||||||||
Set whether upper and lower case in String values should be ignored.
| |||||||||||
Set the property to compare.
| |||||||||||
Set whether to toggle the ascending flag if the same property gets set again
(that is,
setProperty(String) gets called with already set property name again). |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.beans.support.SortDefinition
|
Create an empty MutableSortDefinition, to be populated via its bean properties.
Copy constructor: create a new MutableSortDefinition that mirrors the given sort definition.
source | the original sort definition |
---|
Create a MutableSortDefinition for the given settings.
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) |
Create a new MutableSortDefinition.
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).
|
---|
Return the name of the bean property to compare. Can also be a nested bean property path.
Return whether to sort ascending (true) or descending (false).
Return whether upper and lower case in String values should be ignored.
Return whether to toggle the ascending flag if the same property gets set again
(that is, setProperty(String)
gets called with already set property name again).
Set whether to sort ascending (true) or descending (false).
Set whether upper and lower case in String values should be ignored.
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.
Set whether to toggle the ascending flag if the same property gets set again
(that is, setProperty(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.