Class DefaultPreparedQuery<E,RT> 
java.lang.Object
io.micronaut.data.model.runtime.DefaultStoredDataOperation<RT>
io.micronaut.data.runtime.query.internal.DefaultPreparedQuery<E,RT> 
- Type Parameters:
- E- The entity type
- RT- The result type
- All Implemented Interfaces:
- io.micronaut.core.annotation.AnnotationMetadataProvider,- io.micronaut.core.annotation.AnnotationSource,- io.micronaut.core.attr.AttributeHolder,- io.micronaut.core.naming.Named,- PagedQuery<E>,- PreparedDataOperation<RT>,- PreparedQuery<E,,- RT> - StoredDataOperation<RT>,- StoredQuery<E,,- RT> - DelegateStoredQuery<E,- RT> 
@Internal
public final class DefaultPreparedQuery<E,RT> 
extends DefaultStoredDataOperation<RT>
implements DelegateStoredQuery<E,RT>, PreparedQuery<E,RT>  
Represents a prepared query.
- 
Field SummaryFields inherited from interface io.micronaut.core.annotation.AnnotationSourceEMPTY
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultPreparedQuery(io.micronaut.aop.MethodInvocationContext<?, ?> context, StoredQuery<E, RT> storedQuery, String finalQuery, @NonNull Pageable pageable, boolean dtoProjection, io.micronaut.core.convert.ConversionService conversionService) The default constructor.
- 
Method SummaryModifier and TypeMethodDescriptionio.micronaut.core.type.Argument[]getAttribute(CharSequence name) <T> @NonNull Optional<T>getAttribute(CharSequence name, Class<T> type) @NonNull io.micronaut.core.convert.value.ConvertibleValues<Object>io.micronaut.aop.MethodInvocationContext<?,?> @NonNull PageableObject[]<RT1> Optional<RT1>getParameterInRole(@NonNull String role, @NonNull Class<RT1> type) Return the value of the given parameter if the given role.@NonNull StringgetQuery()The query to execute.The parameter binding.Class<?>The root entity type.booleanReturns whether the query returns the actual entity or a Data Transfer Object (DTO) project.booleanGets an indicator telling whether underlying query is raw query.Methods inherited from class io.micronaut.data.model.runtime.DefaultStoredDataOperationgetAnnotationMetadata, getResultArgumentMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProviderfindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getTargetAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSourcegetAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.data.runtime.query.internal.DelegateStoredQuerygetAnnotationMetadata, getArgumentTypes, getEntityIdentifierType, getExpandableQueryParts, getJoinFetchPaths, getName, getQueryBindings, getResultArgument, getResultDataType, getResultType, hasPageable, hasResultConsumer, isCount, isJsonEntity, isNative, isOptimisticLock, isSingleResult, useNumericPlaceholders
- 
Constructor Details- 
DefaultPreparedQuerypublic DefaultPreparedQuery(io.micronaut.aop.MethodInvocationContext<?, ?> context, StoredQuery<E, RT> storedQuery, String finalQuery, @NonNull @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 Details- 
getContextpublic io.micronaut.aop.MethodInvocationContext<?,?> getContext()- Returns:
- The context
 
- 
getRootEntityDescription copied from interface:StoredQueryThe root entity type.- Specified by:
- getRootEntityin interface- DelegateStoredQuery<E,- RT> 
- Specified by:
- getRootEntityin interface- PagedQuery<E>
- Specified by:
- getRootEntityin interface- StoredQuery<E,- RT> 
- Returns:
- The root entity type
 
- 
getQueryHintsDescription copied from interface:StoredQueryThe parameter binding. That is the mapping between named query parameters and parameters of the method.- Specified by:
- getQueryHintsin interface- DelegateStoredQuery<E,- RT> 
- Specified by:
- getQueryHintsin interface- PagedQuery<E>
- Specified by:
- getQueryHintsin interface- PreparedQuery<E,- RT> 
- Specified by:
- getQueryHintsin interface- StoredQuery<E,- RT> 
- Returns:
- The parameter binding.
 
- 
isRawQuerypublic boolean isRawQuery()Description copied from interface:StoredQueryGets an indicator telling whether underlying query is raw query.- Specified by:
- isRawQueryin interface- DelegateStoredQuery<E,- RT> 
- Specified by:
- isRawQueryin interface- PreparedQuery<E,- RT> 
- Specified by:
- isRawQueryin interface- StoredQuery<E,- RT> 
- Returns:
- true if it is raw query
 
- 
getStoredQueryDelegate- Specified by:
- getStoredQueryDelegatein interface- DelegateStoredQuery<E,- RT> 
- Returns:
- The delegate
 
- 
getParameterInRolepublic <RT1> Optional<RT1> getParameterInRole(@NonNull @NonNull String role, @NonNull @NonNull Class<RT1> type) Description copied from interface:PreparedDataOperationReturn the value of the given parameter if the given role.- Specified by:
- getParameterInRolein interface- PreparedDataOperation<E>
- Type Parameters:
- RT1- The generic type
- Parameters:
- role- The role
- type- The type
- Returns:
- An optional value.
 
- 
getRepositoryType- Specified by:
- getRepositoryTypein interface- PreparedQuery<E,- RT> 
- Returns:
- The repository type.
 
- 
getParameterArray- Specified by:
- getParameterArrayin interface- PreparedQuery<E,- RT> 
- Returns:
- The method parameters
 
- 
getArgumentspublic io.micronaut.core.type.Argument[] getArguments()- Specified by:
- getArgumentsin interface- PreparedQuery<E,- RT> 
- Returns:
- The method arguments
 
- 
getPageable- Specified by:
- getPageablein interface- PagedQuery<E>
- Returns:
- The pageable object. Defaults to Pageable.UNPAGED
 
- 
isDtoProjectionpublic 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 interface- DelegateStoredQuery<E,- RT> 
- Specified by:
- isDtoProjectionin interface- StoredQuery<E,- RT> 
- Returns:
- Whether the query is a DTO projection query
 
- 
getQueryDescription copied from interface:StoredQueryThe query to execute.- Specified by:
- getQueryin interface- DelegateStoredQuery<E,- RT> 
- Specified by:
- getQueryin interface- StoredQuery<E,- RT> 
- Returns:
- The query to execute
 
- 
getAttributes- Specified by:
- getAttributesin interface- io.micronaut.core.attr.AttributeHolder
 
- 
getAttribute- Specified by:
- getAttributein interface- io.micronaut.core.attr.AttributeHolder
 
- 
getAttribute- Specified by:
- getAttributein interface- io.micronaut.core.attr.AttributeHolder
 
 
-