Interface JpqlSortExpressionProvider

All Known Implementing Classes:
DefaultJpqlSortExpressionProvider

public interface JpqlSortExpressionProvider
Interface to be implemented by a Spring bean to generate sort expression for datatype and LOB properties.

You can provide your own implementation bean and use custom sort logic, e.g. use functions.

  • Method Details

    • getDatatypeSortExpression

      String getDatatypeSortExpression(MetaPropertyPath metaPropertyPath, boolean sortDirectionAsc)
      Returns JPQL order expression for 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
    • getLobSortExpression

      String getLobSortExpression(MetaPropertyPath metaPropertyPath, boolean sortDirectionAsc)
      Returns JPQL order expression for specified lob property.