Package org.hibernate

Interface Query<R>

    • Method Detail

      • getQueryString

        java.lang.String getQueryString()
        Deprecated.
        Get the query string.
        Returns:
        the query string
      • getQueryOptions

        RowSelection getQueryOptions()
        Deprecated.
        "QueryOptions" is a better name, I think, than "RowSelection" -> 6.0
        Returns:
        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.
        Todo:
        6.0 rename RowSelection to QueryOptions
      • setHibernateFirstResult

        @Deprecated
        default Query setHibernateFirstResult​(int firstRow)
        Deprecated.
        setFirstResult(int) should be used instead.
        Set the position of the first query result to be retrieved. A negative value will result in pagination starting from position 0.
        Parameters:
        firstRow - - the position of the first query result
        Returns:
        this, for method chaining
      • setHibernateMaxResults

        @Deprecated
        default Query setHibernateMaxResults​(int maxResults)
        Deprecated.
        setMaxResults(int) should be used instead.
        Set the maximum number of query results to be retrieved. A value less than or equal to 0 is considered uninitialized, resulting in no limit on the number of results.
        Parameters:
        maxResults - - the maximum number of query results
        Returns:
        this, for method chaining
      • getHibernateFlushMode

        FlushMode getHibernateFlushMode()
        Deprecated.
        Obtain the FlushMode in effect for this query. By default, the query inherits the FlushMode of the Session from which it originates.
        Specified by:
        getHibernateFlushMode in interface BasicQueryContract<R>
        Returns:
        The query FlushMode.
        See Also:
        FlushMode
      • getFlushMode

        FlushModeType getFlushMode()
        Deprecated.
        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.
        Specified by:
        getFlushMode in interface Query
        Returns:
        The FlushModeType in effect for this query.
      • getCacheMode

        CacheMode getCacheMode()
        Deprecated.
        Obtain the CacheMode in effect for this query. By default, the query inherits the CacheMode of the Session from which is originates. NOTE: The CacheMode here only effects reading/writing of the query cache, not the entity/collection caches.
        Specified by:
        getCacheMode in interface BasicQueryContract<R>
        Returns:
        The query CacheMode.
        See Also:
        Session.getCacheMode(), CacheMode
      • setCacheMode

        Query<R> setCacheMode​(CacheMode cacheMode)
        Deprecated.
        (Re)set the current CacheMode in effect for this query.
        Specified by:
        setCacheMode in interface BasicQueryContract<R>
        Parameters:
        cacheMode - The new CacheMode to use.
        Returns:
        this, for method chaining
        See Also:
        getCacheMode()
      • isCacheable

        boolean isCacheable()
        Deprecated.
        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.
        Specified by:
        isCacheable in interface BasicQueryContract<R>
        Returns:
        true if the query results are eligible for caching, false otherwise.
        See Also:
        AvailableSettings.USE_QUERY_CACHE
      • setCacheable

        Query<R> setCacheable​(boolean cacheable)
        Deprecated.
        Enable/disable second level query (result) caching for this query.
        Specified by:
        setCacheable in interface BasicQueryContract<R>
        Parameters:
        cacheable - Should the query results be cacheable?
        Returns:
        this, for method chaining
        See Also:
        isCacheable()
      • getCacheRegion

        java.lang.String getCacheRegion()
        Deprecated.
        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 isCacheable() for more information). null indicates that the default region should be used.
        Specified by:
        getCacheRegion in interface BasicQueryContract<R>
        Returns:
        The specified cache region name into which query results should be placed; null indicates the default region.
      • setCacheRegion

        Query<R> setCacheRegion​(java.lang.String cacheRegion)
        Deprecated.
        Set the name of the cache region where query results should be cached (if cached at all).
        Specified by:
        setCacheRegion in interface BasicQueryContract<R>
        Parameters:
        cacheRegion - the name of a query cache region, or null to indicate that the default region should be used.
        Returns:
        this, for method chaining
        See Also:
        getCacheRegion()
      • getTimeout

        java.lang.Integer getTimeout()
        Deprecated.
        Obtain the query timeout in seconds. This value is eventually passed along to the JDBC query via Statement.setQueryTimeout(int). Zero indicates no timeout.
        Specified by:
        getTimeout in interface BasicQueryContract<R>
        Returns:
        The timeout in seconds
        See Also:
        Statement.getQueryTimeout(), Statement.setQueryTimeout(int)
      • setTimeout

        Query<R> setTimeout​(int timeout)
        Deprecated.
        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.
        Specified by:
        setTimeout in interface BasicQueryContract<R>
        Parameters:
        timeout - the timeout in seconds
        Returns:
        this, for method chaining
        See Also:
        getTimeout()
      • getFetchSize

        java.lang.Integer getFetchSize()
        Deprecated.
        Obtain the JDBC fetch size hint in effect for this query. This value is eventually passed along to the JDBC query via Statement.setFetchSize(int). As defined b y JDBC, this value is a hint to the driver to indicate how many rows to fetch from the database when more rows are needed. NOTE : JDBC expressly defines this value as a hint. It may or may not have any effect on the actual query execution and ResultSet processing depending on the driver.
        Specified by:
        getFetchSize in interface BasicQueryContract<R>
        Returns:
        The timeout in seconds
        See Also:
        Statement.getFetchSize(), Statement.setFetchSize(int)
      • setFetchSize

        Query<R> setFetchSize​(int fetchSize)
        Deprecated.
        Sets a JDBC fetch size hint for the query.
        Specified by:
        setFetchSize in interface BasicQueryContract<R>
        Parameters:
        fetchSize - the fetch size hint
        Returns:
        this, for method chaining
        See Also:
        getFetchSize()
      • getReturnTypes

        @Deprecated
        Type[] getReturnTypes()
        Deprecated.
        (since 5.2) with no replacement; to be removed in 6.0
        Return the Hibernate types of the query results.
        Specified by:
        getReturnTypes in interface BasicQueryContract<R>
        Returns:
        an array of types
      • getLockOptions

        LockOptions getLockOptions()
        Deprecated.
        Obtains the LockOptions in effect for this query.
        Returns:
        The LockOptions
        See Also:
        LockOptions
      • setLockMode

        Query<R> setLockMode​(java.lang.String alias,
                             LockMode lockMode)
        Deprecated.
        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).
        Parameters:
        alias - a query alias, or "this" for a collection filter
        lockMode - The lock mode to apply.
        Returns:
        this, for method chaining
        See Also:
        getLockOptions()
      • getComment

        java.lang.String getComment()
        Deprecated.
        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.
        Returns:
        The comment.
      • setComment

        Query<R> setComment​(java.lang.String comment)
        Deprecated.
        Set the comment for this query.
        Parameters:
        comment - The human-readable comment
        Returns:
        this, for method chaining
        See Also:
        getComment()
      • addQueryHint

        Query<R> addQueryHint​(java.lang.String hint)
        Deprecated.
        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.
        Parameters:
        hint - The database specific query hint to add.
      • iterate

        java.util.Iterator<R> iterate()
        Deprecated.
        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.
        Returns:
        the result iterator
      • scroll

        ScrollableResults scroll()
        Deprecated.
        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.

        Returns:
        the result iterator
        See Also:
        ScrollableResults
      • scroll

        ScrollableResults scroll​(ScrollMode scrollMode)
        Deprecated.
        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.

        Parameters:
        scrollMode - The scroll mode
        Returns:
        the result iterator
        See Also:
        ScrollableResults, ScrollMode
      • list

        java.util.List<R> list()
        Deprecated.
        Return the query results as a List. If the query contains multiple results per row, the results are returned in an instance of Object[].
        Returns:
        the result list
      • uniqueResult

        R uniqueResult()
        Deprecated.
        Convenience method to return a single instance that matches the query, or null if the query returns no results.
        Returns:
        the single result or null
        Throws:
        NonUniqueResultException - if there is more than one matching result
      • getParameterMetadata

        ParameterMetadata getParameterMetadata()
        Deprecated.
        Access to information about query parameters.
        Returns:
        information about query parameters.
      • getNamedParameters

        @Deprecated
        java.lang.String[] getNamedParameters()
        Deprecated.
        Return the names of all named parameters of the query.
        Returns:
        the parameter names, in no particular order
      • setParameter

        <T> Query<R> setParameter​(QueryParameter<T> parameter,
                                  T val)
        Deprecated.
        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 setParameter(QueryParameter, Object, Type) should be used instead
        Parameters:
        parameter - The query parameter memento
        val - the possibly-null parameter value
        Returns:
        this, for method chaining
      • setParameter

        Query<R> setParameter​(java.lang.String name,
                              java.lang.Object val)
        Deprecated.
        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 setParameter(String, Object, Type) should be used instead
        Specified by:
        setParameter in interface Query
        Specified by:
        setParameter in interface TypedQuery<R>
        Parameters:
        name - the parameter name
        val - the (possibly-null) parameter value
        Returns:
        this, for method chaining
      • setParameter

        Query<R> setParameter​(int position,
                              java.lang.Object val)
        Deprecated.
        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 setParameter(int, Object, Type) should be used instead
        Specified by:
        setParameter in interface Query
        Specified by:
        setParameter in interface TypedQuery<R>
        Parameters:
        position - the position of the parameter in the query string, numbered from 0.
        val - the possibly-null parameter value
        Returns:
        this, for method chaining
      • setParameter

        <P> Query<R> setParameter​(QueryParameter<P> parameter,
                                  P val,
                                  Type type)
        Deprecated.
        Bind a query parameter using the supplied Type
        Parameters:
        parameter - The query parameter memento
        val - the possibly-null parameter value
        type - the Hibernate type
        Returns:
        this, for method chaining
      • setParameter

        Query<R> setParameter​(java.lang.String name,
                              java.lang.Object val,
                              Type type)
        Deprecated.
        Bind a named query parameter using the supplied Type
        Parameters:
        name - the name of the parameter
        val - the possibly-null parameter value
        type - the Hibernate type
        Returns:
        this, for method chaining
      • setParameter

        Query<R> setParameter​(int position,
                              java.lang.Object val,
                              Type type)
        Deprecated.
        Bind a value to a JDBC-style query parameter.
        Parameters:
        position - the position of the parameter in the query string, numbered from 0.
        val - the possibly-null parameter value
        type - the Hibernate type
        Returns:
        this, for method chaining
      • setParameter

        <P> Query<R> setParameter​(QueryParameter<P> parameter,
                                  P val,
                                  TemporalType temporalType)
        Deprecated.
        Bind a query parameter as some form of date/time using the indicated temporal-type.
        Parameters:
        parameter - The query parameter memento
        val - the possibly-null parameter value
        temporalType - the temporal-type to use in binding the date/time
        Returns:
        this, for method chaining
      • setParameter

        <P> Query<R> setParameter​(java.lang.String name,
                                  P val,
                                  TemporalType temporalType)
        Deprecated.
        Bind a named query parameter as some form of date/time using the indicated temporal-type.
        Parameters:
        name - the parameter name
        val - the possibly-null parameter value
        temporalType - the temporal-type to use in binding the date/time
        Returns:
        this, for method chaining
      • setParameter

        <P> Query<R> setParameter​(int position,
                                  P val,
                                  TemporalType temporalType)
        Deprecated.
        Bind a positional query parameter as some form of date/time using the indicated temporal-type.
        Parameters:
        position - the position of the parameter in the query string, numbered from 0.
        val - the possibly-null parameter value
        temporalType - the temporal-type to use in binding the date/time
        Returns:
        this, for method chaining
      • setParameterList

        <P> Query<R> setParameterList​(QueryParameter<P> parameter,
                                      java.util.Collection<P> values)
        Deprecated.
        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).
        Parameters:
        parameter - the parameter memento
        values - a collection of values to list
        Returns:
        this, for method chaining
      • setParameterList

        Query<R> setParameterList​(java.lang.String name,
                                  java.util.Collection values)
        Deprecated.
        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).
        Parameters:
        name - the name of the parameter
        values - a collection of values to list
        Returns:
        this, for method chaining
      • setParameterList

        Query<R> setParameterList​(int position,
                                  java.util.Collection values)
        Deprecated.
      • setParameterList

        Query<R> setParameterList​(java.lang.String name,
                                  java.util.Collection values,
                                  Type type)
        Deprecated.
        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).
        Parameters:
        name - the name of the parameter
        values - a collection of values to list
        type - the Hibernate type of the values
        Returns:
        this, for method chaining
      • setParameterList

        Query<R> setParameterList​(int position,
                                  java.util.Collection values,
                                  Type type)
        Deprecated.
      • setParameterList

        Query<R> setParameterList​(java.lang.String name,
                                  java.lang.Object[] values,
                                  Type type)
        Deprecated.
        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).
        Parameters:
        name - the name of the parameter
        values - a collection of values to list
        type - the Hibernate type of the values
        Returns:
        this, for method chaining
      • setParameterList

        Query<R> setParameterList​(int position,
                                  java.lang.Object[] values,
                                  Type type)
        Deprecated.
      • setParameterList

        Query<R> setParameterList​(java.lang.String name,
                                  java.lang.Object[] values)
        Deprecated.
        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).
        Parameters:
        name - the name of the parameter
        values - a collection of values to list
        Returns:
        this, for method chaining
      • setParameterList

        Query<R> setParameterList​(int position,
                                  java.lang.Object[] values)
        Deprecated.
      • setProperties

        Query<R> setProperties​(java.lang.Object bean)
        Deprecated.
        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.
        Parameters:
        bean - any JavaBean or POJO
        Returns:
        this, for method chaining
      • setProperties

        Query<R> setProperties​(java.util.Map bean)
        Deprecated.
        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.
        Parameters:
        bean - a java.util.Map
        Returns:
        this, for method chaining
      • setHint

        Query<R> setHint​(java.lang.String hintName,
                         java.lang.Object value)
        Deprecated.
        Specified by:
        setHint in interface Query
        Specified by:
        setHint in interface TypedQuery<R>
      • setString

        @Deprecated
        default Query<R> setString​(int position,
                                   java.lang.String val)
        Deprecated.
        Bind a positional String-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setCharacter

        @Deprecated
        default Query<R> setCharacter​(int position,
                                      char val)
        Deprecated.
        Bind a positional char-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setBoolean

        @Deprecated
        default Query<R> setBoolean​(int position,
                                    boolean val)
        Deprecated.
        Bind a positional boolean-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setByte

        @Deprecated
        default Query<R> setByte​(int position,
                                 byte val)
        Deprecated.
        Bind a positional byte-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setShort

        @Deprecated
        default Query<R> setShort​(int position,
                                  short val)
        Deprecated.
        Bind a positional short-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setInteger

        @Deprecated
        default Query<R> setInteger​(int position,
                                    int val)
        Deprecated.
        Bind a positional int-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setLong

        @Deprecated
        default Query<R> setLong​(int position,
                                 long val)
        Deprecated.
        Bind a positional long-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setFloat

        @Deprecated
        default Query<R> setFloat​(int position,
                                  float val)
        Deprecated.
        Bind a positional float-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setDouble

        @Deprecated
        default Query<R> setDouble​(int position,
                                   double val)
        Deprecated.
        Bind a positional double-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setBinary

        @Deprecated
        default Query<R> setBinary​(int position,
                                   byte[] val)
        Deprecated.
        Bind a positional binary-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setText

        @Deprecated
        default Query<R> setText​(int position,
                                 java.lang.String val)
        Deprecated.
        Bind a positional String-valued parameter using streaming.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setSerializable

        @Deprecated
        default Query<R> setSerializable​(int position,
                                         java.io.Serializable val)
        Deprecated.
        Bind a positional binary-valued parameter using serialization.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setLocale

        @Deprecated
        default Query<R> setLocale​(int position,
                                   java.util.Locale val)
        Deprecated.
        Bind a positional Locale-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setBigDecimal

        @Deprecated
        default Query<R> setBigDecimal​(int position,
                                       java.math.BigDecimal val)
        Deprecated.
        Bind a positional BigDecimal-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setBigInteger

        @Deprecated
        default Query<R> setBigInteger​(int position,
                                       java.math.BigInteger val)
        Deprecated.
        Bind a positional BigDecimal-valued parameter.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setDate

        @Deprecated
        default Query<R> setDate​(int position,
                                 java.util.Date val)
        Deprecated.
        Bind a positional Date-valued parameter using just the Date portion.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setTime

        @Deprecated
        default Query<R> setTime​(int position,
                                 java.util.Date val)
        Deprecated.
        Bind a positional Date-valued parameter using just the Time portion.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setTimestamp

        @Deprecated
        default Query<R> setTimestamp​(int position,
                                      java.util.Date val)
        Deprecated.
        Bind a positional Date-valued parameter using the full Timestamp.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setCalendar

        @Deprecated
        default Query<R> setCalendar​(int position,
                                     java.util.Calendar val)
        Deprecated.
        Bind a positional Calendar-valued parameter using the full Timestamp portion.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setCalendarDate

        @Deprecated
        default Query<R> setCalendarDate​(int position,
                                         java.util.Calendar val)
        Deprecated.
        Bind a positional Calendar-valued parameter using just the Date portion.
        Parameters:
        position - The parameter position
        val - The bind value
        Returns:
        this, for method chaining
      • setString

        @Deprecated
        default Query<R> setString​(java.lang.String name,
                                   java.lang.String val)
        Deprecated.
        Bind a named String-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setCharacter

        @Deprecated
        default Query<R> setCharacter​(java.lang.String name,
                                      char val)
        Deprecated.
        Bind a named char-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setBoolean

        @Deprecated
        default Query<R> setBoolean​(java.lang.String name,
                                    boolean val)
        Deprecated.
        Bind a named boolean-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setByte

        @Deprecated
        default Query<R> setByte​(java.lang.String name,
                                 byte val)
        Deprecated.
        Bind a named byte-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setShort

        @Deprecated
        default Query<R> setShort​(java.lang.String name,
                                  short val)
        Deprecated.
        Bind a named short-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setInteger

        @Deprecated
        default Query<R> setInteger​(java.lang.String name,
                                    int val)
        Deprecated.
        Bind a named int-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setLong

        @Deprecated
        default Query<R> setLong​(java.lang.String name,
                                 long val)
        Deprecated.
        Bind a named long-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setFloat

        @Deprecated
        default Query<R> setFloat​(java.lang.String name,
                                  float val)
        Deprecated.
        Bind a named float-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setDouble

        @Deprecated
        default Query<R> setDouble​(java.lang.String name,
                                   double val)
        Deprecated.
        Bind a named double-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setBinary

        @Deprecated
        default Query<R> setBinary​(java.lang.String name,
                                   byte[] val)
        Deprecated.
        Bind a named binary-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setText

        @Deprecated
        default Query<R> setText​(java.lang.String name,
                                 java.lang.String val)
        Deprecated.
        Bind a named String-valued parameter using streaming.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setSerializable

        @Deprecated
        default Query<R> setSerializable​(java.lang.String name,
                                         java.io.Serializable val)
        Deprecated.
        Bind a named binary-valued parameter using serialization.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setLocale

        @Deprecated
        default Query<R> setLocale​(java.lang.String name,
                                   java.util.Locale val)
        Deprecated.
        Bind a named Locale-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setBigDecimal

        @Deprecated
        default Query<R> setBigDecimal​(java.lang.String name,
                                       java.math.BigDecimal val)
        Deprecated.
        Bind a named BigDecimal-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setBigInteger

        @Deprecated
        default Query<R> setBigInteger​(java.lang.String name,
                                       java.math.BigInteger val)
        Deprecated.
        Bind a named BigInteger-valued parameter.
        Parameters:
        name - The parameter name
        val - The bind value
        Returns:
        this, for method chaining
      • setDate

        @Deprecated
        default Query<R> setDate​(java.lang.String name,
                                 java.util.Date val)
        Deprecated.
        Bind the val (time is truncated) of a given Date object to a named query parameter.
        Parameters:
        name - The name of the parameter
        val - The val object
        Returns:
        this, for method chaining
      • setTime

        @Deprecated
        default Query<R> setTime​(java.lang.String name,
                                 java.util.Date val)
        Deprecated.
        Bind the time (val is truncated) of a given Date object to a named query parameter.
        Parameters:
        name - The name of the parameter
        val - The val object
        Returns:
        this, for method chaining
      • setTimestamp

        @Deprecated
        default Query<R> setTimestamp​(java.lang.String name,
                                      java.util.Date value)
        Deprecated.
        Bind the value and the time of a given Date object to a named query parameter.
        Parameters:
        name - The name of the parameter
        value - The value object
        Returns:
        this, for method chaining
      • setCalendar

        @Deprecated
        default Query<R> setCalendar​(java.lang.String name,
                                     java.util.Calendar value)
        Deprecated.
        Bind a named Calendar-valued parameter using the full Timestamp.
        Parameters:
        name - The parameter name
        value - The bind value
        Returns:
        this, for method chaining
      • setCalendarDate

        @Deprecated
        default Query<R> setCalendarDate​(java.lang.String name,
                                         java.util.Calendar value)
        Deprecated.
        Bind a named Calendar-valued parameter using just the Date portion.
        Parameters:
        name - The parameter name
        value - The bind value
        Returns:
        this, for method chaining
      • setEntity

        @Deprecated
        Query<R> setEntity​(int position,
                           java.lang.Object val)
        Deprecated.
        Bind an instance of a mapped persistent class to a JDBC-style query parameter. Use setParameter(int, Object) for null values.
        Parameters:
        position - the position of the parameter in the query string, numbered from 0.
        val - a non-null instance of a persistent class
        Returns:
        this, for method chaining
      • determineProperBooleanType

        @Deprecated
        Type determineProperBooleanType​(int position,
                                        java.lang.Object value,
                                        Type defaultType)
        Deprecated.
        added only to allow default method definition for deprecated methods here.
      • determineProperBooleanType

        @Deprecated
        Type determineProperBooleanType​(java.lang.String name,
                                        java.lang.Object value,
                                        Type defaultType)
        Deprecated.
        added only to allow default method definition for deprecated methods here.
      • setResultTransformer

        @Deprecated
        Query<R> setResultTransformer​(ResultTransformer transformer)
        Deprecated.
        (since 5.2)
        Set a strategy for handling the query results. This can be used to change "shape" of the query result.
        Parameters:
        transformer - The transformer to apply
        Returns:
        this (for method chaining)
        Todo:
        develop a new approach to result transformers
      • getReturnAliases

        @Deprecated
        java.lang.String[] getReturnAliases()
        Deprecated.
        (since 5.2) use Tuple if you need access to "result variables".
      • setParameters

        @Deprecated
        default Query<R> setParameters​(java.lang.Object[] values,
                                       Type[] types)
        Deprecated.
        (since 5.2) Bind values individually
        Bind values and types to positional parameters. Allows binding more than one at a time; no real performance impact. The number of elements in each array should match. That is, element number-0 in types array corresponds to element-0 in the values array, etc,
        Parameters:
        types - The types
        values - The values
        Returns:
        this, for method chaining