Class JpaSort.JpaOrder

java.lang.Object
org.springframework.data.domain.Sort.Order
org.springframework.data.jpa.domain.JpaSort.JpaOrder
All Implemented Interfaces:
Serializable
Enclosing class:
JpaSort

public static class JpaSort.JpaOrder extends org.springframework.data.domain.Sort.Order
Custom Sort.Order that keeps a flag to indicate unsafe property handling, i.e. the String provided is not necessarily a property but can be an arbitrary expression piped into the query execution. We also keep an additional ignoreCase flag around as the constructor of the superclass is private currently.
Author:
Christoph Strobl, Oliver Gierke
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
     
    boolean
     
    with(org.springframework.data.domain.Sort.Direction order)
     
    with(org.springframework.data.domain.Sort.NullHandling nullHandling)
     
    org.springframework.data.domain.Sort
    withUnsafe(String... properties)
    Creates new Sort with potentially unsafe Sort.Order instances.

    Methods inherited from class org.springframework.data.domain.Sort.Order

    asc, by, desc, equals, getDirection, getNullHandling, getProperty, hashCode, isAscending, isDescending, nullsFirst, nullsLast, nullsNative, toString, withProperties, withProperty

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Method Details

    • with

      public JpaSort.JpaOrder with(org.springframework.data.domain.Sort.Direction order)
      Overrides:
      with in class org.springframework.data.domain.Sort.Order
    • with

      public JpaSort.JpaOrder with(org.springframework.data.domain.Sort.NullHandling nullHandling)
      Overrides:
      with in class org.springframework.data.domain.Sort.Order
    • withUnsafe

      public org.springframework.data.domain.Sort withUnsafe(String... properties)
      Creates new Sort with potentially unsafe Sort.Order instances.
      Parameters:
      properties - must not be null.
      Returns:
    • ignoreCase

      public JpaSort.JpaOrder ignoreCase()
      Overrides:
      ignoreCase in class org.springframework.data.domain.Sort.Order
    • isIgnoreCase

      public boolean isIgnoreCase()
      Overrides:
      isIgnoreCase in class org.springframework.data.domain.Sort.Order
    • isUnsafe

      public boolean isUnsafe()
      Returns:
      true if JpaSort.JpaOrder created withUnsafe(String...).