Interface DelegateStoredQuery<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.naming.Named, StoredDataOperation<R>, StoredQuery<E,R>
All Known Subinterfaces:
DelegatePreparedQuery<E,R>
All Known Implementing Classes:
DefaultBindableParametersPreparedQuery, DefaultBindableParametersStoredQuery, DefaultPreparedQuery, DefaultSqlPreparedQuery, DefaultSqlStoredQuery, DummyPreparedQuery

public interface DelegateStoredQuery<E,R> extends StoredQuery<E,R>
Delegate implementation of StoredQuery.
Since:
3.3.
Author:
Denis Stepanov
  • Method Details

    • getStoredQueryDelegate

      StoredQuery<E,R> getStoredQueryDelegate()
      Returns:
      The delegate
    • getAnnotationMetadata

      default io.micronaut.core.annotation.AnnotationMetadata getAnnotationMetadata()
      Specified by:
      getAnnotationMetadata in interface io.micronaut.core.annotation.AnnotationMetadataProvider
    • getRootEntity

      default Class<E> getRootEntity()
      Description copied from interface: StoredQuery
      The root entity type.
      Specified by:
      getRootEntity in interface StoredQuery<E,R>
      Returns:
      The root entity type
    • hasPageable

      default boolean hasPageable()
      Description copied from interface: StoredQuery
      Does the query have a pageable.
      Specified by:
      hasPageable in interface StoredQuery<E,R>
      Returns:
      True if it does
    • getQuery

      default String getQuery()
      Description copied from interface: StoredQuery
      The query to execute.
      Specified by:
      getQuery in interface StoredQuery<E,R>
      Returns:
      The query to execute
    • getExpandableQueryParts

      default String[] getExpandableQueryParts()
      Description copied from interface: StoredQuery
      The query to execute.
      Specified by:
      getExpandableQueryParts in interface StoredQuery<E,R>
      Returns:
      The query to execute
    • getQueryBindings

      default List<QueryParameterBinding> getQueryBindings()
      Description copied from interface: StoredQuery
      The list of query bindings.
      Specified by:
      getQueryBindings in interface StoredQuery<E,R>
      Returns:
      the query bindings
    • getResultType

      default Class<R> getResultType()
      Description copied from interface: StoredQuery
      The query result type. This may differ from the root entity type returned by StoredQuery.getRootEntity().
      Specified by:
      getResultType in interface StoredQuery<E,R>
      Returns:
      The query result type
    • getResultArgument

      default io.micronaut.core.type.Argument<R> getResultArgument()
      Description copied from interface: StoredQuery
      The query result type. This may differ from the root entity type returned by StoredQuery.getRootEntity().
      Specified by:
      getResultArgument in interface StoredDataOperation<E>
      Specified by:
      getResultArgument in interface StoredQuery<E,R>
      Returns:
      The query result type
    • getResultDataType

      default DataType getResultDataType()
      Specified by:
      getResultDataType in interface StoredQuery<E,R>
      Returns:
      The result data type.
    • isNative

      default boolean isNative()
      Description copied from interface: StoredQuery
      In cases where one needs to differentiate between at higher level query format (like JPA-QL) and a lower level format (like SQL).
      Specified by:
      isNative in interface StoredQuery<E,R>
      Returns:
      Whether the query is native.
    • isProcedure

      default boolean isProcedure()
      Description copied from interface: StoredQuery
      Is the query a procedure.
      Specified by:
      isProcedure in interface StoredQuery<E,R>
      Returns:
      Whether the query is a procedure invocation.
    • getOperationType

      default StoredQuery.OperationType getOperationType()
      Description copied from interface: StoredQuery
      Get the operation type.
      Specified by:
      getOperationType in interface StoredQuery<E,R>
      Returns:
      The operation type.
    • useNumericPlaceholders

      default boolean useNumericPlaceholders()
      Description copied from interface: StoredQuery
      Are the placeholders for query set using numeric indices starting from 1.
      Specified by:
      useNumericPlaceholders in interface StoredQuery<E,R>
      Returns:
      True if they are.
    • isDtoProjection

      default boolean isDtoProjection()
      Description copied from interface: StoredQuery
      Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project. Defaults to false.
      Specified by:
      isDtoProjection in interface StoredQuery<E,R>
      Returns:
      Whether the query is a DTO projection query
    • getEntityIdentifierType

      default Optional<Class<?>> getEntityIdentifierType()
      Description copied from interface: StoredQuery
      The type of the ID member of the entity.
      Specified by:
      getEntityIdentifierType in interface StoredQuery<E,R>
      Returns:
      The ID type
    • getArgumentTypes

      default Class<?>[] getArgumentTypes()
      Description copied from interface: StoredQuery
      The argument types to the method that invokes the query.
      Specified by:
      getArgumentTypes in interface StoredQuery<E,R>
      Returns:
      The argument types
    • isCount

      default boolean isCount()
      Specified by:
      isCount in interface StoredQuery<E,R>
      Returns:
      Is this a count query.
    • getQueryHints

      default Map<String,Object> getQueryHints()
      Description copied from interface: StoredQuery
      The parameter binding. That is the mapping between named query parameters and parameters of the method.
      Specified by:
      getQueryHints in interface StoredQuery<E,R>
      Returns:
      The parameter binding.
    • getJoinFetchPaths

      default Set<JoinPath> getJoinFetchPaths()
      Specified by:
      getJoinFetchPaths in interface StoredQuery<E,R>
      Returns:
      The join paths that require a fetch
    • isSingleResult

      default boolean isSingleResult()
      Description copied from interface: StoredQuery
      Whether the query can be treated as a single result.
      Specified by:
      isSingleResult in interface StoredQuery<E,R>
      Returns:
      True if it can.
    • hasResultConsumer

      default boolean hasResultConsumer()
      Specified by:
      hasResultConsumer in interface StoredQuery<E,R>
      Returns:
      Whether a result consumer is present
    • isOptimisticLock

      default boolean isOptimisticLock()
      Description copied from interface: StoredQuery
      Is with an optimistic lock.
      Specified by:
      isOptimisticLock in interface StoredQuery<E,R>
      Returns:
      the result
    • getName

      default String getName()
      Specified by:
      getName in interface io.micronaut.core.naming.Named
    • isRawQuery

      default boolean isRawQuery()
      Description copied from interface: StoredQuery
      Gets an indicator telling whether underlying query is raw query.
      Specified by:
      isRawQuery in interface StoredQuery<E,R>
      Returns:
      true if it is raw query
    • isJsonEntity

      default boolean isJsonEntity()
      Specified by:
      isJsonEntity in interface StoredQuery<E,R>
      Returns:
      an indicator telling whether query is handling entities with JSON representation (like Oracle Json View)
    • getParameterExpressions

      default Map<String,io.micronaut.core.annotation.AnnotationValue<?>> getParameterExpressions()
      Description copied from interface: StoredQuery
      Parameter expressions.
      Specified by:
      getParameterExpressions in interface StoredQuery<E,R>
      Returns:
      Parameter expressions.