Top Description Fields Constructors Methods
org.hibernate.jpa

public Class QueryHints

extends Object
Class Inheritance
Imports
java.util.HashSet, .Set, org.hibernate.graph.GraphSemantic

Defines the supported JPA query hints

Field Summary

Modifier and TypeField and Description
public static final String
HINT_CACHE_MODE

The hint key for specifying the cache mode (org.hibernate.CacheMode) to be in effect for the execution of the hinted query.

public static final String
HINT_CACHE_REGION

The hint key for specifying the name of the cache region (within Hibernate's query result cache region) to use for storing the query results.

public static final String
HINT_CACHEABLE

The hint key for specifying whether the query results should be cached for the next (cached) execution of the "same query".

public static final String
HINT_COMMENT

The hint key for specifying a comment which is to be embedded into the SQL sent to the database.

public static final String
HINT_FETCH_SIZE

The hint key for specifying a JDBC fetch size, used when executing the resulting SQL.

public static final String
HINT_FETCHGRAPH

Hint providing a "fetchgraph" EntityGraph.

public static final String
HINT_FLUSH_MODE

The hint key for specifying the flush mode (org.hibernate.FlushMode) to be in effect for the execution of the hinted query.

public static final String
public static final String
HINT_LOADGRAPH

Hint providing a "loadgraph" EntityGraph.

public static final String
public static final String
public static final String
public static final String
HINT_READONLY

The hint key for specifying that objects loaded into the persistence context as a result of this query execution should be associated with the persistence context as read-only.

public static final String
HINT_TIMEOUT

The hint key for specifying a query timeout per Hibernate O/RM, which defines the timeout in seconds.

private static final Set<String>
public static final String
JAKARTA_HINT_FETCHGRAPH

Hint providing a "fetchgraph" EntityGraph.

public static final String
JAKARTA_HINT_LOADGRAPH

Hint providing a "loadgraph" EntityGraph.

public static final String
JAKARTA_SPEC_HINT_TIMEOUT

The hint key for specifying a query timeout per JPA, which defines the timeout in milliseconds

public static final String
SPEC_HINT_TIMEOUT

The hint key for specifying a query timeout per JPA, which defines the timeout in milliseconds

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private static Set<String>
public static Set<String>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HINT_CACHE_MODEback to summary
public static final String HINT_CACHE_MODE

The hint key for specifying the cache mode (org.hibernate.CacheMode) to be in effect for the execution of the hinted query.

HINT_CACHE_REGIONback to summary
public static final String HINT_CACHE_REGION

The hint key for specifying the name of the cache region (within Hibernate's query result cache region) to use for storing the query results.

HINT_CACHEABLEback to summary
public static final String HINT_CACHEABLE

The hint key for specifying whether the query results should be cached for the next (cached) execution of the "same query".

HINT_COMMENTback to summary
public static final String HINT_COMMENT

The hint key for specifying a comment which is to be embedded into the SQL sent to the database.

HINT_FETCH_SIZEback to summary
public static final String HINT_FETCH_SIZE

The hint key for specifying a JDBC fetch size, used when executing the resulting SQL.

HINT_FETCHGRAPHback to summary
public static final String HINT_FETCHGRAPH

Hint providing a "fetchgraph" EntityGraph. Attributes explicitly specified as AttributeNodes are treated as FetchType.EAGER (via join fetch or subsequent select).

Note

Currently, attributes that are not specified are treated as FetchType.LAZY or FetchType.EAGER depending on the attribute's definition in metadata, rather than forcing FetchType.LAZY.

HINT_FLUSH_MODEback to summary
public static final String HINT_FLUSH_MODE

The hint key for specifying the flush mode (org.hibernate.FlushMode) to be in effect for the execution of the hinted query.

HINT_FOLLOW_ON_LOCKINGback to summary
public static final String HINT_FOLLOW_ON_LOCKING
HINT_LOADGRAPHback to summary
public static final String HINT_LOADGRAPH

Hint providing a "loadgraph" EntityGraph. Attributes explicitly specified as AttributeNodes are treated as FetchType.EAGER (via join fetch or subsequent select). Attributes that are not specified are treated as FetchType.LAZY or FetchType.EAGER depending on the attribute's definition in metadata

HINT_NATIVE_LOCKMODEback to summary
public static final String HINT_NATIVE_LOCKMODE
HINT_NATIVE_SPACESback to summary
public static final String HINT_NATIVE_SPACES
HINT_PASS_DISTINCT_THROUGHback to summary
public static final String HINT_PASS_DISTINCT_THROUGH
HINT_READONLYback to summary
public static final String HINT_READONLY

The hint key for specifying that objects loaded into the persistence context as a result of this query execution should be associated with the persistence context as read-only.

HINT_TIMEOUTback to summary
public static final String HINT_TIMEOUT

Deprecated

use SPEC_HINT_TIMEOUT instead

The hint key for specifying a query timeout per Hibernate O/RM, which defines the timeout in seconds.

Annotations
@Deprecated
HINTSback to summary
private static final Set<String> HINTS
JAKARTA_HINT_FETCHGRAPHback to summary
public static final String JAKARTA_HINT_FETCHGRAPH

Hint providing a "fetchgraph" EntityGraph. Attributes explicitly specified as AttributeNodes are treated as FetchType.EAGER (via join fetch or subsequent select).

Note

Currently, attributes that are not specified are treated as FetchType.LAZY or FetchType.EAGER depending on the attribute's definition in metadata, rather than forcing FetchType.LAZY.

JAKARTA_HINT_LOADGRAPHback to summary
public static final String JAKARTA_HINT_LOADGRAPH

Hint providing a "loadgraph" EntityGraph. Attributes explicitly specified as AttributeNodes are treated as FetchType.EAGER (via join fetch or subsequent select). Attributes that are not specified are treated as FetchType.LAZY or FetchType.EAGER depending on the attribute's definition in metadata

JAKARTA_SPEC_HINT_TIMEOUTback to summary
public static final String JAKARTA_SPEC_HINT_TIMEOUT

The hint key for specifying a query timeout per JPA, which defines the timeout in milliseconds

SPEC_HINT_TIMEOUTback to summary
public static final String SPEC_HINT_TIMEOUT

The hint key for specifying a query timeout per JPA, which defines the timeout in milliseconds

Constructor Detail

QueryHintsback to summary
protected QueryHints()

Method Detail

buildHintsSetback to summary
private static Set<String> buildHintsSet()
getDefinedHintsback to summary
public static Set<String> getDefinedHints()