Class SearchSortingOption

java.lang.Object
io.goobi.viewer.model.search.SearchSortingOption
All Implemented Interfaces:
Serializable

public class SearchSortingOption extends Object implements Serializable
Author:
florian
See Also:
  • Constructor Details

    • SearchSortingOption

      public SearchSortingOption()
      Constructor for default sorting
    • SearchSortingOption

      public SearchSortingOption(String field)
      Parameters:
      field -
    • SearchSortingOption

      public SearchSortingOption(String field, boolean ascending)
      Constructor for sort field
      Parameters:
      field -
      ascending -
  • Method Details

    • getField

      public String getField()
      Returns:
      the field
    • isAscending

      public boolean isAscending()
      Returns:
      the ascending
    • isDescending

      public boolean isDescending()
    • getLabel

      public String getLabel()
      Returns:
      Appropriate label
    • getSortString

      public String getSortString()
      Returns:
      Appropriate sorting string
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Two SearchSortingOptions are equal if they either both have an empty getField() or if both getField() and isAscending() are equal
      Overrides:
      equals in class Object
    • setDefaultOption

      public void setDefaultOption(boolean defaultOption)
    • isDefaultOption

      public boolean isDefaultOption()
    • toString

      public String toString()
      Overrides:
      toString in class Object