Module org.eclipse.persistence.jpa
Class EntityListenerMetadata
java.lang.Object
org.eclipse.persistence.internal.jpa.metadata.ORMetadata
org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListenerMetadata
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
EntityClassListenerMetadata
A MetadataEntityListener and is placed on the owning entity's descriptor.
Callback methods from an EntityListener require a signature on the method.
Namely, they must have an Object parameter.
Key notes:
- any metadata mapped from XML to this class must be compared in the
equals method.
- when loading from annotations, the constructor accepts the metadata
accessor this metadata was loaded from. Used it to look up any
'companion' annotation needed for processing.
- methods should be preserved in alphabetical order.
- Since:
- TopLink 10.1.3/EJB 3.0 Preview
-
Field Summary
FieldsFields inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
m_project -
Constructor Summary
ConstructorsConstructorDescriptionINTERNAL: Used for XML loading.EntityListenerMetadata(MetadataAnnotation entityListeners, MetadataClass entityListenerClass, MetadataAccessor accessor) INTERNAL: Used for annotation loading. -
Method Summary
Modifier and TypeMethodDescriptionclone()INTERNAL: This method should be called when dealing with default listeners.booleanINTERNAL:protected MethodgetCallbackMethod(String methodName, Method[] methods) INTERNAL: Find the method in the list where method.getName() == methodName.INTERNAL: Used for OX mapping.INTERNAL:protected ObjectgetInstance(Class<?> cls) INTERNAL:INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mappingINTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.INTERNAL: Used for OX mapping.inthashCode()voidinitXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:voidprocess(ClassAccessor classAccessor, ClassLoader loader, boolean isDefaultListener) INTERNAL:protected voidprocessCallbackMethods(Method[] methods, ClassAccessor classAccessor) INTERNAL: Process the the callback methods.voidsetClassName(String className) INTERNAL: Used for OX mapping.protected voidsetPostLoad(Method method) INTERNAL: Set the post load event method on the listener.voidsetPostLoad(String postLoad) INTERNAL: Used for OX mapping.protected voidsetPostPersist(Method method) INTERNAL: Set the post persist event method on the listener.voidsetPostPersist(String postPersist) INTERNAL: Used for OX mapping.protected voidsetPostRemove(Method method) INTERNAL: Set the post remove event method on the listener.voidsetPostRemove(String postRemove) INTERNAL: Used for OX mapping.protected voidsetPostUpdate(Method method) INTERNAL: * Set the post update event method on the listener.voidsetPostUpdate(String postUpdate) INTERNAL: Used for OX mapping.protected voidsetPrePersist(Method method) INTERNAL: Set the pre persist event method on the listener.voidsetPrePersist(String prePersist) INTERNAL: Used for OX mappingprotected voidsetPreRemove(Method method) INTERNAL: Set the pre remove event method on the listener.voidsetPreRemove(String preRemove) INTERNAL: Used for OX mapping.protected voidsetPreUpdate(Method method) INTERNAL: Set the pre update event method on the listener.voidsetPreUpdate(String preUpdate) INTERNAL: Used for OX mapping.Methods inherited from class org.eclipse.persistence.internal.jpa.metadata.ORMetadata
getAccessibleObject, getAccessibleObjectName, getAnnotation, getBoxedType, getDatabaseTypeEnum, getEntityMappings, getFullyQualifiedClassName, getJavaClass, getJavaClassName, getLoader, getLocation, getLogger, getMetadataClass, getMetadataClass, getMetadataClass, getMetadataFactory, getName, getPrimitiveClassForName, getProject, getText, getXMLElement, hasIdentifier, hasText, initXMLClassName, initXMLObject, initXMLObjects, initXMLTextObject, loadedFromAnnotation, loadedFromEclipseLinkXML, loadedFromXML, merge, mergeORObjectLists, mergeORObjects, mergeSimpleObjects, reloadEntity, reloadMappedSuperclass, setAccessibleObject, setEntityMappings, setFieldName, setFieldName, setProject, shouldOverride, valuesMatch, valuesMatch
-
Field Details
-
m_listener
-
-
Constructor Details
-
EntityListenerMetadata
public EntityListenerMetadata()INTERNAL: Used for XML loading. -
EntityListenerMetadata
public EntityListenerMetadata(MetadataAnnotation entityListeners, MetadataClass entityListenerClass, MetadataAccessor accessor) INTERNAL: Used for annotation loading.
-
-
Method Details
-
clone
INTERNAL: This method should be called when dealing with default listeners. -
equals
INTERNAL:- Specified by:
equalsin classORMetadata
-
hashCode
public int hashCode() -
getCallbackMethod
INTERNAL: Find the method in the list where method.getName() == methodName. -
getClassName
INTERNAL: Used for OX mapping. -
getIdentifier
INTERNAL:- Overrides:
getIdentifierin classORMetadata- See Also:
-
getInstance
INTERNAL: -
getPostLoad
INTERNAL: Used for OX mapping. -
getPostPersist
INTERNAL: Used for OX mapping. -
getPostRemove
INTERNAL: Used for OX mapping. -
getPostUpdate
INTERNAL: Used for OX mapping -
getPrePersist
INTERNAL: Used for OX mapping. -
getPreRemove
INTERNAL: Used for OX mapping. -
getPreUpdate
INTERNAL: Used for OX mapping. -
initXMLObject
public void initXMLObject(MetadataAccessibleObject accessibleObject, XMLEntityMappings entityMappings) INTERNAL:- Overrides:
initXMLObjectin classORMetadata
-
process
INTERNAL: -
processCallbackMethods
INTERNAL: Process the the callback methods. The XML defined callback methods are always added first, followed by those defined by annotations (only if not already defined in XML) -
setClassName
INTERNAL: Used for OX mapping. -
setPostLoad
INTERNAL: Set the post load event method on the listener. -
setPostLoad
INTERNAL: Used for OX mapping. -
setPostPersist
INTERNAL: Set the post persist event method on the listener. -
setPostPersist
INTERNAL: Used for OX mapping. -
setPostRemove
INTERNAL: Set the post remove event method on the listener. -
setPostRemove
INTERNAL: Used for OX mapping. -
setPostUpdate
INTERNAL: * Set the post update event method on the listener. -
setPostUpdate
INTERNAL: Used for OX mapping. -
setPrePersist
INTERNAL: Set the pre persist event method on the listener. -
setPrePersist
INTERNAL: Used for OX mapping -
setPreRemove
INTERNAL: Set the pre remove event method on the listener. -
setPreRemove
INTERNAL: Used for OX mapping. -
setPreUpdate
INTERNAL: Set the pre update event method on the listener. -
setPreUpdate
INTERNAL: Used for OX mapping.
-