Class QueryHints


  • public class QueryHints
    extends java.lang.Object
    Consolidation of hints available to Hibernate JPA queries. Mainly used to define features available on Hibernate queries that have no corollary in JPA queries.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CACHE_MODE
      The cache mode to use.
      static java.lang.String CACHE_REGION
      The cache region to use.
      static java.lang.String CACHEABLE
      Are the query results cacheable?
      static java.lang.String CALLABLE
      Is the query callable? Note: only valid for named native sql queries.
      static java.lang.String COMMENT
      Defines a comment to be applied to the SQL sent to the database.
      static java.lang.String FETCH_SIZE
      Defines the JDBC fetch size to use.
      static java.lang.String FETCHGRAPH
      Hint providing a "fetchgraph" EntityGraph.
      static java.lang.String FLUSH_MODE
      The flush mode to associate with the execution of the query.
      static java.lang.String FOLLOW_ON_LOCKING
      Hint to enable/disable the follow-on-locking mechanism provided by Dialect.useFollowOnLocking(QueryParameters).
      static java.lang.String LOADGRAPH
      Hint providing a "loadgraph" EntityGraph.
      static java.lang.String NATIVE_LOCKMODE
      Available to apply lock mode to a native SQL query since JPA requires that Query.setLockMode(javax.persistence.LockModeType) throw an IllegalStateException if called for a native query.
      static java.lang.String NATIVE_SPACES
      Hint for specifying query spaces to be applied to a native (SQL) query.
      static java.lang.String PASS_DISTINCT_THROUGH
      Hint to enable/disable the pass-distinct-through mechanism.
      static java.lang.String READ_ONLY
      Should entities returned from the query be set in read only mode?
      static java.lang.String TIMEOUT_HIBERNATE
      Apply a Hibernate query timeout, which is defined in seconds.
      static java.lang.String TIMEOUT_JPA
      Apply a JPA query timeout, which is defined in milliseconds.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait