E - The entity typeRT - The result type@Internal public final class DefaultPreparedQuery<E,RT> extends DefaultStoredDataOperation<RT> implements 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.lang.Class<?>[] |
getArgumentTypes()
The argument types to the method that invokes the query.
|
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() |
java.util.Optional<java.lang.Class<?>> |
getEntityIdentifierType()
The type of the ID member of the entity.
|
java.lang.String[] |
getExpandableQueryParts()
The query to execute.
|
int[] |
getIndexedParameterAutoPopulatedPreviousPropertyIndexes()
The mapping between query parameters and auto populated previous properties that the parameter represents.
|
java.lang.String[] |
getIndexedParameterAutoPopulatedPreviousPropertyPaths()
The mapping between query parameters and auto populated previous properties that the parameter represents.
|
java.lang.String[] |
getIndexedParameterAutoPopulatedPropertyPaths()
The mapping between query parameters and auto populated properties that the parameter represents.
|
java.util.Set<JoinPath> |
getJoinFetchPaths() |
java.lang.String |
getName() |
Pageable |
getPageable() |
java.lang.Object[] |
getParameterArray() |
java.util.Map<java.lang.String,java.lang.String> |
getParameterBinding()
The parameter binding.
|
<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.List<QueryParameterBinding> |
getQueryBindings()
The list of query bindings.
|
java.util.Map<java.lang.String,java.lang.Object> |
getQueryHints()
The parameter binding.
|
java.lang.Class<?> |
getRepositoryType() |
DataType |
getResultDataType() |
java.lang.Class<RT> |
getResultType()
The query result type.
|
java.lang.Class<E> |
getRootEntity()
The root entity type.
|
java.lang.String |
getUpdate()
The query to execute.
|
boolean |
hasInExpression()
Deprecated.
|
boolean |
hasPageable()
Does the query have a pageable.
|
boolean |
hasResultConsumer() |
boolean |
isCount() |
boolean |
isDtoProjection()
Returns whether the query returns the actual entity or a Data Transfer Object (DTO) project.
|
boolean |
isNative()
In cases where one needs to differentiate between at higher level query format (like JPA-QL) and a lower level format (like SQL).
|
boolean |
isOptimisticLock()
Is with an optimistic lock.
|
boolean |
isSingleResult()
Whether the query can be treated as a single result.
|
boolean |
useNumericPlaceholders()
Are the placeholders for query set using numeric indices starting from 1.
|
getAnnotationMetadata, getResultArgument, getTransactionDefinitionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLastUpdatedTypegetIndexedParameterBinding, getIndexedParameterPaths, getIndexedParameterTypes, getLastUpdatedProperty, getParameterNames, getResultArgumentgetTransactionDefinitionfindAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypepublic 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 java.lang.String[] getExpandableQueryParts()
StoredQuerygetExpandableQueryParts in interface StoredQuery<E,RT>public java.util.List<QueryParameterBinding> getQueryBindings()
StoredQuerygetQueryBindings in interface StoredQuery<E,RT>public <RT1> java.util.Optional<RT1> getParameterInRole(@NonNull
java.lang.String role,
@NonNull
java.lang.Class<RT1> type)
PreparedDataOperationgetParameterInRole in interface PreparedDataOperation<RT>RT1 - The generic typerole - The roletype - The typepublic boolean hasResultConsumer()
hasResultConsumer in interface StoredQuery<E,RT>@NonNull public java.util.Set<JoinPath> getJoinFetchPaths()
getJoinFetchPaths in interface StoredQuery<E,RT>public boolean isSingleResult()
StoredQueryisSingleResult in interface StoredQuery<E,RT>@NonNull public java.util.Map<java.lang.String,java.lang.Object> getQueryHints()
PagedQuerygetQueryHints in interface PagedQuery<E>getQueryHints in interface PreparedQuery<E,RT>getQueryHints in interface StoredQuery<E,RT>public 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.UNPAGEDpublic boolean isNative()
StoredQueryisNative in interface StoredQuery<E,RT>public boolean useNumericPlaceholders()
StoredQueryuseNumericPlaceholders in interface StoredQuery<E,RT>public boolean isDtoProjection()
StoredQueryisDtoProjection in interface StoredQuery<E,RT>@NonNull public java.lang.Class<RT> getResultType()
StoredQueryStoredQuery.getRootEntity().getResultType in interface StoredQuery<E,RT>@NonNull public DataType getResultDataType()
getResultDataType in interface StoredQuery<E,RT>@Nullable public java.util.Optional<java.lang.Class<?>> getEntityIdentifierType()
StoredQuerygetEntityIdentifierType in interface StoredQuery<E,RT>@NonNull public java.lang.Class<E> getRootEntity()
PagedQuerygetRootEntity in interface PagedQuery<E>getRootEntity in interface StoredQuery<E,RT>@Deprecated public boolean hasInExpression()
StoredQueryhasInExpression in interface StoredQuery<E,RT>public boolean hasPageable()
StoredQueryhasPageable in interface StoredQuery<E,RT>@NonNull public java.lang.String getQuery()
StoredQuerygetQuery in interface StoredQuery<E,RT>public java.lang.String getUpdate()
StoredQuerygetUpdate in interface StoredQuery<E,RT>@NonNull public java.lang.Class<?>[] getArgumentTypes()
StoredQuerygetArgumentTypes in interface StoredQuery<E,RT>@NonNull public java.util.Map<java.lang.String,java.lang.String> getParameterBinding()
StoredQuerygetParameterBinding in interface StoredQuery<E,RT>public boolean isCount()
isCount in interface StoredQuery<E,RT>@NonNull public java.lang.String getName()
getName in interface io.micronaut.core.naming.Named@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@Nullable public java.lang.String[] getIndexedParameterAutoPopulatedPropertyPaths()
StoredQuerygetIndexedParameterAutoPopulatedPropertyPaths in interface StoredQuery<E,RT>public java.lang.String[] getIndexedParameterAutoPopulatedPreviousPropertyPaths()
StoredQuerygetIndexedParameterAutoPopulatedPreviousPropertyPaths in interface StoredQuery<E,RT>public int[] getIndexedParameterAutoPopulatedPreviousPropertyIndexes()
StoredQuerygetIndexedParameterAutoPopulatedPreviousPropertyIndexes in interface StoredQuery<E,RT>public boolean isOptimisticLock()
StoredQueryisOptimisticLock in interface StoredQuery<E,RT>