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
Null object implementation of
QueryHints
.- Since:
- 2.0
- Author:
- Oliver Gierke
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface org.springframework.data.jpa.repository.support.QueryHints
QueryHints.NoHints
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates and returns a newQueryHints
instance that will contain only those hints applicable for count queries.void
forEach
(BiConsumer<String, Object> action) Performs the given action for each element of this query hints object until all hints have been processed or the action throws an exception.static QueryHints.NoHints
Returns the enum constant of this class with the specified name.static QueryHints.NoHints[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.withFetchGraphs
(jakarta.persistence.EntityManager em) Creates and returns a newQueryHints
instance includingEntityGraph
.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
withFetchGraphs
Description copied from interface:QueryHints
Creates and returns a newQueryHints
instance includingEntityGraph
.- Specified by:
withFetchGraphs
in interfaceQueryHints
- Parameters:
em
- must not be null.- Returns:
- new instance of
QueryHints
.
-
forCounts
Description copied from interface:QueryHints
Creates and returns a newQueryHints
instance that will contain only those hints applicable for count queries.- Specified by:
forCounts
in interfaceQueryHints
- Returns:
- new instance of
QueryHints
.
-
forEach
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 interfaceQueryHints
- Parameters:
action
- to process query hints consisting of a key and a value.
-