attr = getEntityType().getAttribute(dateTimeProvider.getUpdatedDateProperty());
} catch (IllegalArgumentException e) {
// noop. This is thrown if the attribute doesn't exist.
}
if (attr != null) {
Temporal temporalAnnotation = null;
Member member = attr.getJavaMember();
if (member instanceof Field && ((Field) member).isAnnotationPresent(Temporal.class)) {
temporalAnnotation = ((Field) member).getAnnotation(Temporal.class);
} else if (member instanceof Method && ((Method) member).isAnnotationPresent(Temporal.class)) {
temporalAnnotation = ((Method) member).getAnnotation(Temporal.class);
}
if (temporalAnnotation != null) {
updateDateTimeAware = temporalAnnotation.value() == TemporalType.TIMESTAMP;
updateDateAware = temporalAnnotation.value() == TemporalType.DATE;
}
updateDTRequired = !((SingularAttribute<? super E, ?>) attr).isOptional();
}
}