Class SortDefinition

java.lang.Object
sk.iway.iwcm.system.datatable.SortDefinition

public class SortDefinition extends Object
Sort definition for use with PageListHolder. Replacement for deprecated org.springframework.beans.support.MutableSortDefinition.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new SortDefinition with default values (ascending sort, case insensitive).
    SortDefinition(String property, boolean ignoreCase, boolean ascending)
    Create a new SortDefinition with the given parameters.
    Copy constructor for creating a SortDefinition from another SortDefinition.
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the property to sort by.
    boolean
    Check whether to sort ascending or descending.
    boolean
    Check whether upper and lower case in String values should be ignored.
    void
    setAscending(boolean ascending)
    Set whether to sort ascending or descending.
    void
    setIgnoreCase(boolean ignoreCase)
    Set whether upper and lower case in String values should be ignored.
    void
    setProperty(String property)
    Set the property to sort by.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SortDefinition

      public SortDefinition()
      Create a new SortDefinition with default values (ascending sort, case insensitive).
    • SortDefinition

      public SortDefinition(String property, boolean ignoreCase, boolean ascending)
      Create a new SortDefinition with the given parameters.
      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)
    • SortDefinition

      public SortDefinition(SortDefinition source)
      Copy constructor for creating a SortDefinition from another SortDefinition.
      Parameters:
      source - the source SortDefinition to copy
  • Method Details

    • getProperty

      public String getProperty()
      Get the property to sort by.
      Returns:
      the property name
    • setProperty

      public void setProperty(String property)
      Set the property to sort by.
      Parameters:
      property - the property name
    • isIgnoreCase

      public boolean isIgnoreCase()
      Check whether upper and lower case in String values should be ignored.
      Returns:
      true if case should be ignored
    • setIgnoreCase

      public void setIgnoreCase(boolean ignoreCase)
      Set whether upper and lower case in String values should be ignored.
      Parameters:
      ignoreCase - true to ignore case
    • isAscending

      public boolean isAscending()
      Check whether to sort ascending or descending.
      Returns:
      true for ascending, false for descending
    • setAscending

      public void setAscending(boolean ascending)
      Set whether to sort ascending or descending.
      Parameters:
      ascending - true for ascending, false for descending