All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.fastorm.rdb.mapping.ReactiveDelete Maven / Gradle / Ivy

The newest version!
package org.zodiac.fastorm.rdb.mapping;

import reactor.core.publisher.Mono;

import java.util.function.BiFunction;

/**
 * Responsive dynamic deletion interface.
 *
 */
public interface ReactiveDelete extends DSLDelete {

    /**
     * Perform an asynchronous deletion to return the number of deleted data records.
     *
     * @return The asynchronously delete the result.
     */
    Mono execute();

    /**
     * After performing the update, you can do some reactive operations, and you can get the {@code Update } during the operation, such as updating the cache.
     *
     * 
     *     createDelete()
     *      .where()
     *      .in("id",idList)
     *      .onExecute((delete,execute)->{
     *        return createQuery()
     *                 .setParam(delete.toQueryParam()) //Obtain the 'where' parameter of the 'update'.
     *                 .fetch()
     *                 .flatMap(this::clearCache)
     *                 .then(execute)
     *             ;
     *      }).execute();
     *
     * 
* * @param mapper Execution Result Processor. * @return This. */ ReactiveDelete onExecute(BiFunction< /*The current dynamic deletion interface.*/ ReactiveDelete, /* The deletion executor. */ Mono, /* The neo executor. */ Mono> mapper); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy