Enum Class QueryRewriter.IdentityQueryRewriter

java.lang.Object
java.lang.Enum<QueryRewriter.IdentityQueryRewriter>
org.springframework.data.jpa.repository.QueryRewriter.IdentityQueryRewriter
All Implemented Interfaces:
Serializable, Comparable<QueryRewriter.IdentityQueryRewriter>, Constable, QueryRewriter
Enclosing interface:
QueryRewriter

public static enum QueryRewriter.IdentityQueryRewriter extends Enum<QueryRewriter.IdentityQueryRewriter> implements QueryRewriter
A QueryRewriter that doesn't change the query.
  • Enum Constant Details

  • Method Details

    • values

      public static QueryRewriter.IdentityQueryRewriter[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static QueryRewriter.IdentityQueryRewriter valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • rewrite

      public String rewrite(String query, org.springframework.data.domain.Sort sort)
      Description copied from interface: QueryRewriter
      Rewrite the assembled query with the given Sort.

      WARNING: No checks are performed before the transformed query is passed to the EntityManager.

      Specified by:
      rewrite in interface QueryRewriter
      Parameters:
      query - the assembled query.
      sort - current Sort settings provided by the method, or Sort.unsorted()} if there are none.
      Returns:
      the query to be used with the EntityManager.