JdoListenerRegistryService¶
-
public interface
JdoListenerRegistryService
¶ Gives access to the registry of listeners for persistence events.
Methods¶
getEntitiesListenerStr¶
getListeners¶
-
List<MotechLifecycleListener>
getListeners
()¶ Gets the listeners from the registry.
Returns: the list of listeners
getListeners¶
-
List<MotechLifecycleListener>
getListeners
(String entity, InstanceLifecycleListenerType type)¶ Gets the list of listeners for the given entity and type of persistence event.
Parameters: - entity – the class name of persistence object
- type – the type of persistence event
Returns: the list of listeners
getMethods¶
-
Set<String>
getMethods
(MotechLifecycleListener listener, InstanceLifecycleListenerType type)¶ Gets the list of methods from the listener for the given type of persistence event.
Parameters: - listener – the listener for persistence object
- type – the type of persistence event
Returns: the list of methods
registerEntityWithListeners¶
registerListener¶
-
void
registerListener
(MotechLifecycleListener listener)¶ Registers the listener. If the registry already has listener for this type of persistence event, the methods from the given listener will be added to the existed one.
Parameters: - listener – the listener to be registered
removeInactiveListeners¶
removeListener¶
-
void
removeListener
(MotechLifecycleListener listener)¶ Removes the listener from the registry.
Parameters: - listener – the listener to be removed