Interface SqlStoredQuery<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.naming.Named
,StoredDataOperation<R>
,StoredQuery<E,R>
- All Known Subinterfaces:
SqlPreparedQuery<E,R>
@Internal public interface SqlStoredQuery<E,R> extends StoredQuery<E,R>
SQL version ofStoredQuery
carrying extra SQL related data.- Since:
- 3.5.0
- Author:
- Denis Stepanov
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SqlStoredQuery.Binder
Parameters binder.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
bindParameters(SqlStoredQuery.Binder binder, io.micronaut.aop.InvocationContext<?,?> invocationContext, E entity, java.util.Map<QueryParameterBinding,java.lang.Object> previousValues)
Bind query parameters.java.util.Map<QueryParameterBinding,java.lang.Object>
collectAutoPopulatedPreviousValues(E entity)
Collect auto-populated property values before pre-actions are triggered and property values are modified.Dialect
getDialect()
Get dialect.RuntimePersistentEntity<E>
getPersistentEntity()
SqlQueryBuilder
getQueryBuilder()
boolean
isExpandableQuery()
-
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.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()
- Returns:
- The persistent entity
-
isExpandableQuery
boolean isExpandableQuery()
- Returns:
- true if query is expandable
-
getDialect
Dialect getDialect()
Get dialect.- Returns:
- dialect
-
getQueryBuilder
SqlQueryBuilder getQueryBuilder()
- Returns:
- query builder for possible modification in the prepared query
-
collectAutoPopulatedPreviousValues
java.util.Map<QueryParameterBinding,java.lang.Object> collectAutoPopulatedPreviousValues(E entity)
Collect auto-populated property values before pre-actions are triggered and property values are modified.- Parameters:
entity
- The entity instance- Returns:
- collected values
-
bindParameters
void bindParameters(SqlStoredQuery.Binder binder, @Nullable io.micronaut.aop.InvocationContext<?,?> invocationContext, @Nullable E entity, @Nullable java.util.Map<QueryParameterBinding,java.lang.Object> previousValues)
Bind query parameters.- Parameters:
binder
- The binderinvocationContext
- The invocation contextentity
- The entitypreviousValues
- The previous auto-populated collected values
-
-