Interface QueryHints


public interface QueryHints
Standard query hint keys.
  • Field Details

    • HINT_SUBCLASSES

      static final String HINT_SUBCLASSES
      See Also:
    • HINT_FILTER_LISTENER

      static final String HINT_FILTER_LISTENER
      See Also:
    • HINT_FILTER_LISTENERS

      static final String HINT_FILTER_LISTENERS
      See Also:
    • HINT_AGGREGATE_LISTENER

      static final String HINT_AGGREGATE_LISTENER
      See Also:
    • HINT_AGGREGATE_LISTENERS

      static final String HINT_AGGREGATE_LISTENERS
      See Also:
    • HINT_RESULT_COUNT

      static final String HINT_RESULT_COUNT
      Hint to specify the number of rows to optimize for.
      See Also:
    • HINT_PARAM_MARKER_IN_QUERY

      static final String HINT_PARAM_MARKER_IN_QUERY
      Hints to signal that the JPQL/SQL query string contains a parameter marker ? character. By default, the query string is parsed to count number of parameters assuming that all ? characters designate a bind parameter. This assumption makes the parse faster.
      See Also:
    • HINT_INVALIDATE_PREPARED_QUERY

      static final String HINT_INVALIDATE_PREPARED_QUERY
      A directive to invalidate any prepared SQL that might have been cached against a JPQL query. The target SQL corresponding to a JPQL depends on several context parameters such as fetch configuration, lock mode etc. If a query is executed repeatedly and hence its SQL is cached for faster execution then if any of the contextual parameters change across query execution then the user must supply this hint to invalidate the cached SQL query. The alternative to monitor any such change for automatic invalidation has a constant performance penalty for the frequent use case where a query is repeatedly executed in different persistent context with the same fetch plan or locking.
      See Also:
    • HINT_IGNORE_PREPARED_QUERY

      static final String HINT_IGNORE_PREPARED_QUERY
      A directive to ignore any prepared SQL that might have been cached against a JPQL query. The target SQL corresponding to a JPQL depends on several context parameters such as fetch configuration, lock mode etc. If a query is executed repeatedly and hence its SQL is cached for faster execution then if any of the contextual parameters change across query execution then the user must supply this hint to ignore the cached SQL query for the current execution. This is in contrast with invalidation hint that removes the cached version from cache altogether. The cached SQL is retained and subsequent execution of the same query string without this hint will reuse the cached SQL.
      See Also:
    • HINT_IGNORE_FINDER

      static final String HINT_IGNORE_FINDER
      A directive to ignore any cached finder query for find() operation. The cached entry, if any, remains in the cache.
      See Also:
    • HINT_INVALIDATE_FINDER

      static final String HINT_INVALIDATE_FINDER
      A directive to invalidate any cached finder query.
      See Also:
    • HINT_RECACHE_FINDER

      static final String HINT_RECACHE_FINDER
      A directive to overwrite a cached finder query by a new query.
      See Also:
    • HINT_RELAX_BIND_PARAM_TYPE_CHECK

      static final String HINT_RELAX_BIND_PARAM_TYPE_CHECK
      A boolean directive to relax checking of binding parameter value and the predicate it binds to.
      See Also:
    • HINT_USE_LITERAL_IN_SQL

      static final String HINT_USE_LITERAL_IN_SQL
      A boolean directive to generate literal directly into the SQL statement instead of using position parameter, if possible.
      See Also: