Class DefaultPreparedQuery<E,​RT>

    • Constructor Detail

      • DefaultPreparedQuery

        public DefaultPreparedQuery​(io.micronaut.aop.MethodInvocationContext<?,​?> context,
                                    StoredQuery<E,​RT> storedQuery,
                                    java.lang.String finalQuery,
                                    @NonNull
                                    Pageable pageable,
                                    boolean dtoProjection,
                                    io.micronaut.core.convert.ConversionService<?> conversionService)
        The default constructor.
        Parameters:
        context - The execution context
        storedQuery - The stored query
        finalQuery - The final query
        pageable - The pageable
        dtoProjection - Whether the prepared query is a dto projection
        conversionService - The conversion service
    • Method Detail

      • getContext

        public io.micronaut.aop.MethodInvocationContext<?,​?> getContext()
        Returns:
        The context
      • getParameterInRole

        public <RT1> java.util.Optional<RT1> getParameterInRole​(@NonNull
                                                                java.lang.String role,
                                                                @NonNull
                                                                java.lang.Class<RT1> type)
        Description copied from interface: PreparedDataOperation
        Return the value of the given parameter if the given role.
        Specified by:
        getParameterInRole in interface PreparedDataOperation<E>
        Type Parameters:
        RT1 - The generic type
        Parameters:
        role - The role
        type - The type
        Returns:
        An optional value.
      • getRepositoryType

        public java.lang.Class<?> getRepositoryType()
        Specified by:
        getRepositoryType in interface PreparedQuery<E,​RT>
        Returns:
        The repository type.
      • getParameterValues

        @NonNull
        public java.util.Map<java.lang.String,​java.lang.Object> getParameterValues()
        Specified by:
        getParameterValues in interface PreparedQuery<E,​RT>
        Returns:
        The named parameter values
      • getParameterArray

        public java.lang.Object[] getParameterArray()
        Specified by:
        getParameterArray in interface PreparedQuery<E,​RT>
        Returns:
        The method parameters
      • getArguments

        public io.micronaut.core.type.Argument[] getArguments()
        Specified by:
        getArguments in interface PreparedQuery<E,​RT>
        Returns:
        The method arguments
      • isDtoProjection

        public 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 DelegateStoredQuery<E,​RT>
        Specified by:
        isDtoProjection in interface StoredQuery<E,​RT>
        Returns:
        Whether the query is a DTO projection query
      • getAttributes

        @NonNull
        public io.micronaut.core.convert.value.ConvertibleValues<java.lang.Object> getAttributes()
        Specified by:
        getAttributes in interface io.micronaut.core.attr.AttributeHolder
      • getAttribute

        @NonNull
        public java.util.Optional<java.lang.Object> getAttribute​(java.lang.CharSequence name)
        Specified by:
        getAttribute in interface io.micronaut.core.attr.AttributeHolder
      • getAttribute

        @NonNull
        public <T> java.util.Optional<T> getAttribute​(java.lang.CharSequence name,
                                                      java.lang.Class<T> type)
        Specified by:
        getAttribute in interface io.micronaut.core.attr.AttributeHolder