Package io.jmix.samples.rest.listeners
Class CarDetachListener
java.lang.Object
io.jmix.samples.rest.listeners.CarDetachListener
- All Implemented Interfaces:
BeforeAttachEntityListener<Car>,BeforeDetachEntityListener<Car>
@Component("jmix_CarDetachListener")
public class CarDetachListener
extends Object
implements BeforeDetachEntityListener<Car>, BeforeAttachEntityListener<Car>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonBeforeAttach(Car entity) Executes before the object is attached to an EntityManager on merge operation.voidonBeforeDetach(Car entity) Executes before the object is detached from an EntityManager on transaction commit.
-
Constructor Details
-
CarDetachListener
public CarDetachListener()
-
-
Method Details
-
onBeforeDetach
Description copied from interface:BeforeDetachEntityListenerExecutes before the object is detached from an EntityManager on transaction commit.- Specified by:
onBeforeDetachin interfaceBeforeDetachEntityListener<Car>- Parameters:
entity- entity instance in managed state
-
onBeforeAttach
Description copied from interface:BeforeAttachEntityListenerExecutes before the object is attached to an EntityManager on merge operation.- Specified by:
onBeforeAttachin interfaceBeforeAttachEntityListener<Car>- Parameters:
entity- detached entity
-