Interface Mutiny.AbstractQuery

  • All Known Subinterfaces:
    Mutiny.MutationQuery, Mutiny.Query<R>, Mutiny.SelectionQuery<R>
    Enclosing interface:
    Mutiny

    public static interface Mutiny.AbstractQuery
    A non-blocking counterpart to the Hibernate Query interface, allowing reactive execution of HQL and JPQL queries.

    The semantics of operations on this interface are identical to the semantics of the similarly-named operations of Query, except that the operations are performed asynchronously, returning a Uni without blocking the calling thread.

    Note that TemporalType is not supported as an argument for parameter bindings, and so parameters of type Date or Calendar should not be used. Instead, datetime types from java.time should be used as parameters.

    See Also:
    Query
    • Method Detail

      • setParameter

        Mutiny.AbstractQuery setParameter​(int parameter,
                                          Object argument)
        Set the value of an ordinal parameter. Ordinal parameters are numbered from 1, and are specified in the query using placeholder tokens of form ?1, ?2, etc.
        Parameters:
        parameter - an integer identifying the ordinal parameter
        argument - the argument to set
      • setParameter

        Mutiny.AbstractQuery setParameter​(String parameter,
                                          Object argument)
        Set the value of a named parameter. Named parameters are specified in the query using placeholder tokens of form :name.
        Parameters:
        parameter - the name of the parameter
        argument - the argument to set
      • setParameter

        <T> Mutiny.AbstractQuery setParameter​(jakarta.persistence.Parameter<T> parameter,
                                              T argument)
        Set the value of a typed parameter. Typed parameters are obtained from the JPA CriteriaBuilder, which may itself be obtained by calling Mutiny.SessionFactory.getCriteriaBuilder().
        Parameters:
        parameter - the parameter
        argument - the argument to set
        See Also:
        CriteriaBuilder.parameter(Class)
      • setComment

        Mutiny.AbstractQuery setComment​(String comment)
        Set the comment for this query. This comment will be prepended to the SQL query sent to the database.
        Parameters:
        comment - The human-readable comment
      • getComment

        String getComment()