org.springframework.beans.support
Class MutableSortDefinition


public class MutableSortDefinition
implements Serializable, SortDefinition

Mutable implementation of SortDefinition. Supports toggling the ascending value on setting the same property again.

Author:
Juergen Hoeller, Jean-Pierre Pawlak
Since: 26.05.2003
See Also: setToggleAscendingOnProperty(boolean)

Constructor Summary
MutableSortDefinition()
           
MutableSortDefinition(SortDefinition source)
           
MutableSortDefinition(String property, boolean ignoreCase, boolean ascending)
           
MutableSortDefinition(boolean toggleAscendingOnSameProperty)
           

Method Summary
 booleanequals(Object obj)
           
 StringgetProperty()
           
 inthashCode()
           
 booleanisAscending()
           
 booleanisIgnoreCase()
           
 booleanisToggleAscendingOnProperty()
           
 voidsetAscending(boolean ascending)
           
 voidsetIgnoreCase(boolean ignoreCase)
           
 voidsetProperty(String property)
          Set the sort property.
 voidsetToggleAscendingOnProperty(boolean toggleAscendingOnProperty)
           

Constructor Detail

MutableSortDefinition

public MutableSortDefinition()

MutableSortDefinition

public MutableSortDefinition(SortDefinition source)

MutableSortDefinition

public MutableSortDefinition(String property, boolean ignoreCase, boolean ascending)

MutableSortDefinition

public MutableSortDefinition(boolean toggleAscendingOnSameProperty)
Method Detail

equals

public boolean equals(Object obj)

getProperty

public String getProperty()

hashCode

public int hashCode()

isAscending

public boolean isAscending()

isIgnoreCase

public boolean isIgnoreCase()

isToggleAscendingOnProperty

public boolean isToggleAscendingOnProperty()

setAscending

public void setAscending(boolean ascending)

setIgnoreCase

public void setIgnoreCase(boolean ignoreCase)

setProperty

public void setProperty(String property)
Set the sort property. If the property was the same as the current, the sort is reversed if "toggleAscendingOnProperty" is activated, else simply ignored.

setToggleAscendingOnProperty

public void setToggleAscendingOnProperty(boolean toggleAscendingOnProperty)

Association Links

to Class java.lang.String