Class ReactiveCascadeOperations<Ctx extends OperationContext>
- java.lang.Object
-
- io.micronaut.data.runtime.operations.internal.ReactiveCascadeOperations<Ctx>
-
- Type Parameters:
Ctx- The operation context.
public final class ReactiveCascadeOperations<Ctx extends OperationContext> extends java.lang.ObjectReactive cascade operations.- Since:
- 3.3
- Author:
- Denis Stepanov
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceReactiveCascadeOperations.ReactiveCascadeOperationsHelper<Ctx extends OperationContext>The cascade operations helper.
-
Constructor Summary
Constructors Constructor Description ReactiveCascadeOperations(io.micronaut.core.convert.ConversionService<?> conversionService, ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<Ctx> helper)The default cosntructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> TafterCascadedMany(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> TafterCascadedOne(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> voidcascade(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.
-
-
-
Constructor Detail
-
ReactiveCascadeOperations
public ReactiveCascadeOperations(io.micronaut.core.convert.ConversionService<?> conversionService, ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<Ctx> helper)The default cosntructor.- Parameters:
conversionService- The conversion servicehelper- The helper
-
-
Method Detail
-
cascadeEntity
public <T> reactor.core.publisher.Mono<T> cascadeEntity(Ctx ctx, T entity, RuntimePersistentEntity<T> persistentEntity, boolean isPost, Relation.Cascade cascadeType)
Cascade the entity operation.- Type Parameters:
T- The entity type- Parameters:
ctx- The contextentity- The entity instancepersistentEntity- The persistent entityisPost- Is post cascade?cascadeType- The cascade type- Returns:
- The entity instance
-
cascade
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.- Type Parameters:
T- The entity type- Parameters:
annotationMetadata- The annotationMetadatarepositoryType- The repositoryTypefkOnly- Is FK onlycascadeType- The cascadeTypectx- The cascade contextpersistentEntity- The persistent entityentity- The entity instancecascadeOps- The cascade operations
-
afterCascadedOne
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.- Type Parameters:
T- The entity type- Parameters:
entity- The parent entity.associations- The association leading to the childprevChild- The previous child valuenewChild- The new child value- Returns:
- The entity instance
-
afterCascadedMany
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.- Type Parameters:
T- The entity type- Parameters:
entity- The parent entity.associations- The association leading to the childprevChildren- The previous children valuenewChildren- The new children value- Returns:
- The entity instance
-
-