Package org.hibernate.cache.spi
Class QueryKey
- java.lang.Object
-
- org.hibernate.cache.spi.QueryKey
-
- All Implemented Interfaces:
java.io.Serializable
public class QueryKey extends java.lang.Object implements java.io.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
static QueryKey
generateQueryKey(java.lang.String queryString, QueryParameters queryParameters, java.util.Set filterKeys, SharedSessionContractImplementor session, CacheableResultTransformer customTransformer)
Generates a QueryKey.java.util.Map
getNamedParameters()
Provide (unmodifiable) access to the named parameters that are part of this query.CacheableResultTransformer
getResultTransformer()
Provides access to the explicitly user-provided result transformer.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
generateQueryKey
public static QueryKey generateQueryKey(java.lang.String queryString, QueryParameters queryParameters, java.util.Set filterKeys, SharedSessionContractImplementor session, CacheableResultTransformer customTransformer)
Generates a QueryKey.- Parameters:
queryString
- The sql query string.queryParameters
- The query parametersfilterKeys
- 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.- Returns:
- The generate query cache key.
-
getResultTransformer
public CacheableResultTransformer getResultTransformer()
Provides access to the explicitly user-provided result transformer.- Returns:
- The result transformer.
-
getNamedParameters
public java.util.Map getNamedParameters()
Provide (unmodifiable) access to the named parameters that are part of this query.- Returns:
- The (unmodifiable) map of named parameters
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-