Class QueryKey

  • All Implemented Interfaces:

    public class QueryKey
    extends Object
    implements Serializable
    A key that identifies a particular query with bound parameter values. This is the object Hibernate uses as its key into its query cache.
    See Also:
    Serialized Form
    • Method Detail

      • generateQueryKey

        public static QueryKey generateQueryKey​(String queryString,
                                                QueryParameters queryParameters,
                                                Set filterKeys,
                                                SharedSessionContractImplementor session,
                                                CacheableResultTransformer customTransformer)
        Generates a QueryKey.
        queryString - The sql query string.
        queryParameters - The query parameters
        filterKeys - The keys of any enabled filters.
        session - The current session.
        customTransformer - The result transformer; should be null if data is not transformed before being cached.
        The generate query cache key.
      • getResultTransformer

        public CacheableResultTransformer getResultTransformer()
        Provides access to the explicitly user-provided result transformer.
        The result transformer.
      • getNamedParameters

        public Map getNamedParameters()
        Provide (unmodifiable) access to the named parameters that are part of this query.
        The (unmodifiable) map of named parameters
      • hashCode

        public int hashCode()
        hashCode in class Object