Class HQLQueryPlan

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    FilterQueryPlan

    public class HQLQueryPlan
    extends java.lang.Object
    implements java.io.Serializable
    Defines a query execution plan for an HQL query (or filter).
    See Also:
    Serialized Form
    • Constructor Detail

      • HQLQueryPlan

        public HQLQueryPlan​(java.lang.String hql,
                            boolean shallow,
                            java.util.Map<java.lang.String,​Filter> enabledFilters,
                            SessionFactoryImplementor factory)
        Constructs a HQLQueryPlan
        Parameters:
        hql - The HQL query
        shallow - Whether the execution is to be shallow or not
        enabledFilters - The enabled filters (we only keep the names)
        factory - The factory
      • HQLQueryPlan

        protected HQLQueryPlan​(java.lang.String hql,
                               java.lang.String collectionRole,
                               boolean shallow,
                               java.util.Map<java.lang.String,​Filter> enabledFilters,
                               SessionFactoryImplementor factory,
                               EntityGraphQueryHint entityGraphQueryHint)
    • Method Detail

      • getSourceQuery

        public java.lang.String getSourceQuery()
      • getQuerySpaces

        public java.util.Set getQuerySpaces()
      • getParameterMetadata

        public org.hibernate.query.internal.ParameterMetadataImpl getParameterMetadata()
      • getEnabledFilterNames

        public java.util.Set getEnabledFilterNames()
      • getSqlStrings

        public java.lang.String[] getSqlStrings()
      • getUtilizedFilterNames

        public java.util.Set getUtilizedFilterNames()
      • isShallow

        public boolean isShallow()
      • performIterate

        public java.util.Iterator performIterate​(QueryParameters queryParameters,
                                                 EventSource session)
                                          throws HibernateException
        Coordinates the efforts to perform an iterate across all the included query translators.
        Parameters:
        queryParameters - The query parameters
        session - The session
        Returns:
        The query result iterator
        Throws:
        HibernateException - Indicates a problem performing the query
      • performExecuteUpdate

        public int performExecuteUpdate​(QueryParameters queryParameters,
                                        SharedSessionContractImplementor session)
                                 throws HibernateException
        Coordinates the efforts to perform an execution across all the included query translators.
        Parameters:
        queryParameters - The query parameters
        session - The session
        Returns:
        The aggregated "affected row" count
        Throws:
        HibernateException - Indicates a problem performing the execution
      • getTranslators

        public QueryTranslator[] getTranslators()
        Access to the underlying translators associated with this query
        Returns:
        The translators
      • getDynamicInstantiationResultType

        public java.lang.Class getDynamicInstantiationResultType()
      • isSelect

        public boolean isSelect()
      • isUpdate

        public boolean isUpdate()