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>
@Internal public interface DelegatePreparedQuery<E,R> extends PreparedQuery<E,R>, DelegateStoredQuery<E,R>
Delegate implementation ofPreparedQuery.- Since:
- 3.3.
- Author:
- Denis Stepanov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default io.micronaut.core.type.Argument[]getArguments()default java.util.Optional<java.lang.Object>getAttribute(java.lang.CharSequence name)default <T> java.util.Optional<T>getAttribute(java.lang.CharSequence name, java.lang.Class<T> type)default io.micronaut.core.convert.value.ConvertibleValues<java.lang.Object>getAttributes()default PageablegetPageable()default java.lang.Object[]getParameterArray()default <RT1> java.util.Optional<RT1>getParameterInRole(java.lang.String role, java.lang.Class<RT1> type)Return the value of the given parameter if the given role.default java.util.Map<java.lang.String,java.lang.Object>getParameterValues()PreparedQuery<E,R>getPreparedQueryDelegate()default java.lang.StringgetQuery()The query to execute.default java.util.Map<java.lang.String,java.lang.Object>getQueryHints()The parameter binding.default java.lang.Class<?>getRepositoryType()default java.lang.Class<E>getRootEntity()The root entity type.default StoredQuerygetStoredQueryDelegate()default booleanisDtoProjection()Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project.-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, 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, getIndexedParameterAutoPopulatedPreviousPropertyIndexes, getIndexedParameterAutoPopulatedPreviousPropertyPaths, getIndexedParameterAutoPopulatedPropertyPaths, getJoinFetchPaths, getName, getQueryBindings, getResultArgument, getResultDataType, getResultType, getTransactionDefinition, hasInExpression, hasPageable, hasResultConsumer, isCount, isNative, isOptimisticLock, isSingleResult, useNumericPlaceholders
-
Methods inherited from interface io.micronaut.data.model.runtime.PreparedQuery
getLastUpdatedType
-
Methods inherited from interface io.micronaut.data.model.runtime.StoredQuery
getIndexedParameterBinding, getIndexedParameterPaths, getIndexedParameterTypes, getLastUpdatedProperty, getParameterBinding, getParameterNames
-
-
-
-
Method Detail
-
getPreparedQueryDelegate
PreparedQuery<E,R> getPreparedQueryDelegate()
- Returns:
- The delegate
-
getStoredQueryDelegate
default StoredQuery getStoredQueryDelegate()
- Specified by:
getStoredQueryDelegatein interfaceDelegateStoredQuery<E,R>- Returns:
- The delegate
-
getRootEntity
default java.lang.Class<E> 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
default java.util.Map<java.lang.String,java.lang.Object> 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.
-
getParameterInRole
default <RT1> java.util.Optional<RT1> getParameterInRole(@NonNull java.lang.String role, @NonNull java.lang.Class<RT1> type)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
default java.lang.Class<?> getRepositoryType()
- Specified by:
getRepositoryTypein interfacePreparedQuery<E,R>- Returns:
- The repository type.
-
getParameterValues
@NonNull default java.util.Map<java.lang.String,java.lang.Object> getParameterValues()
- Specified by:
getParameterValuesin interfacePreparedQuery<E,R>- Returns:
- The named parameter values
-
getParameterArray
default java.lang.Object[] 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
@NonNull default Pageable 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
@NonNull default java.lang.String 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
@NonNull default io.micronaut.core.convert.value.ConvertibleValues<java.lang.Object> getAttributes()
- Specified by:
getAttributesin interfaceio.micronaut.core.attr.AttributeHolder
-
getAttribute
@NonNull default java.util.Optional<java.lang.Object> getAttribute(java.lang.CharSequence name)
- Specified by:
getAttributein interfaceio.micronaut.core.attr.AttributeHolder
-
getAttribute
@NonNull default <T> java.util.Optional<T> getAttribute(java.lang.CharSequence name, java.lang.Class<T> type)- Specified by:
getAttributein interfaceio.micronaut.core.attr.AttributeHolder
-
-