类 AbstractProducedQuery<R>

    • 方法详细资料

      • getFlushMode

        public javax.persistence.FlushModeType getFlushMode()
        从接口复制的说明: Query
        For users of the Hibernate native APIs, we've had to rename this method as defined by Hibernate historically because the JPA contract defines a method of the same name, but returning the JPA FlushModeType rather than Hibernate's FlushMode. For the former behavior, use Query.getHibernateFlushMode() instead.
        指定者:
        getFlushMode 在接口中 javax.persistence.Query
        指定者:
        getFlushMode 在接口中 Query<R>
        返回:
        The FlushModeType in effect for this query.
      • setFlushMode

        public QueryImplementor setFlushMode​(javax.persistence.FlushModeType flushModeType)
        指定者:
        setFlushMode 在接口中 javax.persistence.Query
        指定者:
        setFlushMode 在接口中 Query<R>
        指定者:
        setFlushMode 在接口中 Query<R>
        指定者:
        setFlushMode 在接口中 javax.persistence.TypedQuery<R>
      • isCacheable

        public boolean isCacheable()
        从接口复制的说明: Query
        Are the results of this query eligible for second level query caching? This is different than second level caching of any returned entities and collections. NOTE: the query being "eligible" for caching does not necessarily mean its results will be cached. Second level query caching still has to be enabled on the SessionFactory for this to happen. Usually that is controlled by the hibernate.cache.use_query_cache configuration setting.
        指定者:
        isCacheable 在接口中 BasicQueryContract<R>
        指定者:
        isCacheable 在接口中 Query<R>
        返回:
        true if the query results are eligible for caching, false otherwise.
        另请参阅:
        AvailableSettings.USE_QUERY_CACHE
      • getCacheRegion

        public String getCacheRegion()
        从接口复制的说明: Query
        Obtain the name of the second level query cache region in which query results will be stored (if they are cached, see the discussion on Query.isCacheable() for more information). null indicates that the default region should be used.
        指定者:
        getCacheRegion 在接口中 BasicQueryContract<R>
        指定者:
        getCacheRegion 在接口中 Query<R>
        指定者:
        getCacheRegion 在接口中 Query<R>
        返回:
        The specified cache region name into which query results should be placed; null indicates the default region.
      • setTimeout

        public QueryImplementor setTimeout​(int timeout)
        从接口复制的说明: Query
        Set the query timeout in seconds. NOTE it is important to understand that any value set here is eventually passed directly through to the JDBC Statement which expressly disallows negative values. So negative values should be avoided as a general rule.
        指定者:
        setTimeout 在接口中 BasicQueryContract<R>
        指定者:
        setTimeout 在接口中 Query<R>
        指定者:
        setTimeout 在接口中 Query<R>
        参数:
        timeout - the timeout in seconds
        返回:
        this, for method chaining
        另请参阅:
        Query.getTimeout()
      • setLockMode

        public QueryImplementor setLockMode​(String alias,
                                            LockMode lockMode)
        从接口复制的说明: Query
        Set the LockMode to use for specific alias (as defined in the query's FROM clause). The alias-specific lock modes specified here are added to the query's internal LockOptions. The effect of these alias-specific LockModes is somewhat dependent on the driver/database in use. Generally speaking, for maximum portability, this method should only be used to mark that the rows corresponding to the given alias should be included in pessimistic locking (LockMode.PESSIMISTIC_WRITE).
        指定者:
        setLockMode 在接口中 Query<R>
        指定者:
        setLockMode 在接口中 Query<R>
        参数:
        alias - a query alias, or "this" for a collection filter
        lockMode - The lock mode to apply.
        返回:
        this, for method chaining
        另请参阅:
        Query.getLockOptions()
      • setLockMode

        public QueryImplementor setLockMode​(javax.persistence.LockModeType lockModeType)
        指定者:
        setLockMode 在接口中 javax.persistence.Query
        指定者:
        setLockMode 在接口中 Query<R>
        指定者:
        setLockMode 在接口中 Query<R>
        指定者:
        setLockMode 在接口中 javax.persistence.TypedQuery<R>
      • getComment

        public String getComment()
        从接口复制的说明: Query
        Obtain the comment currently associated with this query. Provided SQL commenting is enabled (generally by enabling the hibernate.use_sql_comments config setting), this comment will also be added to the SQL query sent to the database. Often useful for identifying the source of troublesome queries on the database side.
        指定者:
        getComment 在接口中 Query<R>
        指定者:
        getComment 在接口中 Query<R>
        返回:
        The comment.
      • addQueryHint

        public QueryImplementor addQueryHint​(String hint)
        从接口复制的说明: Query
        Add a DB query hint to the SQL. These differ from JPA's QueryHint, which is specific to the JPA implementation and ignores DB vendor-specific hints. Instead, these are intended solely for the vendor-specific hints, such as Oracle's optimizers. Multiple query hints are supported; the Dialect will determine concatenation and placement.
        指定者:
        addQueryHint 在接口中 Query<R>
        指定者:
        addQueryHint 在接口中 Query<R>
        参数:
        hint - The database specific query hint to add.
      • getNamedParameters

        public String[] getNamedParameters()
        从接口复制的说明: Query
        Return the names of all named parameters of the query.
        指定者:
        getNamedParameters 在接口中 Query<R>
        返回:
        the parameter names, in no particular order
      • setParameter

        public <P> QueryImplementor setParameter​(QueryParameter<P> parameter,
                                                 P value)
        从接口复制的说明: Query
        Bind a query parameter using its inferred Type. If the parameter is defined in such a way that the Type cannot be inferred from its usage context then use of this form of binding is not allowed, and Query.setParameter(QueryParameter, Object, Type) should be used instead
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        参数:
        parameter - The query parameter memento
        value - the possibly-null parameter value
        返回:
        this, for method chaining
      • setParameter

        public <P> QueryImplementor setParameter​(javax.persistence.Parameter<P> parameter,
                                                 P value)
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
      • setParameter

        public QueryImplementor setParameter​(String name,
                                             Object value)
        从接口复制的说明: Query
        Bind a named query parameter using its inferred Type. If the parameter is defined in such a way that the Type cannot be inferred from its usage context then use of this form of binding is not allowed, and Query.setParameter(String, Object, Type) should be used instead
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
        参数:
        name - the parameter name
        value - the (possibly-null) parameter value
        返回:
        this, for method chaining
      • setParameter

        public QueryImplementor setParameter​(int position,
                                             Object value)
        从接口复制的说明: Query
        Bind a positional query parameter using its inferred Type. If the parameter is defined in such a way that the Type cannot be inferred from its usage context then use of this form of binding is not allowed, and Query.setParameter(int, Object, Type) should be used instead
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
        参数:
        position - the position of the parameter in the query string, numbered from 0.
        value - the possibly-null parameter value
        返回:
        this, for method chaining
      • setParameter

        public <P> QueryImplementor setParameter​(QueryParameter<P> parameter,
                                                 P value,
                                                 Type type)
        从接口复制的说明: Query
        Bind a query parameter using the supplied Type
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        参数:
        parameter - The query parameter memento
        value - the possibly-null parameter value
        type - the Hibernate type
        返回:
        this, for method chaining
      • setParameter

        public QueryImplementor setParameter​(String name,
                                             Object value,
                                             Type type)
        从接口复制的说明: Query
        Bind a named query parameter using the supplied Type
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        参数:
        name - the name of the parameter
        value - the possibly-null parameter value
        type - the Hibernate type
        返回:
        this, for method chaining
      • setParameter

        public QueryImplementor setParameter​(int position,
                                             Object value,
                                             Type type)
        从接口复制的说明: Query
        Bind a value to a JDBC-style query parameter.
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        参数:
        position - the position of the parameter in the query string, numbered from 0.
        value - the possibly-null parameter value
        type - the Hibernate type
        返回:
        this, for method chaining
      • setParameter

        public <P> QueryImplementor setParameter​(QueryParameter<P> parameter,
                                                 P value,
                                                 javax.persistence.TemporalType temporalType)
        从接口复制的说明: Query
        Bind a query parameter as some form of date/time using the indicated temporal-type.
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        参数:
        parameter - The query parameter memento
        value - the possibly-null parameter value
        temporalType - the temporal-type to use in binding the date/time
        返回:
        this, for method chaining
      • setParameter

        public QueryImplementor setParameter​(String name,
                                             Object value,
                                             javax.persistence.TemporalType temporalType)
        从接口复制的说明: Query
        Bind a named query parameter as some form of date/time using the indicated temporal-type.
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        参数:
        name - the parameter name
        value - the possibly-null parameter value
        temporalType - the temporal-type to use in binding the date/time
        返回:
        this, for method chaining
      • setParameter

        public QueryImplementor setParameter​(int position,
                                             Object value,
                                             javax.persistence.TemporalType temporalType)
        从接口复制的说明: Query
        Bind a positional query parameter as some form of date/time using the indicated temporal-type.
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        参数:
        position - the position of the parameter in the query string, numbered from 0.
        value - the possibly-null parameter value
        temporalType - the temporal-type to use in binding the date/time
        返回:
        this, for method chaining
      • setParameterList

        public <P> QueryImplementor<R> setParameterList​(QueryParameter<P> parameter,
                                                        Collection<P> values)
        从接口复制的说明: Query
        Bind multiple values to a query parameter using its inferred Type. The Hibernate type of the parameter values is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the first object in the collection. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
        指定者:
        setParameterList 在接口中 Query<R>
        指定者:
        setParameterList 在接口中 Query<R>
        参数:
        parameter - the parameter memento
        values - a collection of values to list
        返回:
        this, for method chaining
      • setParameterList

        public QueryImplementor setParameterList​(String name,
                                                 Collection values)
        从接口复制的说明: Query
        Bind multiple values to a named query parameter. The Hibernate type of the parameter is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the first object in the collection. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
        指定者:
        setParameterList 在接口中 Query<R>
        指定者:
        setParameterList 在接口中 Query<R>
        参数:
        name - the name of the parameter
        values - a collection of values to list
        返回:
        this, for method chaining
      • setParameterList

        public QueryImplementor setParameterList​(String name,
                                                 Collection values,
                                                 Type type)
        从接口复制的说明: Query
        Bind multiple values to a named query parameter. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
        指定者:
        setParameterList 在接口中 Query<R>
        指定者:
        setParameterList 在接口中 Query<R>
        参数:
        name - the name of the parameter
        values - a collection of values to list
        type - the Hibernate type of the values
        返回:
        this, for method chaining
      • setParameterList

        public QueryImplementor setParameterList​(String name,
                                                 Object[] values,
                                                 Type type)
        从接口复制的说明: Query
        Bind multiple values to a named query parameter. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
        指定者:
        setParameterList 在接口中 Query<R>
        指定者:
        setParameterList 在接口中 Query<R>
        参数:
        name - the name of the parameter
        values - a collection of values to list
        type - the Hibernate type of the values
        返回:
        this, for method chaining
      • setParameterList

        public QueryImplementor setParameterList​(String name,
                                                 Object[] values)
        从接口复制的说明: Query
        Bind multiple values to a named query parameter. The Hibernate type of the parameter is first detected via the usage/position in the query and if not sufficient secondly guessed from the class of the first object in the array. This is useful for binding a list of values to an expression such as foo.bar in (:value_list).
        指定者:
        setParameterList 在接口中 Query<R>
        指定者:
        setParameterList 在接口中 Query<R>
        参数:
        name - the name of the parameter
        values - a collection of values to list
        返回:
        this, for method chaining
      • setParameter

        public QueryImplementor setParameter​(javax.persistence.Parameter<Calendar> param,
                                             Calendar value,
                                             javax.persistence.TemporalType temporalType)
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
      • setParameter

        public QueryImplementor setParameter​(javax.persistence.Parameter<Date> param,
                                             Date value,
                                             javax.persistence.TemporalType temporalType)
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
      • setParameter

        public QueryImplementor setParameter​(String name,
                                             Calendar value,
                                             javax.persistence.TemporalType temporalType)
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
      • setParameter

        public QueryImplementor setParameter​(String name,
                                             Date value,
                                             javax.persistence.TemporalType temporalType)
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
      • setParameter

        public QueryImplementor setParameter​(int position,
                                             Calendar value,
                                             javax.persistence.TemporalType temporalType)
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
      • setParameter

        public QueryImplementor setParameter​(int position,
                                             Date value,
                                             javax.persistence.TemporalType temporalType)
        指定者:
        setParameter 在接口中 javax.persistence.Query
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 Query<R>
        指定者:
        setParameter 在接口中 javax.persistence.TypedQuery<R>
      • getParameters

        public Set<javax.persistence.Parameter<?>> getParameters()
        指定者:
        getParameters 在接口中 javax.persistence.Query
      • getParameter

        public QueryParameter<?> getParameter​(String name)
        指定者:
        getParameter 在接口中 javax.persistence.Query
      • getParameter

        public <T> QueryParameter<T> getParameter​(String name,
                                                  Class<T> type)
        指定者:
        getParameter 在接口中 javax.persistence.Query
      • getParameter

        public QueryParameter<?> getParameter​(int position)
        指定者:
        getParameter 在接口中 javax.persistence.Query
      • getParameter

        public <T> QueryParameter<T> getParameter​(int position,
                                                  Class<T> type)
        指定者:
        getParameter 在接口中 javax.persistence.Query
      • isBound

        public boolean isBound​(javax.persistence.Parameter<?> parameter)
        指定者:
        isBound 在接口中 javax.persistence.Query
      • getParameterValue

        public <T> T getParameterValue​(javax.persistence.Parameter<T> parameter)
        指定者:
        getParameterValue 在接口中 javax.persistence.Query
      • getParameterValue

        public Object getParameterValue​(String name)
        指定者:
        getParameterValue 在接口中 javax.persistence.Query
      • getParameterValue

        public Object getParameterValue​(int position)
        指定者:
        getParameterValue 在接口中 javax.persistence.Query
      • setProperties

        public QueryImplementor setProperties​(Object bean)
        从接口复制的说明: Query
        Bind the property values of the given bean to named parameters of the query, matching property names with parameter names and mapping property types to Hibernate types using heuristics.
        指定者:
        setProperties 在接口中 Query<R>
        指定者:
        setProperties 在接口中 Query<R>
        参数:
        bean - any JavaBean or POJO
        返回:
        this, for method chaining
      • determineType

        protected Type determineType​(String namedParam,
                                     Class retType)
      • setProperties

        public QueryImplementor setProperties​(Map map)
        从接口复制的说明: Query
        Bind the values of the given Map for each named parameters of the query, matching key names with parameter names and mapping value types to Hibernate types using heuristics.
        指定者:
        setProperties 在接口中 Query<R>
        指定者:
        setProperties 在接口中 Query<R>
        参数:
        map - a java.util.Map
        返回:
        this, for method chaining
      • getQueryOptions

        public RowSelection getQueryOptions()
        从接口复制的说明: Query
        "QueryOptions" is a better name, I think, than "RowSelection" -> 6.0
        指定者:
        getQueryOptions 在接口中 Query<R>
        返回:
        Return the encapsulation of this query's options, which includes access to firstRow, maxRows, timeout and fetchSize. Important because this gives access to those values in their Integer form rather than the primitive form (int) required by JPA.
      • getMaxResults

        public int getMaxResults()
        指定者:
        getMaxResults 在接口中 javax.persistence.Query
      • setMaxResults

        public QueryImplementor setMaxResults​(int maxResult)
        指定者:
        setMaxResults 在接口中 javax.persistence.Query
        指定者:
        setMaxResults 在接口中 Query<R>
        指定者:
        setMaxResults 在接口中 Query<R>
        指定者:
        setMaxResults 在接口中 javax.persistence.TypedQuery<R>
      • getFirstResult

        public int getFirstResult()
        指定者:
        getFirstResult 在接口中 javax.persistence.Query
      • setFirstResult

        public QueryImplementor setFirstResult​(int startPosition)
        指定者:
        setFirstResult 在接口中 javax.persistence.Query
        指定者:
        setFirstResult 在接口中 Query<R>
        指定者:
        setFirstResult 在接口中 Query<R>
        指定者:
        setFirstResult 在接口中 javax.persistence.TypedQuery<R>
      • getSupportedHints

        public Set<String> getSupportedHints()
      • getHints

        public Map<String,​Object> getHints()
        指定者:
        getHints 在接口中 javax.persistence.Query
      • collectBaselineHints

        protected void collectBaselineHints​(Map<String,​Object> hints)
      • collectHints

        protected void collectHints​(Map<String,​Object> hints)
      • setHint

        public QueryImplementor setHint​(String hintName,
                                        Object value)
        指定者:
        setHint 在接口中 javax.persistence.Query
        指定者:
        setHint 在接口中 Query<R>
        指定者:
        setHint 在接口中 Query<R>
        指定者:
        setHint 在接口中 javax.persistence.TypedQuery<R>
      • handleUnrecognizedHint

        protected void handleUnrecognizedHint​(String hintName,
                                              Object value)
      • applyJpaCacheRetrieveMode

        protected boolean applyJpaCacheRetrieveMode​(javax.persistence.CacheRetrieveMode mode)
      • applyJpaCacheStoreMode

        protected boolean applyJpaCacheStoreMode​(javax.persistence.CacheStoreMode storeMode)
      • applyNativeQueryLockMode

        protected boolean applyNativeQueryLockMode​(Object value)
      • applyTimeoutHint

        protected boolean applyTimeoutHint​(int timeout)
        Apply the query timeout hint.
        参数:
        timeout - The timeout (in seconds!) specified as a hint
        返回:
        true if the hint was "applied"
      • applyLockTimeoutHint

        protected boolean applyLockTimeoutHint​(int timeout)
        Apply the lock timeout (in seconds!) hint
        参数:
        timeout - The timeout (in seconds!) specified as a hint
        返回:
        true if the hint was "applied"
      • applyCommentHint

        protected boolean applyCommentHint​(String comment)
        Apply the comment hint.
        参数:
        comment - The comment specified as a hint
        返回:
        true if the hint was "applied"
      • applyFetchSizeHint

        protected boolean applyFetchSizeHint​(int fetchSize)
        Apply the fetch size hint
        参数:
        fetchSize - The fetch size specified as a hint
        返回:
        true if the hint was "applied"
      • applyCacheableHint

        protected boolean applyCacheableHint​(boolean isCacheable)
        Apply the cacheable (true/false) hint.
        参数:
        isCacheable - The value specified as hint
        返回:
        true if the hint was "applied"
      • applyCacheRegionHint

        protected boolean applyCacheRegionHint​(String regionName)
        Apply the cache region hint
        参数:
        regionName - The name of the cache region specified as a hint
        返回:
        true if the hint was "applied"
      • applyReadOnlyHint

        protected boolean applyReadOnlyHint​(boolean isReadOnly)
        Apply the read-only (true/false) hint.
        参数:
        isReadOnly - The value specified as hint
        返回:
        true if the hint was "applied"
      • applyCacheModeHint

        protected boolean applyCacheModeHint​(CacheMode cacheMode)
        Apply the CacheMode hint.
        参数:
        cacheMode - The CacheMode value specified as a hint.
        返回:
        true if the hint was "applied"
      • applyFlushModeHint

        protected boolean applyFlushModeHint​(FlushMode flushMode)
        Apply the FlushMode hint.
        参数:
        flushMode - The FlushMode value specified as hint
        返回:
        true if the hint was "applied"
      • canApplyAliasSpecificLockModeHints

        protected boolean canApplyAliasSpecificLockModeHints()
        Can alias-specific lock modes be applied?
        返回:
        true indicates they can be applied, false otherwise.
      • applyLockModeTypeHint

        protected boolean applyLockModeTypeHint​(javax.persistence.LockModeType lockModeType)
      • applyHibernateLockModeHint

        protected boolean applyHibernateLockModeHint​(LockMode lockMode)
      • applyAliasSpecificLockModeHint

        protected void applyAliasSpecificLockModeHint​(String alias,
                                                      LockMode lockMode)
        Apply the alias specific lock modes. Assumes canApplyAliasSpecificLockModeHints() has already been called and returned true.
        参数:
        alias - The alias to apply the 'lockMode' to.
        lockMode - The LockMode to apply.
      • applyGraph

        public Query<R> applyGraph​(RootGraph graph,
                                   GraphSemantic semantic)
        从接口复制的说明: Query
        Apply the given graph using the given semantic
        指定者:
        applyGraph 在接口中 Query<R>
        参数:
        graph - The graph the apply.
        semantic - The semantic to use when applying the graph
        返回:
        this - for method chaining
      • applyFollowOnLockingHint

        protected boolean applyFollowOnLockingHint​(Boolean followOnLocking)
        Apply the follow-on-locking hint.
        参数:
        followOnLocking - The follow-on-locking strategy.
      • applyPassDistinctThrough

        protected boolean applyPassDistinctThrough​(boolean passDistinctThrough)
        Apply the follow-on-locking hint.
        参数:
        passDistinctThrough - the query passes distinct to the database
      • isNativeQuery

        protected abstract boolean isNativeQuery()
        Is the query represented here a native (SQL) query?
        返回:
        true if it is a native query; false otherwise
      • getLockMode

        public javax.persistence.LockModeType getLockMode()
        指定者:
        getLockMode 在接口中 javax.persistence.Query
      • unwrap

        public <T> T unwrap​(Class<T> cls)
        指定者:
        unwrap 在接口中 javax.persistence.Query
      • makeQueryParametersForExecution

        protected QueryParameters makeQueryParametersForExecution​(String hql)
      • getPositionalParameterTypes

        protected Type[] getPositionalParameterTypes()
      • getPositionalParameterValues

        protected Object[] getPositionalParameterValues()
      • beforeQuery

        protected void beforeQuery()
      • afterQuery

        protected void afterQuery()
      • iterate

        public Iterator<R> iterate()
        从接口复制的说明: Query
        Return the query results as an Iterator. If the query contains multiple results per row, the results are returned in an instance of Object[].

        Entities returned as results are initialized on demand. The first SQL query returns identifiers only.
        指定者:
        iterate 在接口中 Query<R>
        返回:
        the result iterator
      • doIterate

        protected Iterator<R> doIterate()
      • scroll

        public ScrollableResultsImplementor scroll()
        从接口复制的说明: Query
        Return the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.

        You should call ScrollableResults.close() after processing the ScrollableResults so that the underlying resources are deallocated right away.

        指定者:
        scroll 在接口中 Query<R>
        指定者:
        scroll 在接口中 Query<R>
        返回:
        the result iterator
        另请参阅:
        ScrollableResults
      • scroll

        public ScrollableResultsImplementor scroll​(ScrollMode scrollMode)
        从接口复制的说明: Query
        Return the query results as ScrollableResults. The scrollability of the returned results depends upon JDBC driver support for scrollable ResultSets.

        You should call ScrollableResults.close() after processing the ScrollableResults so that the underlying resources are deallocated right away.

        指定者:
        scroll 在接口中 Query<R>
        指定者:
        scroll 在接口中 Query<R>
        参数:
        scrollMode - The scroll mode
        返回:
        the result iterator
        另请参阅:
        ScrollableResults, ScrollMode
      • stream

        public Stream<R> stream()
        从接口复制的说明: Query
        Retrieve a Stream over the query results.

        In the initial implementation (5.2) this returns a simple sequential Stream. The plan is to return a a smarter stream in 6.x leveraging the SQM model.

        You should call BaseStream.close() after processing the stream so that the underlying resources are deallocated right away.

        指定者:
        stream 在接口中 Query<R>
        返回:
        The results Stream
      • list

        public List<R> list()
        从接口复制的说明: Query
        Return the query results as a List. If the query contains multiple results per row, the results are returned in an instance of Object[].
        指定者:
        list 在接口中 Query<R>
        指定者:
        list 在接口中 Query<R>
        返回:
        the result list
      • isCallable

        protected boolean isCallable()
      • doList

        protected List<R> doList()
      • uniqueResult

        public R uniqueResult()
        从接口复制的说明: Query
        Convenience method to return a single instance that matches the query, or null if the query returns no results.
        指定者:
        uniqueResult 在接口中 Query<R>
        指定者:
        uniqueResult 在接口中 Query<R>
        返回:
        the single result or null
      • getSingleResult

        public R getSingleResult()
        指定者:
        getSingleResult 在接口中 javax.persistence.Query
        指定者:
        getSingleResult 在接口中 Query<R>
        指定者:
        getSingleResult 在接口中 javax.persistence.TypedQuery<R>
      • doExecuteUpdate

        protected int doExecuteUpdate()
      • resolveEntityName

        protected String resolveEntityName​(Object val)