Enum Class QueryHints.NoHints

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

public static enum QueryHints.NoHints extends Enum<QueryHints.NoHints> implements QueryHints
Null object implementation of QueryHints.
Since:
2.0
Author:
Oliver Gierke
  • Enum Constant Details

  • Method Details

    • values

      public static QueryHints.NoHints[] 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 QueryHints.NoHints 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
    • withFetchGraphs

      public QueryHints withFetchGraphs(jakarta.persistence.EntityManager em)
      Description copied from interface: QueryHints
      Creates and returns a new QueryHints instance including EntityGraph.
      Specified by:
      withFetchGraphs in interface QueryHints
      Parameters:
      em - must not be null.
      Returns:
      new instance of QueryHints.
    • forCounts

      public QueryHints forCounts()
      Description copied from interface: QueryHints
      Creates and returns a new QueryHints instance that will contain only those hints applicable for count queries.
      Specified by:
      forCounts in interface QueryHints
      Returns:
      new instance of QueryHints.
    • forEach

      public void forEach(BiConsumer<String,Object> action)
      Description copied from interface: QueryHints
      Performs the given action for each element of this query hints object until all hints have been processed or the action throws an exception. Actions are performed in the order of iteration, if that order is specified. Exceptions thrown by the action are relayed to the caller.

      Passes each query hint to the consumer. Query hint keys might appear more than once.

      Specified by:
      forEach in interface QueryHints
      Parameters:
      action - to process query hints consisting of a key and a value.