Package org.hibernate.jpa
Interface HibernateHints
-
- All Known Subinterfaces:
AvailableHints
public interface HibernateHintsList of Hibernate-specific (extension) hints available to query, load and lock scenarios. Some hints are only effective in certain scenarios, which is noted on each constant's documentation
-
-
Field Summary
Fields Modifier and Type Field Description static StringHINT_CACHE_MODEHint for specifying theCacheModeto usestatic StringHINT_CACHE_REGIONHint for specifying the region of the query cache into which the results should be storedstatic StringHINT_CACHEABLEHint for specifying whether results from a query should be stored in the query cachestatic StringHINT_CALLABLE_FUNCTIONWhether to treat aProcedureCallorStoredProcedureQueryas a call to a function rather than a call to a procedurestatic StringHINT_COMMENTHint for specifying a database comment to be applied to the SQL sent to the database.static StringHINT_FETCH_SIZEHint for specifying a fetch size to be applied to the JDBC statement.static StringHINT_FLUSH_MODEHint for specifying theFlushModeto apply to an EntityManager or a Querystatic StringHINT_FOLLOW_ON_LOCKINGHint to enable/disable the follow-on-locking mechanism provided byDialect.useFollowOnLocking(String, org.hibernate.query.spi.QueryOptions).static StringHINT_NATIVE_LOCK_MODEHint for specifying the lock-mode to apply to the results from a native-query.static StringHINT_NATIVE_SPACESHint for specifying query spaces to be applied to a NativeQuery.static StringHINT_READ_ONLYHint for specifying that objects loaded into the persistence context as a result of a query should be associated with the persistence context as read-only.static StringHINT_TIMEOUTHint for specifying a Query timeout, in seconds.
-
-
-
Field Detail
-
HINT_FLUSH_MODE
static final String HINT_FLUSH_MODE
Hint for specifying theFlushModeto apply to an EntityManager or a Query
-
HINT_TIMEOUT
static final String HINT_TIMEOUT
Hint for specifying a Query timeout, in seconds.
-
HINT_READ_ONLY
static final String HINT_READ_ONLY
Hint for specifying that objects loaded into the persistence context as a result of a query should be associated with the persistence context as read-only.
-
HINT_FETCH_SIZE
static final String HINT_FETCH_SIZE
Hint for specifying a fetch size to be applied to the JDBC statement.
-
HINT_CACHEABLE
static final String HINT_CACHEABLE
Hint for specifying whether results from a query should be stored in the query cache- See Also:
Query.setCacheable(boolean), Constant Field Values
-
HINT_CACHE_REGION
static final String HINT_CACHE_REGION
Hint for specifying the region of the query cache into which the results should be stored- See Also:
Query.setCacheRegion(java.lang.String), Constant Field Values- "Implementation Specification:"
- No effect unless
HINT_CACHEABLEis set totrue
-
HINT_CACHE_MODE
static final String HINT_CACHE_MODE
Hint for specifying theCacheModeto use- See Also:
Query.setCacheMode(org.hibernate.CacheMode), Constant Field Values- "Implementation Specification:"
- No effect unless
HINT_CACHEABLEis set totrue
-
HINT_COMMENT
static final String HINT_COMMENT
Hint for specifying a database comment to be applied to the SQL sent to the database.- See Also:
Query.setComment(java.lang.String), Constant Field Values- "Implementation Specification:"
- Not valid for
ProcedureCallnorStoredProcedureQueryscenarios
-
HINT_FOLLOW_ON_LOCKING
static final String HINT_FOLLOW_ON_LOCKING
Hint to enable/disable the follow-on-locking mechanism provided byDialect.useFollowOnLocking(String, org.hibernate.query.spi.QueryOptions). A value oftrueenables follow-on-locking, whereas a value offalsedisables it. If the value isnull, theDialect's default strategy is used.- Since:
- 5.2
- See Also:
- Constant Field Values
-
HINT_NATIVE_LOCK_MODE
static final String HINT_NATIVE_LOCK_MODE
Hint for specifying the lock-mode to apply to the results from a native-query. While Hibernate supports applying lock-mode to a natove-query, the specification requires thatQuery.setLockMode(jakarta.persistence.LockModeType)throw anIllegalStateExceptionif called for a native query. Accepts aLockModeTypeor aLockMode- See Also:
- Constant Field Values
-
HINT_NATIVE_SPACES
static final String HINT_NATIVE_SPACES
Hint for specifying query spaces to be applied to a NativeQuery. Passed value can be any of:- List of the spaces
- array of the spaces
- String as "whitespace"-separated list of the spaces
SynchronizeableQueryandFlushMode.MANUALfor more information.- See Also:
SynchronizeableQuery,HINT_FLUSH_MODE, Constant Field Values
-
HINT_CALLABLE_FUNCTION
static final String HINT_CALLABLE_FUNCTION
Whether to treat aProcedureCallorStoredProcedureQueryas a call to a function rather than a call to a procedure- See Also:
- Constant Field Values
-
-