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

info.unterrainer.commons.httpserver.extensions.delegates.PreDeleteSync Maven / Gradle / Ivy

There is a newer version: 0.3.14
Show newest version
package info.unterrainer.commons.httpserver.extensions.delegates;

import info.unterrainer.commons.rdbutils.entities.BasicJpa;
import io.javalin.http.Context;

public interface PreDeleteSync

{ /** * Allows you to execute code before the deletion of an item.
* You may change the ID with the return-value. *

* Returning {@code null} will abort. So be sure to return something (status...) * in that case using the {@link Context}. * * @param ctx the Javalin context * @param entityManager the entity-manager you can use to get the active * transaction, if any * @param receivedId the ID of the item that is about to get deleted * @param jpaToDelete the JPA to delete * @return the ID of the item that is about to get deleted */ Long handle(Context ctx, E entityManager, Long receivedId, P jpaToDelete); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy