use of org.hibernate.boot.model.convert.internal.ClassBasedConverterDescriptor in project hibernate-orm by hibernate.
the class SimpleValue method setTypeName.
public void setTypeName(String typeName) {
if (typeName != null && typeName.startsWith(AttributeConverterTypeAdapter.NAME_PREFIX)) {
final String converterClassName = typeName.substring(AttributeConverterTypeAdapter.NAME_PREFIX.length());
final ClassLoaderService cls = getMetadata().getMetadataBuildingOptions().getServiceRegistry().getService(ClassLoaderService.class);
try {
final Class<? extends AttributeConverter> converterClass = cls.classForName(converterClassName);
this.attributeConverterDescriptor = new ClassBasedConverterDescriptor(converterClass, false, ((InFlightMetadataCollector) getMetadata()).getClassmateContext());
return;
} catch (Exception e) {
log.logBadHbmAttributeConverterType(typeName, e.getMessage());
}
}
this.typeName = typeName;
}
Aggregations