Ctx - The operation context.public final class ReactiveCascadeOperations<Ctx extends OperationContext>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeContext
The cascade context.
|
protected static class |
io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeManyOp
The cascade operation of multiple entities - @Many mappings.
|
protected static class |
io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeOneOp
The cascade operation of one entity.
|
protected static class |
io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeOp
The base cascade operation.
|
static interface |
ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<Ctx extends OperationContext>
The cascade operations helper.
|
| Constructor and Description |
|---|
ReactiveCascadeOperations(io.micronaut.core.convert.ConversionService<?> conversionService,
ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<Ctx> helper)
The default cosntructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected <T> T |
afterCascadedMany(T entity,
java.util.List<Association> associations,
java.lang.Iterable<java.lang.Object> prevChildren,
java.util.List<java.lang.Object> newChildren)
Process after a children element has been cascaded.
|
protected <T> T |
afterCascadedOne(T entity,
java.util.List<Association> associations,
java.lang.Object prevChild,
java.lang.Object newChild)
Process after a child element has been cascaded.
|
protected <T> void |
cascade(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
java.lang.Class<?> repositoryType,
boolean fkOnly,
Relation.Cascade cascadeType,
io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeContext ctx,
RuntimePersistentEntity<T> persistentEntity,
T entity,
java.util.List<io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeOp> cascadeOps)
Cascade on the entity instance and collect cascade operations.
|
<T> reactor.core.publisher.Mono<T> |
cascadeEntity(Ctx ctx,
T entity,
RuntimePersistentEntity<T> persistentEntity,
boolean isPost,
Relation.Cascade cascadeType)
Cascade the entity operation.
|
public ReactiveCascadeOperations(io.micronaut.core.convert.ConversionService<?> conversionService,
ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<Ctx> helper)
conversionService - The conversion servicehelper - The helperpublic <T> reactor.core.publisher.Mono<T> cascadeEntity(Ctx ctx, T entity, RuntimePersistentEntity<T> persistentEntity, boolean isPost, Relation.Cascade cascadeType)
T - The entity typectx - The contextentity - The entity instancepersistentEntity - The persistent entityisPost - Is post cascade?cascadeType - The cascade typeprotected <T> void cascade(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
java.lang.Class<?> repositoryType,
boolean fkOnly,
Relation.Cascade cascadeType,
io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeContext ctx,
RuntimePersistentEntity<T> persistentEntity,
T entity,
java.util.List<io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeOp> cascadeOps)
T - The entity typeannotationMetadata - The annotationMetadatarepositoryType - The repositoryTypefkOnly - Is FK onlycascadeType - The cascadeTypectx - The cascade contextpersistentEntity - The persistent entityentity - The entity instancecascadeOps - The cascade operationsprotected <T> T afterCascadedOne(T entity,
java.util.List<Association> associations,
java.lang.Object prevChild,
java.lang.Object newChild)
T - The entity typeentity - The parent entity.associations - The association leading to the childprevChild - The previous child valuenewChild - The new child valueprotected <T> T afterCascadedMany(T entity,
java.util.List<Association> associations,
java.lang.Iterable<java.lang.Object> prevChildren,
java.util.List<java.lang.Object> newChildren)
T - The entity typeentity - The parent entity.associations - The association leading to the childprevChildren - The previous children valuenewChildren - The new children value