Interface SortStatementFormatter

All Known Implementing Classes:
DefaultSortStatementFormatter, ItemtypeSortStatementFormatter, StringSortStatementFormatter

public interface SortStatementFormatter
The formatter detects if a custom sort statement should be used given a special condition is fulfilled.
  • Method Details

    • isApplicable

      boolean isApplicable(AttributeDescriptorModel attributeDescriptor)
      Determines if a custom sort statement formatter should be applied given the AttributeDescriptorModel provided.
      Parameters:
      attributeDescriptor - the attribute descriptor model used to evaluate the condition
      Returns:
      true when the condition is met and the sort parameter should be formatted using formatSortStatement(Sort); false otherwise
    • formatSortStatement

      String formatSortStatement(Sort sort)
      Format the sort parameter of the provided Sort object.
      Parameters:
      sort - the Sort object containing the sort parameter and direction
      Returns:
      the formatted sort parameter