Class EventListenerMetaData

java.lang.Object
org.datanucleus.metadata.MetaData
org.datanucleus.metadata.EventListenerMetaData
All Implemented Interfaces:
Serializable

public class EventListenerMetaData extends MetaData
Listener for events, following the JPA/Jakarta model.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • className

      String className
      Name of the EventListener class.
    • methodNamesByCallbackName

      Map<String,String> methodNamesByCallbackName
      Method names in the EventListener class keyed by their callback name (e.g javax.persistence.PrePersist, etc).
  • Constructor Details

    • EventListenerMetaData

      public EventListenerMetaData(String className)
      Constructor for an EventListener MetaData
      Parameters:
      className - Name of the EventListener class
  • Method Details

    • getClassName

      public String getClassName()
      Accessor for the name of the EventListener class
      Returns:
      Name of the EventListener
    • addCallback

      public void addCallback(String callbackClassName, String methodName)
      Method to add a method name for this EventListener.
      Parameters:
      callbackClassName - Name of the callback type (javax.persistence.PrePersist etc)
      methodName - The method in the EventListener class that handles it
    • addCallback

      public void addCallback(String callbackClassName, String className, String methodName)
      Method to add a method name for this EventListener.
      Parameters:
      callbackClassName - Name of the callback class
      className - Name of the class declaring the method
      methodName - The method in the className class that handles it
    • getMethodNameForCallbackClass

      public String getMethodNameForCallbackClass(String callbackClassName)
      Accessor for the method name in the EventListener class that handles the specified callback event
      Parameters:
      callbackClassName - Name of the callback class
      Returns:
      The method name (if any). Fully-qualified