MetadataEntityClassListenerpublic class MetadataEntityClassListener extends MetadataEntityListener A callback listener for those entities that define callback methods.
Callback methods on an entity must be signatureless, hence, this class
overrides behavior from CBListener. |
Constructors Summary |
---|
public MetadataEntityClassListener(Class entityClass)INTERNAL:
super(entityClass);
|
Methods Summary |
---|
public void | addEventMethod(java.lang.String event, java.lang.reflect.Method method)INTERNAL:
For entity classes listener methods, they need to override listeners
from mapped superclasses for the same method. So we need to override
this method and make the override check instead of it throwing an
exception for multiple lifecycle methods for the same event.
if (! hasOverriddenEventMethod(method, event)) {
super.addEventMethod(event, method);
}
| public java.lang.Class | getListenerClass()INTERNAL:
return getEntityClass();
| protected void | invokeMethod(java.lang.String event, oracle.toplink.essentials.descriptors.DescriptorEvent descriptorEvent)INTERNAL:
Object[] objectList = {};
invokeMethod(getEventMethod(event), descriptorEvent.getObject(), objectList, descriptorEvent);
| public boolean | isEntityClassListener()INTERNAL:
return true;
| protected void | validateMethod(java.lang.reflect.Method method)INTERNAL:
if (method.getParameterTypes().length > 0) {
throw ValidationException.invalidEntityCallbackMethodArguments(getEntityClass(), method.getName());
} else {
// So far so good, now check the method modifiers.
validateMethodModifiers(method);
}
|
|