com.interface21.beans
Class MutableSortDefinition
java.lang.Object
|
+--com.interface21.beans.MutableSortDefinition
- All Implemented Interfaces:
- SortDefinition
- public class MutableSortDefinition
- extends java.lang.Object
- implements SortDefinition
Mutable implementation of SortDefinition.
Supports toggling the ascending value on setting the same property again.
- Since:
- 26.05.2003
- Author:
- Juergen Hoeller
- See Also:
setToggleAscendingOnProperty(boolean)
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
MutableSortDefinition
public MutableSortDefinition()
MutableSortDefinition
public MutableSortDefinition(java.lang.String property,
boolean ignoreCase,
boolean ascending)
MutableSortDefinition
public MutableSortDefinition(boolean toggleAscendingOnSameProperty)
setProperty
public void setProperty(java.lang.String property)
- Sets the sort property.
If the property was the same as the current, the sort is reversed if
toggleAscendingOnProperty is activated, else simply ignored.
getProperty
public java.lang.String getProperty()
- Description copied from interface:
SortDefinition
- Return the name of the property to sort by.
- Specified by:
getProperty in interface SortDefinition
setIgnoreCase
public void setIgnoreCase(boolean ignoreCase)
isIgnoreCase
public boolean isIgnoreCase()
- Description copied from interface:
SortDefinition
- Return whether upper and lower case in String values should be ignored.
- Specified by:
isIgnoreCase in interface SortDefinition
setAscending
public void setAscending(boolean ascending)
isAscending
public boolean isAscending()
- Description copied from interface:
SortDefinition
- Return if ascending or descending.
- Specified by:
isAscending in interface SortDefinition
setToggleAscendingOnProperty
public void setToggleAscendingOnProperty(boolean toggleAscendingOnProperty)
isToggleAscendingOnProperty
public boolean isToggleAscendingOnProperty()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
Rod Johnson and Spring contributors 2001-2003.