SortDefinition interface.
Supports toggling the ascending value on setting the same property again.
setToggleAscendingOnProperty
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private String | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | MutableSortDefinition()
Create an empty MutableSortDefinition, to be populated via its bean properties. |
| public | MutableSortDefinition(SortDefinition
the original sort definition source)Copy constructor: create a new MutableSortDefinition that mirrors the given sort definition. |
| public | MutableSortDefinition(String
the property to compare property, boolean whether upper and lower case in String values should be ignored ignoreCase, boolean whether to sort ascending (true) or descending (false) ascending)Create a MutableSortDefinition for the given settings. |
| public | MutableSortDefinition(boolean
whether to toggle the ascending flag
if the same property gets set again (that is, toggleAscendingOnSameProperty)setProperty gets
called with already set property name again).Create a new MutableSortDefinition. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | getProperty()
Implements org. Return the name of the bean property to compare. |
| public int | |
| public boolean | isAscending()
Implements org. Return whether to sort ascending (true) or descending (false). |
| public boolean | isIgnoreCase()
Implements org. Return whether upper and lower case in String values should be ignored. |
| public boolean | isToggleAscendingOnProperty()
Return whether to toggle the ascending flag if the same property gets set again
(that is, |
| public void | |
| public void | setIgnoreCase(boolean ignoreCase)
Set whether upper and lower case in String values should be ignored. |
| public void | |
| public void | setToggleAscendingOnProperty(boolean toggleAscendingOnProperty)
Set whether to toggle the ascending flag if the same property gets set again
(that is, |
| ascending | back to summary |
|---|---|
| private boolean ascending | |
| ignoreCase | back to summary |
|---|---|
| private boolean ignoreCase | |
| property | back to summary |
|---|---|
| private String property | |
| toggleAscendingOnProperty | back to summary |
|---|---|
| private boolean toggleAscendingOnProperty | |
| MutableSortDefinition | back to summary |
|---|---|
| public MutableSortDefinition() Create an empty MutableSortDefinition, to be populated via its bean properties.
| |
| MutableSortDefinition | back to summary |
|---|---|
| public MutableSortDefinition(SortDefinition source) Copy constructor: create a new MutableSortDefinition that mirrors the given sort definition.
| |
| MutableSortDefinition | back to summary |
|---|---|
| public MutableSortDefinition(String property, boolean ignoreCase, boolean ascending) Create a MutableSortDefinition for the given settings.
| |
| MutableSortDefinition | back to summary |
|---|---|
| public MutableSortDefinition(boolean toggleAscendingOnSameProperty) Create a new MutableSortDefinition.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getProperty | back to summary |
|---|---|
| public String getProperty() Implements org. Doc from org. Return the name of the bean property to compare. Can also be a nested bean property path.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isAscending | back to summary |
|---|---|
| public boolean isAscending() Implements org. Doc from org. Return whether to sort ascending (true) or descending (false).
| |
| isIgnoreCase | back to summary |
|---|---|
| public boolean isIgnoreCase() Implements org. Doc from org. Return whether upper and lower case in String values should be ignored.
| |
| isToggleAscendingOnProperty | back to summary |
|---|---|
| public boolean isToggleAscendingOnProperty() Return whether to toggle the ascending flag if the same property gets set again
(that is, | |
| setAscending | back to summary |
|---|---|
| public void setAscending(boolean ascending) Set whether to sort ascending (true) or descending (false). | |
| setIgnoreCase | back to summary |
|---|---|
| public void setIgnoreCase(boolean ignoreCase) Set whether upper and lower case in String values should be ignored. | |
| setProperty | back to summary |
|---|---|
| public void setProperty(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.
| |
| setToggleAscendingOnProperty | back to summary |
|---|---|
| public void setToggleAscendingOnProperty(boolean toggleAscendingOnProperty) Set whether to toggle the ascending flag if the same property gets set again
(that is, 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. | |