NEW DeleteIdRequest can return beantype. Also provide alternative for deprecated 'getEbeanServer'

This commit is contained in:
Roland Praml
2021-09-01 09:44:31 +02:00
parent c0007d3c1a
commit 5d84f10110
3 changed files with 23 additions and 2 deletions
@@ -1,5 +1,6 @@
package io.ebean.event;
import io.ebean.Database;
import io.ebean.EbeanServer;
import io.ebean.Transaction;
@@ -10,13 +11,26 @@ public interface BeanDeleteIdRequest {
/**
* Return the server processing the request.
* @deprecated use {@link #getDatabase()}
*/
EbeanServer getEbeanServer();
/**
* Return the DB processing the request.
*/
default Database getDatabase() {
return getEbeanServer();
}
/**
* Return the Transaction associated with this request.
*/
Transaction getTransaction();
/**
* Returns the bean type of the bean being deleted.
*/
Class<?> getBeanType();
/**
* Returns the Id value of the bean being deleted.