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 Object
Reactive cascade operations.
Since:
3.3
Author:
Denis Stepanov
  • Constructor Details

  • Method Details

    • 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 context
      entity - The entity instance
      persistentEntity - The persistent entity
      isPost - Is post cascade?
      cascadeType - The cascade type
      Returns:
      The entity instance
    • cascade

      protected <T> void cascade(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, Class<?> repositoryType, boolean fkOnly, Relation.Cascade cascadeType, io.micronaut.data.runtime.operations.internal.AbstractCascadeOperations.CascadeContext ctx, RuntimePersistentEntity<T> persistentEntity, T entity, 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 annotationMetadata
      repositoryType - The repositoryType
      fkOnly - Is FK only
      cascadeType - The cascadeType
      ctx - The cascade context
      persistentEntity - The persistent entity
      entity - The entity instance
      cascadeOps - The cascade operations
    • afterCascadedOne

      protected <T> T afterCascadedOne(T entity, List<Association> associations, Object prevChild, 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 child
      prevChild - The previous child value
      newChild - The new child value
      Returns:
      The entity instance
    • afterCascadedMany

      protected <T> T afterCascadedMany(T entity, List<Association> associations, Iterable<Object> prevChildren, List<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 child
      prevChildren - The previous children value
      newChildren - The new children value
      Returns:
      The entity instance