Interface DelegatePreparedQuery<E,R>
- Type Parameters:
E- The entity typeR- The result type
- All Superinterfaces:
io.micronaut.core.annotation.AnnotationMetadataProvider,io.micronaut.core.annotation.AnnotationSource,io.micronaut.core.attr.AttributeHolder,DelegateStoredQuery<E,,R> io.micronaut.core.naming.Named,PagedQuery<E>,PreparedDataOperation<R>,PreparedQuery<E,,R> StoredDataOperation<R>,StoredQuery<E,R>
- All Known Implementing Classes:
DefaultBindableParametersPreparedQuery,DefaultSqlPreparedQuery
@Internal
public interface DelegatePreparedQuery<E,R>
extends PreparedQuery<E,R>, DelegateStoredQuery<E,R>
Delegate implementation of
PreparedQuery.- Since:
- 3.3.
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptiondefault io.micronaut.core.type.Argument[]getAttribute(CharSequence name) default <T> Optional<T>getAttribute(CharSequence name, Class<T> type) default io.micronaut.core.convert.value.ConvertibleValues<Object>default Pageabledefault Object[]default <RT1> Optional<RT1>getParameterInRole(String role, Class<RT1> type) Return the value of the given parameter if the given role.default StringgetQuery()The query to execute.The parameter binding.default Class<?>The root entity type.default StoredQuerydefault booleanReturns whether the query returns the actual entity or a Data Transfer Object (DTO) project.default booleanGets an indicator telling whether underlying query is raw query.Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.data.runtime.query.internal.DelegateStoredQuery
getAnnotationMetadata, getArgumentTypes, getEntityIdentifierType, getExpandableQueryParts, getIndexedParameterAutoPopulatedPreviousPropertyIndexes, getIndexedParameterAutoPopulatedPreviousPropertyPaths, getIndexedParameterAutoPopulatedPropertyPaths, getJoinFetchPaths, getName, getQueryBindings, getResultArgument, getResultDataType, getResultType, getTransactionDefinition, hasPageable, hasResultConsumer, isCount, isJsonEntity, isNative, isOptimisticLock, isSingleResult, useNumericPlaceholdersMethods inherited from interface io.micronaut.data.model.runtime.StoredQuery
getIndexedParameterBinding, getIndexedParameterPaths, getIndexedParameterTypes, getLastUpdatedProperty, getParameterBinding, getParameterNames, hasInExpression
-
Method Details
-
getPreparedQueryDelegate
PreparedQuery<E,R> getPreparedQueryDelegate()- Returns:
- The delegate
-
getStoredQueryDelegate
- Specified by:
getStoredQueryDelegatein interfaceDelegateStoredQuery<E,R> - Returns:
- The delegate
-
getRootEntity
Description copied from interface:PagedQueryThe root entity type.- Specified by:
getRootEntityin interfaceDelegateStoredQuery<E,R> - Specified by:
getRootEntityin interfacePagedQuery<E>- Specified by:
getRootEntityin interfaceStoredQuery<E,R> - Returns:
- The root entity type
-
getQueryHints
Description copied from interface:PagedQueryThe parameter binding. That is the mapping between named query parameters and parameters of the method.- Specified by:
getQueryHintsin interfaceDelegateStoredQuery<E,R> - Specified by:
getQueryHintsin interfacePagedQuery<E>- Specified by:
getQueryHintsin interfacePreparedQuery<E,R> - Specified by:
getQueryHintsin interfaceStoredQuery<E,R> - Returns:
- The parameter binding.
-
isRawQuery
default boolean isRawQuery()Description copied from interface:PreparedQueryGets an indicator telling whether underlying query is raw query.- Specified by:
isRawQueryin interfaceDelegateStoredQuery<E,R> - Specified by:
isRawQueryin interfacePreparedQuery<E,R> - Specified by:
isRawQueryin interfaceStoredQuery<E,R> - Returns:
- true if it is raw query
-
getParameterInRole
Description copied from interface:PreparedDataOperationReturn the value of the given parameter if the given role.- Specified by:
getParameterInRolein interfacePreparedDataOperation<E>- Type Parameters:
RT1- The generic type- Parameters:
role- The roletype- The type- Returns:
- An optional value.
-
getRepositoryType
- Specified by:
getRepositoryTypein interfacePreparedQuery<E,R> - Returns:
- The repository type.
-
getParameterValues
- Specified by:
getParameterValuesin interfacePreparedQuery<E,R> - Returns:
- The named parameter values
-
getParameterArray
- Specified by:
getParameterArrayin interfacePreparedQuery<E,R> - Returns:
- The method parameters
-
getArguments
default io.micronaut.core.type.Argument[] getArguments()- Specified by:
getArgumentsin interfacePreparedQuery<E,R> - Returns:
- The method arguments
-
getPageable
- Specified by:
getPageablein interfacePagedQuery<E>- Returns:
- The pageable object. Defaults to
Pageable.UNPAGED
-
isDtoProjection
default boolean isDtoProjection()Description copied from interface:StoredQueryReturns whether the query returns the actual entity or a Data Transfer Object (DTO) project. Defaults to false.- Specified by:
isDtoProjectionin interfaceDelegateStoredQuery<E,R> - Specified by:
isDtoProjectionin interfaceStoredQuery<E,R> - Returns:
- Whether the query is a DTO projection query
-
getQuery
Description copied from interface:StoredQueryThe query to execute.- Specified by:
getQueryin interfaceDelegateStoredQuery<E,R> - Specified by:
getQueryin interfaceStoredQuery<E,R> - Returns:
- The query to execute
-
getAttributes
- Specified by:
getAttributesin interfaceio.micronaut.core.attr.AttributeHolder
-
getAttribute
- Specified by:
getAttributein interfaceio.micronaut.core.attr.AttributeHolder
-
getAttribute
- Specified by:
getAttributein interfaceio.micronaut.core.attr.AttributeHolder
-