Class ReactiveCascadeOperations<Ctx extends OperationContext>

  • Type Parameters:
    Ctx - The operation context.

    public final class ReactiveCascadeOperations<Ctx extends OperationContext>
    extends java.lang.Object
    Reactive cascade operations.
    Since:
    3.3
    Author:
    Denis Stepanov
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReactiveCascadeOperations

        public ReactiveCascadeOperations​(io.micronaut.core.convert.ConversionService<?> conversionService,
                                         ReactiveCascadeOperations.ReactiveCascadeOperationsHelper<Ctx> helper)
        The default cosntructor.
        Parameters:
        conversionService - The conversion service
        helper - 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 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,
                                   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 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,
                                         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 child
        prevChild - The previous child value
        newChild - 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 child
        prevChildren - The previous children value
        newChildren - The new children value
        Returns:
        The entity instance