entityClass);
// add them all to metadata
for (Class<?> jpaAnnotation : jpaAnnotations)
{
CallbackMethod callBackMethod = new ExternalCallbackMethod(entityListener, method);
addCallBackMethod(metadata, jpaAnnotation, callBackMethod);
}
}
}
}
}
// list all internal listeners now.
// iterate through all public methods of entityClass
// since this is already an @Entity class, it will sure have a default
// no-arg constructor
for (Method method : entityClass.getMethods())
{
// find valid jpa annotations for this method
List<Class<?>> jpaAnnotations = getValidJPAAnnotationsFromMethod(entityClass, method, 0, entityClass);
// add them all to metadata
for (Class<?> jpaAnnotation : jpaAnnotations)
{
CallbackMethod callbackMethod = new InternalCallbackMethod(metadata, method);
addCallBackMethod(metadata, jpaAnnotation, callbackMethod);
}
}
}