Interface SqlPreparedQuery<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, BindableParametersPreparedQuery<E,R>, BindableParametersStoredQuery<E, R>, io.micronaut.core.convert.ConversionServiceProvider, io.micronaut.core.naming.Named, PagedQuery<E>, PersistentEntityAwareQuery<E>, PreparedDataOperation<R>, PreparedQuery<E, R>, SqlStoredQuery<E, R>, StoredDataOperation<R>, StoredQuery<E, R>
- All Known Implementing Classes:
DefaultSqlPreparedQuery
@Internal
public interface SqlPreparedQuery<E,R>
extends BindableParametersPreparedQuery<E,R>, SqlStoredQuery<E,R>
SQL version of
SqlStoredQuery.
The instance of a prepared query has mutable state compared to a stored query.- Since:
- 3.5.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Nested classes/interfaces inherited from interface BindableParametersStoredQuery
BindableParametersStoredQuery.BinderNested classes/interfaces inherited from interface StoredQuery
StoredQuery.OperationType -
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptionvoidattachPageable(Pageable pageable, Limit limit, Sort sort) Modify the query according to the pageable.default voidattachPageable(Pageable pageable, Limit limit, Sort sort, boolean isSingleResult) Modify the query according to the pageable.@Nullable io.micronaut.aop.InvocationContext<?, ?> Returns the invocation context associated with this prepared query.@Nullable QueryResultInfovoidPrepare query.Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, 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 io.micronaut.core.attr.AttributeHolder
getAttribute, getAttribute, getAttributesMethods inherited from interface BindableParametersPreparedQuery
bindParameters, bindParametersMethods inherited from interface BindableParametersStoredQuery
bindParametersMethods inherited from interface io.micronaut.core.naming.Named
getNameMethods inherited from interface PagedQuery
getPageable, getRootEntityMethods inherited from interface PreparedDataOperation
getParameterInRole, getParametersInRoleMethods inherited from interface PreparedQuery
getArguments, getConversionService, getParameterArray, getQueryHints, getQueryLimit, getRepositoryType, getSort, isRawQueryMethods inherited from interface SqlStoredQuery
collectAutoPopulatedPreviousValues, getDialect, getQueryBuilder, isExpandableQueryMethods inherited from interface StoredQuery
getExpandableQueryParts, getJoinPaths, getOperationType, getParameterExpressions, getQuery, getQueryBindings, getQueryHints, getQueryLimit, getResultArgument, getResultDataType, getResultType, getRootEntity, getSort, hasPageable, hasResultConsumer, isCount, isDtoProjection, isJsonEntity, isNative, isOptimisticLock, isProcedure
-
Method Details
-
prepare
Prepare query. The internal SQL query can be altered based on the requirements.- Parameters:
entity- The entity instance
-
attachPageable
-
attachPageable
-
getQueryResultInfo
@Nullable QueryResultInfo getQueryResultInfo()- Specified by:
getQueryResultInfoin interfaceSqlStoredQuery<E,R> - Returns:
- the query result info
- Since:
- 4.0.0
-
getInvocationContext
@Nullable io.micronaut.aop.InvocationContext<?,?> getInvocationContext()Returns the invocation context associated with this prepared query.- Returns:
- the invocation context
-
getPersistentEntity
RuntimePersistentEntity<E> getPersistentEntity()- Specified by:
getPersistentEntityin interfacePersistentEntityAwareQuery<E>- Returns:
- The persistent entity
-