use of org.neo4j.ogm.metadata.MethodInfo in project neo4j-ogm by neo4j.
the class GraphEntityMapper method executePostLoad.
private void executePostLoad(Object instance) {
ClassInfo classInfo = metadata.classInfo(instance);
MethodInfo postLoadMethod = classInfo.postLoadMethodOrNull();
if (postLoadMethod == null) {
return;
}
try {
postLoadMethod.invoke(instance);
} catch (SecurityException e) {
logger.warn("Cannot call PostLoad annotated method {} on class {}, " + "security manager denied access.", postLoadMethod.getMethod().getName(), classInfo.name(), e);
} catch (IllegalAccessException | InvocationTargetException e) {
logger.warn("Cannot call PostLoad annotated method {} on class {}. " + "Make sure it is public and has no arguments", postLoadMethod.getMethod().getName(), classInfo.name(), e);
}
}
Aggregations