Package org.datanucleus.metadata
Class EventListenerMetaData
- java.lang.Object
-
- org.datanucleus.metadata.MetaData
-
- org.datanucleus.metadata.EventListenerMetaData
-
- All Implemented Interfaces:
java.io.Serializable
public class EventListenerMetaData extends MetaData
Listener for events, following the JPA/Jakarta model.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.String
className
Name of the EventListener class.(package private) java.util.Map<java.lang.String,java.lang.String>
methodNamesByCallbackName
Method names in the EventListener class keyed by their callback name (e.g javax.persistence.PrePersist, etc).private static long
serialVersionUID
-
Fields inherited from class org.datanucleus.metadata.MetaData
EXTENSION_CLASS_CREATETIMESTAMP, EXTENSION_CLASS_CREATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_CREATEUSER, EXTENSION_CLASS_CREATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_CREATEUSER_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_COLUMN_LENGTH, EXTENSION_CLASS_MULTITENANCY_COLUMN_NAME, EXTENSION_CLASS_MULTITENANCY_JDBC_TYPE, EXTENSION_CLASS_MULTITENANT, EXTENSION_CLASS_READ_ONLY, EXTENSION_CLASS_SOFTDELETE, EXTENSION_CLASS_SOFTDELETE_COLUMN_NAME, EXTENSION_CLASS_UPDATETIMESTAMP, EXTENSION_CLASS_UPDATETIMESTAMP_COLUMN_NAME, EXTENSION_CLASS_UPDATEUSER, EXTENSION_CLASS_UPDATEUSER_COLUMN_LENGTH, EXTENSION_CLASS_UPDATEUSER_COLUMN_NAME, EXTENSION_CLASS_VERSION_FIELD_NAME, EXTENSION_CLASS_VIEW_DEFINITION, EXTENSION_CLASS_VIEW_IMPORTS, EXTENSION_INDEX_COLUMN_ORDERING, EXTENSION_MEMBER_CACHEABLE, EXTENSION_MEMBER_CALENDAR_ONE_COLUMN, EXTENSION_MEMBER_CASCADE_ATTACH, EXTENSION_MEMBER_CASCADE_DETACH, EXTENSION_MEMBER_CASCADE_PERSIST, EXTENSION_MEMBER_CASCADE_REFRESH, EXTENSION_MEMBER_COMPARATOR_NAME, EXTENSION_MEMBER_CONTAINER_ALLOW_NULLS, EXTENSION_MEMBER_CREATE_TIMESTAMP, EXTENSION_MEMBER_CREATE_USER, EXTENSION_MEMBER_ENUM_VALUE_GETTER, EXTENSION_MEMBER_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_INSERTABLE, EXTENSION_MEMBER_KEY_IMPLEMENTATION_CLASSES, EXTENSION_MEMBER_LIST_ORDERING, EXTENSION_MEMBER_RELATION_DISCRIM_COLUMN, EXTENSION_MEMBER_RELATION_DISCRIM_PK, EXTENSION_MEMBER_RELATION_DISCRIM_VALUE, EXTENSION_MEMBER_STRATEGY_WHEN_NOTNULL, EXTENSION_MEMBER_TYPE_CONVERTER_DISABLED, EXTENSION_MEMBER_TYPE_CONVERTER_NAME, EXTENSION_MEMBER_UPDATE_TIMESTAMP, EXTENSION_MEMBER_UPDATE_USER, EXTENSION_MEMBER_UPDATEABLE, EXTENSION_MEMBER_VALUE_IMPLEMENTATION_CLASSES, EXTENSION_VERSION_NUMBER_INITIAL_VALUE, extensions, metaDataState, parent, VENDOR_NAME
-
-
Constructor Summary
Constructors Constructor Description EventListenerMetaData(java.lang.String className)
Constructor for an EventListener MetaData
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCallback(java.lang.String callbackClassName, java.lang.String methodName)
Method to add a method name for this EventListener.void
addCallback(java.lang.String callbackClassName, java.lang.String className, java.lang.String methodName)
Method to add a method name for this EventListener.java.lang.String
getClassName()
Accessor for the name of the EventListener classjava.lang.String
getMethodNameForCallbackClass(java.lang.String callbackClassName)
Accessor for the method name in the EventListener class that handles the specified callback event-
Methods inherited from class org.datanucleus.metadata.MetaData
addExtension, addExtensions, getExtensions, getMetaDataManager, getNoOfExtensions, getParent, getValueForExtension, getValuesForExtension, hasExtension, initialise, isInitialised, isPopulated, isUsed, removeExtension, setExtensions, setInitialised, setParent, setPopulated, setUsed
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
className
java.lang.String className
Name of the EventListener class.
-
methodNamesByCallbackName
java.util.Map<java.lang.String,java.lang.String> methodNamesByCallbackName
Method names in the EventListener class keyed by their callback name (e.g javax.persistence.PrePersist, etc).
-
-
Method Detail
-
getClassName
public java.lang.String getClassName()
Accessor for the name of the EventListener class- Returns:
- Name of the EventListener
-
addCallback
public void addCallback(java.lang.String callbackClassName, java.lang.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(java.lang.String callbackClassName, java.lang.String className, java.lang.String methodName)
Method to add a method name for this EventListener.- Parameters:
callbackClassName
- Name of the callback classclassName
- Name of the class declaring the methodmethodName
- The method in the className class that handles it
-
getMethodNameForCallbackClass
public java.lang.String getMethodNameForCallbackClass(java.lang.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
-
-