类 QueryKey

  • 所有已实现的接口:
    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.
    作者:
    Gavin King, Steve Ebersole
    另请参阅:
    序列化表格
    • 方法详细资料

      • 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 在类中 Object