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,io.micronaut.core.naming.Named,PagedQuery<E>,PreparedDataOperation<R>,PreparedQuery<E,R>,SqlStoredQuery<E,R>,StoredDataOperation<R>,StoredQuery<E,R>
@Internal public interface SqlPreparedQuery<E,R> extends PreparedQuery<E,R>, SqlStoredQuery<E,R>
SQL version ofPreparedQuery. 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 io.micronaut.data.runtime.operations.internal.sql.SqlStoredQuery
SqlStoredQuery.Binder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidattachPageable(Pageable pageable, boolean isSingleResult)Modify the query according to the pageable.default voidbindParameters(SqlStoredQuery.Binder binder)Bind query parameters.voidbindParameters(SqlStoredQuery.Binder binder, E entity, java.util.Map<QueryParameterBinding,java.lang.Object> previousValues)Bind query parameters.RuntimePersistentEntity<E>getPersistentEntity()voidprepare(E entity)Prepare query.-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, 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.core.attr.AttributeHolder
getAttribute, getAttribute, getAttributes
-
Methods inherited from interface io.micronaut.data.model.runtime.PagedQuery
getPageable, getRootEntity
-
Methods inherited from interface io.micronaut.data.model.runtime.PreparedDataOperation
getParameterInRole
-
Methods inherited from interface io.micronaut.data.model.runtime.PreparedQuery
getArguments, getLastUpdatedType, getParameterArray, getParameterValues, getQueryHints, getRepositoryType
-
Methods inherited from interface io.micronaut.data.runtime.operations.internal.sql.SqlStoredQuery
bindParameters, collectAutoPopulatedPreviousValues, getDialect, getQueryBuilder, isExpandableQuery
-
Methods inherited from interface io.micronaut.data.model.runtime.StoredDataOperation
getTransactionDefinition
-
Methods inherited from interface io.micronaut.data.model.runtime.StoredQuery
getArgumentTypes, getEntityIdentifierType, getExpandableQueryParts, getIndexedParameterAutoPopulatedPreviousPropertyIndexes, getIndexedParameterAutoPopulatedPreviousPropertyPaths, getIndexedParameterAutoPopulatedPropertyPaths, getIndexedParameterBinding, getIndexedParameterPaths, getIndexedParameterTypes, getJoinFetchPaths, getLastUpdatedProperty, getParameterBinding, getParameterNames, getQuery, getQueryBindings, getQueryHints, getResultArgument, getResultDataType, getResultType, getRootEntity, hasInExpression, hasPageable, hasResultConsumer, isCount, isDtoProjection, isNative, isOptimisticLock, isSingleResult, useNumericPlaceholders
-
-
-
-
Method Detail
-
getPersistentEntity
RuntimePersistentEntity<E> getPersistentEntity()
- Specified by:
getPersistentEntityin interfaceSqlStoredQuery<E,R>- Returns:
- The persistent entity
-
prepare
void prepare(@Nullable E entity)Prepare query. The internal SQL query can be altered based on the requirements.- Parameters:
entity- The entity instance
-
attachPageable
void attachPageable(Pageable pageable, boolean isSingleResult)
Modify the query according to the pageable.- Parameters:
pageable- The pageableisSingleResult- is single result
-
bindParameters
void bindParameters(SqlStoredQuery.Binder binder, @Nullable E entity, @Nullable java.util.Map<QueryParameterBinding,java.lang.Object> previousValues)
Bind query parameters.- Parameters:
binder- The binderentity- The entitypreviousValues- The previous auto-populated collected values
-
bindParameters
default void bindParameters(SqlStoredQuery.Binder binder)
Bind query parameters.- Parameters:
binder- The binder
-
-