Class AbstractHibernateSQLQuery<T,​Q extends AbstractHibernateSQLQuery<T,​Q>>

    • Field Detail

      • cacheable

        protected java.lang.Boolean cacheable
      • readOnly

        protected java.lang.Boolean readOnly
      • cacheRegion

        protected java.lang.String cacheRegion
      • fetchSize

        protected int fetchSize
      • timeout

        protected int timeout
    • Constructor Detail

      • AbstractHibernateSQLQuery

        public AbstractHibernateSQLQuery​(org.hibernate.Session session,
                                         Configuration conf)
      • AbstractHibernateSQLQuery

        public AbstractHibernateSQLQuery​(org.hibernate.StatelessSession session,
                                         Configuration conf)
    • Method Detail

      • createQuery

        public org.hibernate.query.Query createQuery()
      • iterate

        public com.mysema.commons.lang.CloseableIterator<T> iterate()
      • stream

        public java.util.stream.Stream<T> stream()
      • logQuery

        protected void logQuery​(java.lang.String queryString)
      • reset

        protected void reset()
      • setCacheable

        public Q setCacheable​(boolean cacheable)
        Enable caching of this query result set.
        Parameters:
        cacheable - Should the query results be cacheable?
      • setCacheRegion

        public Q setCacheRegion​(java.lang.String cacheRegion)
        Set the name of the cache region.
        Parameters:
        cacheRegion - the name of a query cache region, or null for the default query cache
      • setFetchSize

        public Q setFetchSize​(int fetchSize)
        Set a fetchJoin size for the underlying JDBC query.
        Parameters:
        fetchSize - the fetchJoin size
      • setReadOnly

        public Q setReadOnly​(boolean readOnly)
        Entities retrieved by this query will be loaded in a read-only mode where Hibernate will never dirty-check them or make changes persistent.
      • setTimeout

        public Q setTimeout​(int timeout)
        Set a timeout for the underlying JDBC query.
        Parameters:
        timeout - the timeout in seconds
      • clone

        public Q clone​(org.hibernate.Session session)
      • clone

        public Q clone​(org.hibernate.StatelessSession statelessSession)