Interface JpqlSortExpressionSupplier


@NullMarked public interface JpqlSortExpressionSupplier
Interface to be implemented by Spring beans to supply JPQL sort expressions for datatype and LOB properties.

Suppliers are applied in order defined by Ordered or Order. Return null if the supplier does not support the specified property.

  • Method Details

    • getDatatypeSortExpression

      default @Nullable String getDatatypeSortExpression(SortExpressionContext context)
      Returns JPQL order expression for the specified property, e.g. {E}.property, where {E} is a selected entity alias. It's possible to:
      • Apply JPQL functions for property, e.g upper({E}.property)
      • Use asc/desc or nulls last/nulls first, e.g. {E}.property asc nulls first
      Returns:
      JPQL order expression for the specified property.
    • getLobSortExpression

      default @Nullable String getLobSortExpression(SortExpressionContext context)
      Returns JPQL order expression for the specified LOB property.
      Returns:
      JPQL order expression for the specified LOB property.