Class OptionalSortPositionRequest

java.lang.Object
com.broadleafcommerce.catalog.web.endpoint.support.OptionalSortPositionRequest

public class OptionalSortPositionRequest extends Object
A simple alternative to SortPositionRequest that is optimized for create endpoints (which will not have an SortPositionRequest.updateContextId) who want to distinguish between requests that want to apply an initial sort and those who don't.
Author:
Samarth Dhruva (samarthd)
See Also:
  • SortPositionRequest
  • Constructor Details

    • OptionalSortPositionRequest

      public OptionalSortPositionRequest(String after, String before, Boolean shouldSort)
  • Method Details

    • getAfter

      public String getAfter()
      See Also:
      • SortPositionRequest.positionAfterContextId
    • getBefore

      public String getBefore()
      See Also:
      • SortPositionRequest.positionBeforeContextId
    • isShouldSort

      public boolean isShouldSort()
      A flag dictating whether sorting should be performed.
      Returns:
      true if sorting should be performed, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object