Interface Sortable


  • public interface Sortable
    Repository domain should implement this interface in order to notify the system that they can be managed for sorting (see SortPositionRequest).
    Author:
    Jeff Fischer
    • Method Detail

      • getSorting

        String getSorting()
        Get the value used for sorting
        Returns:
        The sorting value
      • setSorting

        void setSorting​(String sorting)
        Set the value used for sorting
        Parameters:
        sorting - The sorting value
      • sortableBounds

        default Map<String,​Object> sortableBounds()
        A map of field names to values that will be used to construct the bounds of the sorting group to which this entity belongs. For example, when sorting CategoryProduct instances, you will want to limit the sorting calculations based on the Category to which this entity belongs. This information is most often used by SortPositionStrategy components.
        Returns:
        The restrictions that describe the bounds for the sorting group to which this instance belongs
      • getSorted

        default Boolean getSorted()
        Whether or not this instance is explicitly sorted (i.e. getSorting() is not equal to DEFAULT_VALUE).
        Returns:
        Whether or not this instance is explicitly sorted