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, io.micronaut.core.convert.ConversionServiceProvider, 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
-
Nested Class Summary
Nested classes/interfaces inherited from interface StoredQuery
StoredQuery.OperationType -
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 io.micronaut.core.convert.ConversionServicedefault @NonNull Pageabledefault 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 <RT> List<RT> getParametersInRole(String role, Class<RT> type) Return the values of the given parameter if the given role.default @NonNull StringgetQuery()The query to execute.The parameter binding.default Limitdefault Class<?> The root entity type.default SortgetSort()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 DelegateStoredQuery
getAnnotationMetadata, getExpandableQueryParts, getJoinPaths, getName, getOperationType, getParameterExpressions, getQueryBindings, getResultArgument, getResultDataType, getResultType, hasPageable, hasResultConsumer, isCount, isJsonEntity, isNative, isOptimisticLock, isProcedure
-
Method Details
-
getPreparedQueryDelegate
PreparedQuery<E,R> getPreparedQueryDelegate()- Returns:
- The delegate
-
getConversionService
default io.micronaut.core.convert.ConversionService getConversionService()- Specified by:
getConversionServicein interfaceio.micronaut.core.convert.ConversionServiceProvider- Specified by:
getConversionServicein interfacePreparedQuery<E,R>
-
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.
-
getParametersInRole
Description copied from interface:PreparedDataOperationReturn the values of the given parameter if the given role.- Specified by:
getParametersInRolein interfacePreparedDataOperation<E>- Type Parameters:
RT- The generic type- Parameters:
role- The roletype- The type- Returns:
- An optional value.
-
getRepositoryType
- Specified by:
getRepositoryTypein interfacePreparedQuery<E,R> - Returns:
- The repository type.
-
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
-
getSort
- Specified by:
getSortin interfaceDelegateStoredQuery<E,R> - Specified by:
getSortin interfacePagedQuery<E>- Specified by:
getSortin interfacePreparedQuery<E,R> - Specified by:
getSortin interfaceStoredQuery<E,R> - Returns:
- The sort
-
getQueryLimit
- Specified by:
getQueryLimitin interfaceDelegateStoredQuery<E,R> - Specified by:
getQueryLimitin interfacePagedQuery<E>- Specified by:
getQueryLimitin interfacePreparedQuery<E,R> - Specified by:
getQueryLimitin interfaceStoredQuery<E,R> - Returns:
- The limit
-