Package org.hibernate.cache.spi
Class QueryKey
- java.lang.Object
-
- org.hibernate.cache.spi.QueryKey
-
- All Implemented Interfaces:
Serializable
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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)static QueryKeygenerateQueryKey(String queryString, QueryParameters queryParameters, Set filterKeys, SharedSessionContractImplementor session, CacheableResultTransformer customTransformer)Generates a QueryKey.MapgetNamedParameters()Provide (unmodifiable) access to the named parameters that are part of this query.CacheableResultTransformergetResultTransformer()Provides access to the explicitly user-provided result transformer.inthashCode()StringtoString()
-
-
-
Method Detail
-
generateQueryKey
public static QueryKey generateQueryKey(String queryString, QueryParameters queryParameters, 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 Map getNamedParameters()
Provide (unmodifiable) access to the named parameters that are part of this query.- Returns:
- The (unmodifiable) map of named parameters
-
-