E
- The entity typeRT
- The result type@Internal public final class DefaultPreparedQuery<E,RT> extends DefaultStoredDataOperation<RT> implements DelegateStoredQuery<E,RT>, PreparedQuery<E,RT>
NO_TRANSACTION
Constructor and Description |
---|
DefaultPreparedQuery(io.micronaut.aop.MethodInvocationContext<?,?> context,
StoredQuery<E,RT> storedQuery,
java.lang.String finalQuery,
Pageable pageable,
boolean dtoProjection,
io.micronaut.core.convert.ConversionService<?> conversionService)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.core.type.Argument[] |
getArguments() |
java.util.Optional<java.lang.Object> |
getAttribute(java.lang.CharSequence name) |
<T> java.util.Optional<T> |
getAttribute(java.lang.CharSequence name,
java.lang.Class<T> type) |
io.micronaut.core.convert.value.ConvertibleValues<java.lang.Object> |
getAttributes() |
io.micronaut.aop.MethodInvocationContext<?,?> |
getContext() |
Pageable |
getPageable() |
java.lang.Object[] |
getParameterArray() |
<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.
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameterValues() |
java.lang.String |
getQuery()
The query to execute.
|
java.util.Map<java.lang.String,java.lang.Object> |
getQueryHints()
The parameter binding.
|
java.lang.Class<?> |
getRepositoryType() |
java.lang.Class<E> |
getRootEntity()
The root entity type.
|
StoredQuery<E,RT> |
getStoredQueryDelegate() |
boolean |
isDtoProjection()
Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project.
|
getAnnotationMetadata, getResultArgument, getTransactionDefinition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotationMetadata, getArgumentTypes, getEntityIdentifierType, getExpandableQueryParts, getIndexedParameterAutoPopulatedPreviousPropertyIndexes, getIndexedParameterAutoPopulatedPreviousPropertyPaths, getIndexedParameterAutoPopulatedPropertyPaths, getJoinFetchPaths, getName, getQueryBindings, getResultArgument, getResultDataType, getResultType, getTransactionDefinition, hasInExpression, hasPageable, hasResultConsumer, isCount, isNative, isOptimisticLock, isSingleResult, useNumericPlaceholders
getLastUpdatedType
getIndexedParameterBinding, getIndexedParameterPaths, getIndexedParameterTypes, getLastUpdatedProperty, getParameterBinding, getParameterNames
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
public DefaultPreparedQuery(io.micronaut.aop.MethodInvocationContext<?,?> context, StoredQuery<E,RT> storedQuery, java.lang.String finalQuery, @NonNull Pageable pageable, boolean dtoProjection, io.micronaut.core.convert.ConversionService<?> conversionService)
context
- The execution contextstoredQuery
- The stored queryfinalQuery
- The final querypageable
- The pageabledtoProjection
- Whether the prepared query is a dto projectionconversionService
- The conversion servicepublic io.micronaut.aop.MethodInvocationContext<?,?> getContext()
public java.lang.Class<E> getRootEntity()
StoredQuery
getRootEntity
in interface PagedQuery<E>
getRootEntity
in interface StoredQuery<E,RT>
getRootEntity
in interface DelegateStoredQuery<E,RT>
public java.util.Map<java.lang.String,java.lang.Object> getQueryHints()
StoredQuery
getQueryHints
in interface PagedQuery<E>
getQueryHints
in interface PreparedQuery<E,RT>
getQueryHints
in interface StoredQuery<E,RT>
getQueryHints
in interface DelegateStoredQuery<E,RT>
public StoredQuery<E,RT> getStoredQueryDelegate()
getStoredQueryDelegate
in interface DelegateStoredQuery<E,RT>
public <RT1> java.util.Optional<RT1> getParameterInRole(@NonNull java.lang.String role, @NonNull java.lang.Class<RT1> type)
PreparedDataOperation
getParameterInRole
in interface PreparedDataOperation<RT>
RT1
- The generic typerole
- The roletype
- The typepublic java.lang.Class<?> getRepositoryType()
getRepositoryType
in interface PreparedQuery<E,RT>
@NonNull public java.util.Map<java.lang.String,java.lang.Object> getParameterValues()
getParameterValues
in interface PreparedQuery<E,RT>
public java.lang.Object[] getParameterArray()
getParameterArray
in interface PreparedQuery<E,RT>
public io.micronaut.core.type.Argument[] getArguments()
getArguments
in interface PreparedQuery<E,RT>
@NonNull public Pageable getPageable()
getPageable
in interface PagedQuery<E>
Pageable.UNPAGED
public boolean isDtoProjection()
StoredQuery
isDtoProjection
in interface StoredQuery<E,RT>
isDtoProjection
in interface DelegateStoredQuery<E,RT>
@NonNull public java.lang.String getQuery()
StoredQuery
getQuery
in interface StoredQuery<E,RT>
getQuery
in interface DelegateStoredQuery<E,RT>
@NonNull public io.micronaut.core.convert.value.ConvertibleValues<java.lang.Object> getAttributes()
getAttributes
in interface io.micronaut.core.attr.AttributeHolder
@NonNull public java.util.Optional<java.lang.Object> getAttribute(java.lang.CharSequence name)
getAttribute
in interface io.micronaut.core.attr.AttributeHolder
@NonNull public <T> java.util.Optional<T> getAttribute(java.lang.CharSequence name, java.lang.Class<T> type)
getAttribute
in interface io.micronaut.core.attr.AttributeHolder