use of org.hibernate.annotations.Target in project hibernate-orm by hibernate.
the class BasicValueBinder method normalSupplementalDetails.
private void normalSupplementalDetails(XProperty attributeXProperty) {
explicitJavaTypeAccess = typeConfiguration -> {
final org.hibernate.annotations.JavaType javaTypeAnn = findAnnotation(attributeXProperty, org.hibernate.annotations.JavaType.class);
if (javaTypeAnn != null) {
final Class<? extends BasicJavaType<?>> javaType = normalizeJavaType(javaTypeAnn.value());
if (javaType != null) {
final ManagedBean<? extends BasicJavaType<?>> jtdBean = getManagedBeanRegistry().getBean(javaType);
return jtdBean.getBeanInstance();
}
}
final Target targetAnn = findAnnotation(attributeXProperty, Target.class);
if (targetAnn != null) {
return (BasicJavaType<?>) typeConfiguration.getJavaTypeRegistry().getDescriptor(targetAnn.value());
}
return null;
};
normalJdbcTypeDetails(attributeXProperty);
normalMutabilityDetails(attributeXProperty);
final Enumerated enumeratedAnn = attributeXProperty.getAnnotation(Enumerated.class);
if (enumeratedAnn != null) {
enumType = enumeratedAnn.value();
}
final Temporal temporalAnn = attributeXProperty.getAnnotation(Temporal.class);
if (temporalAnn != null) {
temporalPrecision = temporalAnn.value();
}
}
Aggregations