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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onBeforeAttach
(Car entity) Executes before the object is attached to an EntityManager on merge operation.void
onBeforeDetach
(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:BeforeDetachEntityListener
Executes before the object is detached from an EntityManager on transaction commit.- Specified by:
onBeforeDetach
in interfaceBeforeDetachEntityListener<Car>
- Parameters:
entity
- entity instance in managed state
-
onBeforeAttach
Description copied from interface:BeforeAttachEntityListener
Executes before the object is attached to an EntityManager on merge operation.- Specified by:
onBeforeAttach
in interfaceBeforeAttachEntityListener<Car>
- Parameters:
entity
- detached entity
-