Interface SqlPreparedQuery<E,R>

Type Parameters:
E - The entity type
R - The result type
All Superinterfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider, io.micronaut.core.annotation.AnnotationSource, io.micronaut.core.attr.AttributeHolder, BindableParametersPreparedQuery<E,R>, BindableParametersStoredQuery<E,R>, io.micronaut.core.convert.ConversionServiceProvider, io.micronaut.core.naming.Named, PagedQuery<E>, PersistentEntityAwareQuery<E>, PreparedDataOperation<R>, PreparedQuery<E,R>, SqlStoredQuery<E,R>, StoredDataOperation<R>, StoredQuery<E,R>
All Known Implementing Classes:
DefaultSqlPreparedQuery

@Internal public interface SqlPreparedQuery<E,R> extends BindableParametersPreparedQuery<E,R>, SqlStoredQuery<E,R>
SQL version of SqlStoredQuery. The instance of a prepared query has mutable state compared to a stored query.
Since:
3.5.0
Author:
Denis Stepanov
  • Method Details

    • prepare

      void prepare(@Nullable E entity)
      Prepare query. The internal SQL query can be altered based on the requirements.
      Parameters:
      entity - The entity instance
    • attachPageable

      default void attachPageable(Pageable pageable, Limit limit, Sort sort, boolean isSingleResult)
      Modify the query according to the pageable.
      Parameters:
      pageable - The pageable
      limit - The limit
      sort - The sort
      isSingleResult - is single result
    • attachPageable

      void attachPageable(Pageable pageable, Limit limit, Sort sort)
      Modify the query according to the pageable.
      Parameters:
      pageable - The pageable
      limit - The limit
      sort - The sort
    • getQueryResultInfo

      QueryResultInfo getQueryResultInfo()
      Specified by:
      getQueryResultInfo in interface SqlStoredQuery<E,R>
      Returns:
      the query result info
      Since:
      4.0.0
    • getInvocationContext

      @Nullable @Nullable io.micronaut.aop.InvocationContext<?,?> getInvocationContext()
      Returns the invocation context associated with this prepared query.
      Returns:
      the invocation context
    • getPersistentEntity

      @Nullable @Nullable RuntimePersistentEntity<E> getPersistentEntity()
      Specified by:
      getPersistentEntity in interface PersistentEntityAwareQuery<E>
      Specified by:
      getPersistentEntity in interface SqlStoredQuery<E,R>
      Returns:
      The persistent entity