public class MutableQueryHints extends Object implements QueryHints
QueryHints
, without the Option to switch between
forCounts()
/withFetchGraphs(EntityManager)
hints.QueryHints
QueryHints.NoHints
Constructor and Description |
---|
MutableQueryHints() |
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
Object value)
Add a new key-value pair for a hint.
|
QueryHints |
forCounts()
Creates and returns a new
QueryHints 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.
|
QueryHints |
withFetchGraphs(javax.persistence.EntityManager em)
Creates and returns a new
QueryHints instance including EntityGraph . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
from
public QueryHints withFetchGraphs(javax.persistence.EntityManager em)
QueryHints
QueryHints
instance including EntityGraph
.withFetchGraphs
in interface QueryHints
em
- must not be null.QueryHints
.public QueryHints forCounts()
QueryHints
QueryHints
instance that will contain only those hints applicable for count
queries.forCounts
in interface QueryHints
QueryHints
.public void forEach(BiConsumer<String,Object> action)
QueryHints
Passes each query hint to the consumer. Query hint keys might appear more than once.
forEach
in interface QueryHints
action
- to process query hints consisting of a key and a value.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.