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:
    DefaultPreparedQuery

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

      • 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 java.lang.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 java.lang.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 java.lang.String[] getExpandableQueryParts()
        Description copied from interface: StoredQuery
        The query to execute.
        Specified by:
        getExpandableQueryParts in interface StoredQuery<E,​R>
        Returns:
        The query to execute
      • 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.
      • 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 java.util.Optional<java.lang.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 java.lang.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 java.util.Map<java.lang.String,​java.lang.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.
      • 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 java.lang.String getName()
        Specified by:
        getName in interface io.micronaut.core.naming.Named
      • getIndexedParameterAutoPopulatedPropertyPaths

        @Nullable
        default java.lang.String[] getIndexedParameterAutoPopulatedPropertyPaths()
        Description copied from interface: StoredQuery
        The mapping between query parameters and auto populated properties that the parameter represents.
        Specified by:
        getIndexedParameterAutoPopulatedPropertyPaths in interface StoredQuery<E,​R>
        Returns:
        The auto populated properties.
      • getIndexedParameterAutoPopulatedPreviousPropertyPaths

        default java.lang.String[] getIndexedParameterAutoPopulatedPreviousPropertyPaths()
        Description copied from interface: StoredQuery
        The mapping between query parameters and auto populated previous properties that the parameter represents.
        Specified by:
        getIndexedParameterAutoPopulatedPreviousPropertyPaths in interface StoredQuery<E,​R>
        Returns:
        The auto populated properties.
      • getIndexedParameterAutoPopulatedPreviousPropertyIndexes

        default int[] getIndexedParameterAutoPopulatedPreviousPropertyIndexes()
        Description copied from interface: StoredQuery
        The mapping between query parameters and auto populated previous properties that the parameter represents.
        Specified by:
        getIndexedParameterAutoPopulatedPreviousPropertyIndexes in interface StoredQuery<E,​R>
        Returns:
        The auto populated properties.
      • hasInExpression

        @Deprecated
        default boolean hasInExpression()
        Deprecated.
        Description copied from interface: StoredQuery
        Does the query contain an in expression.
        Specified by:
        hasInExpression in interface StoredQuery<E,​R>
        Returns:
        True if it does