@RequiresReactiveMongo @EachBean(value=com.mongodb.reactivestreams.client.MongoClient.class) @Internal public class DefaultReactiveMongoRepositoryOperations extends AbstractRepositoryOperations<Cnt,PS> implements MongoReactorRepositoryOperations, ReactorReactiveRepositoryOperations, ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<DefaultReactiveMongoRepositoryOperations.MongoOperationContext>, ReactiveTransactionOperations<com.mongodb.reactivestreams.client.ClientSession>
Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultReactiveMongoRepositoryOperations.MongoOperationContext |
ReactiveTransactionOperations.TransactionalCallback<C,T>
Modifier and Type | Field and Description |
---|---|
protected static org.bson.BsonDocument |
EMPTY |
protected java.util.Map<java.lang.Class,java.lang.String> |
repoDatabaseConfig |
attributeConverterRegistry, conversionService, dateTimeProvider, entityEventRegistry, jsonCodec, runtimeEntityRegistry
CLIENT_SESSION_CONTEXT_KEY
Modifier and Type | Method and Description |
---|---|
protected org.bson.BsonDocument |
association(org.bson.codecs.configuration.CodecRegistry codecRegistry,
java.lang.Object value,
RuntimePersistentEntity<java.lang.Object> persistentEntity,
java.lang.Object child,
RuntimePersistentEntity<java.lang.Object> childPersistentEntity) |
protected <R> R |
convertResult(org.bson.codecs.configuration.CodecRegistry codecRegistry,
java.lang.Class<R> resultType,
org.bson.BsonDocument result,
boolean isDtoProjection) |
<T> reactor.core.publisher.Mono<java.lang.Long> |
count(PagedQuery<T> pagedQuery)
Counts all results for the given query.
|
StoredQuery<java.lang.Object,java.lang.Long> |
createCountStoredQuery(io.micronaut.inject.ExecutableMethod<?,?> executableMethod,
DataMethod.OperationType operationType,
java.lang.String name,
io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
java.lang.Class<java.lang.Object> rootEntity,
java.lang.String query,
java.lang.String[] queryParts,
java.util.List<QueryParameterBinding> queryParameters)
Create count stored query from provided values.
|
<E,QR> StoredQuery<E,QR> |
createStoredQuery(io.micronaut.inject.ExecutableMethod<?,?> executableMethod,
DataMethod.OperationType operationType,
java.lang.String name,
io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
java.lang.Class<java.lang.Object> rootEntity,
java.lang.String query,
java.lang.String update,
java.lang.String[] queryParts,
java.util.List<QueryParameterBinding> queryParameters,
boolean hasPageable,
boolean isSingleResult)
Create stored query from provided values.
|
protected io.micronaut.core.convert.ConversionContext |
createTypeConversionContext(com.mongodb.reactivestreams.client.ClientSession connection,
RuntimePersistentProperty<?> property,
io.micronaut.core.type.Argument<?> argument)
Creates implementation specific conversion context.
|
<T> reactor.core.publisher.Mono<java.lang.Number> |
delete(DeleteOperation<T> operation)
Deletes the entity.
|
<T> reactor.core.publisher.Mono<java.lang.Number> |
deleteAll(DeleteBatchOperation<T> operation)
Deletes all the entities of the given type.
|
reactor.core.publisher.Mono<java.lang.Number> |
executeDelete(PreparedQuery<?,java.lang.Number> preparedQuery)
Executes a batch delete for the given query and parameter values.
|
reactor.core.publisher.Mono<java.lang.Number> |
executeUpdate(PreparedQuery<?,java.lang.Number> preparedQuery)
Executes an update for the given query and parameter values.
|
<T> reactor.core.publisher.Mono<java.lang.Boolean> |
exists(PreparedQuery<T,java.lang.Boolean> preparedQuery)
Check with an record exists for the given query.
|
<T> reactor.core.publisher.Flux<T> |
findAll(PagedQuery<T> query)
Finds all results for the given query.
|
<T,R> reactor.core.publisher.Flux<R> |
findAll(PreparedQuery<T,R> preparedQuery)
Finds all results for the given query.
|
<T> reactor.core.publisher.Mono<T> |
findOne(java.lang.Class<T> type,
java.io.Serializable id)
Find one by ID.
|
<T,R> reactor.core.publisher.Mono<R> |
findOne(PreparedQuery<T,R> preparedQuery)
Find one by Query.
|
<T> reactor.core.publisher.Mono<T> |
findOptional(java.lang.Class<T> type,
java.io.Serializable id)
Find one by ID.
|
<T,R> reactor.core.publisher.Mono<R> |
findOptional(PreparedQuery<T,R> preparedQuery)
Find one by Query.
|
<R> reactor.core.publisher.Mono<Page<R>> |
findPage(PagedQuery<R> pagedQuery)
Find a page for the given entity and pageable.
|
protected org.bson.codecs.configuration.CodecRegistry |
getCodecRegistry(com.mongodb.reactivestreams.client.MongoDatabase mongoDatabase) |
protected com.mongodb.reactivestreams.client.MongoDatabase |
getDatabase(RuntimePersistentEntity<?> persistentEntity,
java.lang.Class<?> repositoryClass) |
protected <E,R> MongoPreparedQuery<E,R,Dtb> |
getMongoPreparedQuery(PreparedQuery<E,R> preparedQuery) |
protected <E,R> MongoStoredQuery<E,R,Dtb> |
getMongoStoredQuery(StoredQuery<E,R> storedQuery) |
protected void |
logAggregate(MongoAggregation aggregation) |
protected void |
logFind(MongoFind find) |
<T> reactor.core.publisher.Mono<T> |
persist(InsertOperation<T> operation)
Persist the entity returning a possibly new entity.
|
<T> reactor.core.publisher.Flux<T> |
persistAll(InsertBatchOperation<T> operation)
Persist all the given entities.
|
<T> reactor.core.publisher.Flux<T> |
persistBatch(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx,
java.lang.Iterable<T> values,
RuntimePersistentEntity<T> persistentEntity,
java.util.function.Predicate<T> predicate)
Persist multiple entities in batch during cascade.
|
reactor.core.publisher.Mono<java.lang.Void> |
persistManyAssociation(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx,
RuntimeAssociation runtimeAssociation,
java.lang.Object value,
RuntimePersistentEntity<java.lang.Object> persistentEntity,
java.lang.Object child,
RuntimePersistentEntity<java.lang.Object> childPersistentEntity)
Persist JOIN table relationship.
|
reactor.core.publisher.Mono<java.lang.Void> |
persistManyAssociationBatch(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx,
RuntimeAssociation runtimeAssociation,
java.lang.Object value,
RuntimePersistentEntity<java.lang.Object> persistentEntity,
java.lang.Iterable<java.lang.Object> child,
RuntimePersistentEntity<java.lang.Object> childPersistentEntity,
java.util.function.Predicate<java.lang.Object> veto)
Persist JOIN table relationships in batch.
|
<T> reactor.core.publisher.Mono<T> |
persistOne(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx,
T value,
RuntimePersistentEntity<T> persistentEntity)
Persist one entity during cascade.
|
<E,R> StoredQuery<E,R> |
resolveCountQuery(io.micronaut.aop.MethodInvocationContext<?,?> context,
java.lang.Class<E> entityClass,
java.lang.Class<R> resultType)
Stored count query resolved from the method context.
|
<E,R> PreparedQuery<E,R> |
resolveCountQuery(io.micronaut.aop.MethodInvocationContext<?,?> context,
StoredQuery<E,R> storedQuery,
Pageable pageable)
Prepared count query resolved from the method context.
|
<E,R> StoredQuery<E,R> |
resolveQuery(io.micronaut.aop.MethodInvocationContext<?,?> context,
java.lang.Class<E> entityClass,
java.lang.Class<R> resultType)
Stored query resolved from the method context.
|
<E,R> PreparedQuery<E,R> |
resolveQuery(io.micronaut.aop.MethodInvocationContext<?,?> context,
StoredQuery<E,R> storedQuery,
Pageable pageable)
Prepared query resolved from the method context.
|
void |
setStatementParameter(java.lang.Object preparedStatement,
int index,
DataType dataType,
java.lang.Object value,
Dialect dialect)
Set the parameter value on the given statement.
|
<T> reactor.core.publisher.Mono<T> |
update(UpdateOperation<T> operation)
Updates the entity returning a possibly new entity.
|
<T> reactor.core.publisher.Flux<T> |
updateAll(UpdateBatchOperation<T> operation)
Updates the entities for the given operation.
|
<T> reactor.core.publisher.Mono<T> |
updateOne(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx,
T value,
RuntimePersistentEntity<T> persistentEntity)
Update one entity during cascade.
|
<T> reactor.core.publisher.Mono<T> |
withClientSession(java.util.function.Function<com.mongodb.reactivestreams.client.ClientSession,reactor.core.publisher.Mono<? extends T>> function)
Starts a new session or reuses one from the context.
|
<T> reactor.core.publisher.Flux<T> |
withClientSessionMany(java.util.function.Function<com.mongodb.reactivestreams.client.ClientSession,reactor.core.publisher.Flux<? extends T>> function)
Starts a new session or reuses one from the context.
|
<T> org.reactivestreams.Publisher<T> |
withTransaction(ReactiveTransactionStatus<com.mongodb.reactivestreams.client.ClientSession> status,
ReactiveTransactionOperations.TransactionalCallback<com.mongodb.reactivestreams.client.ClientSession,T> handler)
Execute the given handler with a new transaction.
|
<T> reactor.core.publisher.Flux<T> |
withTransaction(TransactionDefinition definition,
ReactiveTransactionOperations.TransactionalCallback<com.mongodb.reactivestreams.client.ClientSession,T> handler)
Execute the given handler with a new transaction.
|
checkOptimisticLocking, convert, convert, getApplicationContext, getConversionService, getEntity, getIdReader, getRuntimeEntityRegistry, isOnlySingleEndedJoins, shiftIndex, triggerPostLoad
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isSupportsBatchDelete, isSupportsBatchInsert, isSupportsBatchUpdate
withTransaction
getQueryHints
protected static final org.bson.BsonDocument EMPTY
protected final java.util.Map<java.lang.Class,java.lang.String> repoDatabaseConfig
public <T> reactor.core.publisher.Mono<T> findOne(java.lang.Class<T> type, java.io.Serializable id)
ReactiveRepositoryOperations
findOne
in interface ReactiveRepositoryOperations
findOne
in interface ReactorReactiveRepositoryOperations
T
- The generic typetype
- The typeid
- The idpublic <T,R> reactor.core.publisher.Mono<R> findOne(PreparedQuery<T,R> preparedQuery)
ReactiveRepositoryOperations
findOne
in interface ReactiveRepositoryOperations
findOne
in interface ReactorReactiveRepositoryOperations
T
- The generic resultTypeR
- The result typepreparedQuery
- The prepared querypublic <T> reactor.core.publisher.Mono<java.lang.Boolean> exists(PreparedQuery<T,java.lang.Boolean> preparedQuery)
ReactiveRepositoryOperations
exists
in interface ReactiveRepositoryOperations
exists
in interface ReactorReactiveRepositoryOperations
T
- The declaring typepreparedQuery
- The querypublic <T> reactor.core.publisher.Flux<T> findAll(PagedQuery<T> query)
ReactiveRepositoryOperations
findAll
in interface ReactiveRepositoryOperations
findAll
in interface ReactorReactiveRepositoryOperations
T
- The generic typequery
- The paged querypublic <T> reactor.core.publisher.Mono<java.lang.Long> count(PagedQuery<T> pagedQuery)
ReactiveRepositoryOperations
count
in interface ReactiveRepositoryOperations
count
in interface ReactorReactiveRepositoryOperations
T
- The generic typepagedQuery
- The paged querypublic <T,R> reactor.core.publisher.Flux<R> findAll(PreparedQuery<T,R> preparedQuery)
ReactiveRepositoryOperations
findAll
in interface ReactiveRepositoryOperations
findAll
in interface ReactorReactiveRepositoryOperations
T
- The entity typeR
- The result typepreparedQuery
- The prepared querypublic <T> reactor.core.publisher.Mono<T> findOptional(java.lang.Class<T> type, java.io.Serializable id)
ReactiveRepositoryOperations
findOptional
in interface ReactiveRepositoryOperations
findOptional
in interface ReactorReactiveRepositoryOperations
T
- The generic typetype
- The typeid
- The idpublic <T,R> reactor.core.publisher.Mono<R> findOptional(PreparedQuery<T,R> preparedQuery)
ReactiveRepositoryOperations
findOptional
in interface ReactiveRepositoryOperations
findOptional
in interface ReactorReactiveRepositoryOperations
T
- The generic resultTypeR
- The result typepreparedQuery
- The prepared querypublic <R> reactor.core.publisher.Mono<Page<R>> findPage(PagedQuery<R> pagedQuery)
ReactiveRepositoryOperations
findPage
in interface ReactiveRepositoryOperations
findPage
in interface ReactorReactiveRepositoryOperations
R
- The entity generic typepagedQuery
- The paged querypublic <T> reactor.core.publisher.Mono<T> persist(InsertOperation<T> operation)
ReactiveRepositoryOperations
persist
in interface ReactiveRepositoryOperations
persist
in interface ReactorReactiveRepositoryOperations
T
- The generic typeoperation
- The entity operationpublic <T> reactor.core.publisher.Flux<T> persistAll(InsertBatchOperation<T> operation)
ReactiveRepositoryOperations
persistAll
in interface ReactiveRepositoryOperations
persistAll
in interface ReactorReactiveRepositoryOperations
T
- The generic typeoperation
- The batch operationpublic <T> reactor.core.publisher.Mono<T> update(UpdateOperation<T> operation)
ReactiveRepositoryOperations
update
in interface ReactiveRepositoryOperations
update
in interface ReactorReactiveRepositoryOperations
T
- The generic typeoperation
- The entity operationpublic <T> reactor.core.publisher.Flux<T> updateAll(UpdateBatchOperation<T> operation)
ReactiveRepositoryOperations
updateAll
in interface ReactiveRepositoryOperations
updateAll
in interface ReactorReactiveRepositoryOperations
T
- The generic typeoperation
- The operationpublic <T> reactor.core.publisher.Mono<java.lang.Number> delete(DeleteOperation<T> operation)
ReactiveRepositoryOperations
delete
in interface ReactiveRepositoryOperations
delete
in interface ReactorReactiveRepositoryOperations
T
- The generic typeoperation
- The batch operationpublic <T> reactor.core.publisher.Mono<java.lang.Number> deleteAll(DeleteBatchOperation<T> operation)
ReactiveRepositoryOperations
deleteAll
in interface ReactiveRepositoryOperations
deleteAll
in interface ReactorReactiveRepositoryOperations
T
- The generic typeoperation
- The batch operationpublic reactor.core.publisher.Mono<java.lang.Number> executeUpdate(PreparedQuery<?,java.lang.Number> preparedQuery)
ReactiveRepositoryOperations
executeUpdate
in interface ReactiveRepositoryOperations
executeUpdate
in interface ReactorReactiveRepositoryOperations
preparedQuery
- The prepared querypublic reactor.core.publisher.Mono<java.lang.Number> executeDelete(PreparedQuery<?,java.lang.Number> preparedQuery)
ReactiveRepositoryOperations
executeDelete
in interface ReactiveRepositoryOperations
executeDelete
in interface ReactorReactiveRepositoryOperations
preparedQuery
- The prepared queryprotected io.micronaut.core.convert.ConversionContext createTypeConversionContext(com.mongodb.reactivestreams.client.ClientSession connection, RuntimePersistentProperty<?> property, io.micronaut.core.type.Argument<?> argument)
AbstractRepositoryOperations
connection
- The connectionproperty
- The propertyargument
- The argumentConversionContext
public void setStatementParameter(java.lang.Object preparedStatement, int index, DataType dataType, java.lang.Object value, Dialect dialect)
OpContext
setStatementParameter
in interface OpContext<com.mongodb.reactivestreams.client.ClientSession,java.lang.Object>
preparedStatement
- The prepared statementindex
- The indexdataType
- The data typevalue
- The valuedialect
- The dialectpublic <T> reactor.core.publisher.Mono<T> persistOne(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx, T value, RuntimePersistentEntity<T> persistentEntity)
ReactiveCascadeOperations.ReactiveCascadeOperationsHelper
persistOne
in interface ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<DefaultReactiveMongoRepositoryOperations.MongoOperationContext>
T
- The entity typectx
- The contextvalue
- The entity valuepersistentEntity
- The persistent entitypublic <T> reactor.core.publisher.Flux<T> persistBatch(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx, java.lang.Iterable<T> values, RuntimePersistentEntity<T> persistentEntity, java.util.function.Predicate<T> predicate)
ReactiveCascadeOperations.ReactiveCascadeOperationsHelper
persistBatch
in interface ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<DefaultReactiveMongoRepositoryOperations.MongoOperationContext>
T
- The entity typectx
- The contextvalues
- The entity valuespersistentEntity
- The persistent entitypredicate
- The veto predicatepublic <T> reactor.core.publisher.Mono<T> updateOne(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx, T value, RuntimePersistentEntity<T> persistentEntity)
ReactiveCascadeOperations.ReactiveCascadeOperationsHelper
updateOne
in interface ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<DefaultReactiveMongoRepositoryOperations.MongoOperationContext>
T
- The entity typectx
- The contextvalue
- The entity valuepersistentEntity
- The persistent entityprotected com.mongodb.reactivestreams.client.MongoDatabase getDatabase(RuntimePersistentEntity<?> persistentEntity, java.lang.Class<?> repositoryClass)
protected org.bson.codecs.configuration.CodecRegistry getCodecRegistry(com.mongodb.reactivestreams.client.MongoDatabase mongoDatabase)
public reactor.core.publisher.Mono<java.lang.Void> persistManyAssociation(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx, RuntimeAssociation runtimeAssociation, java.lang.Object value, RuntimePersistentEntity<java.lang.Object> persistentEntity, java.lang.Object child, RuntimePersistentEntity<java.lang.Object> childPersistentEntity)
ReactiveCascadeOperations.ReactiveCascadeOperationsHelper
persistManyAssociation
in interface ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<DefaultReactiveMongoRepositoryOperations.MongoOperationContext>
ctx
- The contextruntimeAssociation
- The associationvalue
- The parent entity valuepersistentEntity
- The parent persistent entitychild
- The child entity valuechildPersistentEntity
- The child persistent entitypublic reactor.core.publisher.Mono<java.lang.Void> persistManyAssociationBatch(DefaultReactiveMongoRepositoryOperations.MongoOperationContext ctx, RuntimeAssociation runtimeAssociation, java.lang.Object value, RuntimePersistentEntity<java.lang.Object> persistentEntity, java.lang.Iterable<java.lang.Object> child, RuntimePersistentEntity<java.lang.Object> childPersistentEntity, java.util.function.Predicate<java.lang.Object> veto)
ReactiveCascadeOperations.ReactiveCascadeOperationsHelper
persistManyAssociationBatch
in interface ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<DefaultReactiveMongoRepositoryOperations.MongoOperationContext>
ctx
- The contextruntimeAssociation
- The associationvalue
- The parent entity valuepersistentEntity
- The parent persistent entitychild
- The child entity valueschildPersistentEntity
- The child persistent entityveto
- The veto predicatepublic <T> reactor.core.publisher.Mono<T> withClientSession(java.util.function.Function<com.mongodb.reactivestreams.client.ClientSession,reactor.core.publisher.Mono<? extends T>> function)
MongoReactorRepositoryOperations
withClientSession
in interface MongoReactorRepositoryOperations
T
- The emitted typefunction
- The functionpublic <T> reactor.core.publisher.Flux<T> withClientSessionMany(java.util.function.Function<com.mongodb.reactivestreams.client.ClientSession,reactor.core.publisher.Flux<? extends T>> function)
MongoReactorRepositoryOperations
withClientSessionMany
in interface MongoReactorRepositoryOperations
T
- The emitted typefunction
- The function@NonNull public <T> org.reactivestreams.Publisher<T> withTransaction(@NonNull ReactiveTransactionStatus<com.mongodb.reactivestreams.client.ClientSession> status, @NonNull ReactiveTransactionOperations.TransactionalCallback<com.mongodb.reactivestreams.client.ClientSession,T> handler)
MongoReactorRepositoryOperations
withTransaction
in interface MongoReactorRepositoryOperations
T
- The emitted typestatus
- The tx statushandler
- The handler@NonNull public <T> reactor.core.publisher.Flux<T> withTransaction(@NonNull TransactionDefinition definition, @NonNull ReactiveTransactionOperations.TransactionalCallback<com.mongodb.reactivestreams.client.ClientSession,T> handler)
ReactiveTransactionOperations
withTransaction
in interface ReactiveTransactionOperations<com.mongodb.reactivestreams.client.ClientSession>
T
- The emitted typedefinition
- The definitionhandler
- The handlerprotected <E,R> MongoStoredQuery<E,R,Dtb> getMongoStoredQuery(StoredQuery<E,R> storedQuery)
protected <E,R> MongoPreparedQuery<E,R,Dtb> getMongoPreparedQuery(PreparedQuery<E,R> preparedQuery)
public <E,R> PreparedQuery<E,R> resolveQuery(io.micronaut.aop.MethodInvocationContext<?,?> context, StoredQuery<E,R> storedQuery, Pageable pageable)
PreparedQueryResolver
resolveQuery
in interface PreparedQueryResolver
E
- The entity typeR
- The result typecontext
- The method contextstoredQuery
- The stored querypageable
- The pageablepublic <E,R> PreparedQuery<E,R> resolveCountQuery(io.micronaut.aop.MethodInvocationContext<?,?> context, StoredQuery<E,R> storedQuery, Pageable pageable)
PreparedQueryResolver
resolveCountQuery
in interface PreparedQueryResolver
E
- The entity typeR
- The result typecontext
- The method contextstoredQuery
- The stored querypageable
- The pageablepublic <E,R> StoredQuery<E,R> resolveQuery(io.micronaut.aop.MethodInvocationContext<?,?> context, java.lang.Class<E> entityClass, java.lang.Class<R> resultType)
StoredQueryResolver
resolveQuery
in interface StoredQueryResolver
E
- The entity typeR
- The result typecontext
- The method contextentityClass
- The entity typeresultType
- The result typepublic <E,R> StoredQuery<E,R> resolveCountQuery(io.micronaut.aop.MethodInvocationContext<?,?> context, java.lang.Class<E> entityClass, java.lang.Class<R> resultType)
StoredQueryResolver
resolveCountQuery
in interface StoredQueryResolver
E
- The entity typeR
- The result typecontext
- The method contextentityClass
- The entity typeresultType
- The result typepublic <E,QR> StoredQuery<E,QR> createStoredQuery(io.micronaut.inject.ExecutableMethod<?,?> executableMethod, DataMethod.OperationType operationType, java.lang.String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.Class<java.lang.Object> rootEntity, java.lang.String query, java.lang.String update, java.lang.String[] queryParts, java.util.List<QueryParameterBinding> queryParameters, boolean hasPageable, boolean isSingleResult)
StoredQueryResolver
createStoredQuery
in interface StoredQueryResolver
E
- The entity typeQR
- The result typeexecutableMethod
- The executableMethodoperationType
- The operationTypename
- The nameannotationMetadata
- The annotation metadatarootEntity
- The root entityquery
- The queryupdate
- The update queryqueryParts
- The query partsqueryParameters
- The query parametershasPageable
- Has pageableisSingleResult
- Is single resultpublic StoredQuery<java.lang.Object,java.lang.Long> createCountStoredQuery(io.micronaut.inject.ExecutableMethod<?,?> executableMethod, DataMethod.OperationType operationType, java.lang.String name, io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.Class<java.lang.Object> rootEntity, java.lang.String query, java.lang.String[] queryParts, java.util.List<QueryParameterBinding> queryParameters)
StoredQueryResolver
createCountStoredQuery
in interface StoredQueryResolver
executableMethod
- The executableMethodoperationType
- The operationTypename
- The nameannotationMetadata
- The annotation metadatarootEntity
- The root entityquery
- The queryqueryParts
- The query partsqueryParameters
- The query parametersprotected <R> R convertResult(org.bson.codecs.configuration.CodecRegistry codecRegistry, java.lang.Class<R> resultType, org.bson.BsonDocument result, boolean isDtoProjection)
protected org.bson.BsonDocument association(org.bson.codecs.configuration.CodecRegistry codecRegistry, java.lang.Object value, RuntimePersistentEntity<java.lang.Object> persistentEntity, java.lang.Object child, RuntimePersistentEntity<java.lang.Object> childPersistentEntity)
protected void logFind(MongoFind find)
protected void logAggregate(MongoAggregation aggregation)