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> @NonNull Optional<T>
getAttribute
(CharSequence name, Class<T> type) default @NonNull io.micronaut.core.convert.value.ConvertibleValues<Object>
default @NonNull Pageable
default Object[]
default <RT1> Optional<RT1>
getParameterInRole
(@NonNull String role, @NonNull Class<RT1> type) Return the value of the given parameter if the given role.default @NonNull String
getQuery()
The query to execute.The parameter binding.default Class<?>
The root entity type.default StoredQuery
default boolean
Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project.default boolean
Gets 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, synthesizeDeclaredAnnotationsByType
Methods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
Methods inherited from interface io.micronaut.data.runtime.query.internal.DelegateStoredQuery
getAnnotationMetadata, getArgumentTypes, getEntityIdentifierType, getExpandableQueryParts, getJoinFetchPaths, getName, getQueryBindings, getResultArgument, getResultDataType, getResultType, hasPageable, hasResultConsumer, isCount, isJsonEntity, isNative, isOptimisticLock, isSingleResult, useNumericPlaceholders
-
Method Details
-
getPreparedQueryDelegate
PreparedQuery<E,R> getPreparedQueryDelegate()- Returns:
- The delegate
-
getStoredQueryDelegate
- Specified by:
getStoredQueryDelegate
in interfaceDelegateStoredQuery<E,
R> - Returns:
- The delegate
-
getRootEntity
Description copied from interface:PagedQuery
The root entity type.- Specified by:
getRootEntity
in interfaceDelegateStoredQuery<E,
R> - Specified by:
getRootEntity
in interfacePagedQuery<E>
- Specified by:
getRootEntity
in interfaceStoredQuery<E,
R> - Returns:
- The root entity type
-
getQueryHints
Description copied from interface:PagedQuery
The parameter binding. That is the mapping between named query parameters and parameters of the method.- Specified by:
getQueryHints
in interfaceDelegateStoredQuery<E,
R> - Specified by:
getQueryHints
in interfacePagedQuery<E>
- Specified by:
getQueryHints
in interfacePreparedQuery<E,
R> - Specified by:
getQueryHints
in interfaceStoredQuery<E,
R> - Returns:
- The parameter binding.
-
isRawQuery
default boolean isRawQuery()Description copied from interface:PreparedQuery
Gets an indicator telling whether underlying query is raw query.- Specified by:
isRawQuery
in interfaceDelegateStoredQuery<E,
R> - Specified by:
isRawQuery
in interfacePreparedQuery<E,
R> - Specified by:
isRawQuery
in interfaceStoredQuery<E,
R> - Returns:
- true if it is raw query
-
getParameterInRole
default <RT1> Optional<RT1> getParameterInRole(@NonNull @NonNull String role, @NonNull @NonNull Class<RT1> type) Description copied from interface:PreparedDataOperation
Return the value of the given parameter if the given role.- Specified by:
getParameterInRole
in interfacePreparedDataOperation<E>
- Type Parameters:
RT1
- The generic type- Parameters:
role
- The roletype
- The type- Returns:
- An optional value.
-
getRepositoryType
- Specified by:
getRepositoryType
in interfacePreparedQuery<E,
R> - Returns:
- The repository type.
-
getParameterArray
- Specified by:
getParameterArray
in interfacePreparedQuery<E,
R> - Returns:
- The method parameters
-
getArguments
default io.micronaut.core.type.Argument[] getArguments()- Specified by:
getArguments
in interfacePreparedQuery<E,
R> - Returns:
- The method arguments
-
getPageable
- Specified by:
getPageable
in interfacePagedQuery<E>
- Returns:
- The pageable object. Defaults to
Pageable.UNPAGED
-
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 interfaceDelegateStoredQuery<E,
R> - Specified by:
isDtoProjection
in interfaceStoredQuery<E,
R> - Returns:
- Whether the query is a DTO projection query
-
getQuery
Description copied from interface:StoredQuery
The query to execute.- Specified by:
getQuery
in interfaceDelegateStoredQuery<E,
R> - Specified by:
getQuery
in interfaceStoredQuery<E,
R> - Returns:
- The query to execute
-
getAttributes
- Specified by:
getAttributes
in interfaceio.micronaut.core.attr.AttributeHolder
-
getAttribute
- Specified by:
getAttribute
in interfaceio.micronaut.core.attr.AttributeHolder
-
getAttribute
- Specified by:
getAttribute
in interfaceio.micronaut.core.attr.AttributeHolder
-