Search in sources :

Example 1 with ConvertedJdbcMapping

use of org.hibernate.cfg.internal.ConvertedJdbcMapping in project hibernate-orm by hibernate.

the class AnnotationBinder method resolveAttributeConverter.

private static JdbcMapping resolveAttributeConverter(Class<AttributeConverter<?, ?>> type, MetadataBuildingContext context) {
    final StandardServiceRegistry serviceRegistry = context.getBootstrapContext().getServiceRegistry();
    final ManagedBeanRegistry beanRegistry = serviceRegistry.getService(ManagedBeanRegistry.class);
    final ManagedBean<AttributeConverter<?, ?>> bean = beanRegistry.getBean(type);
    return new ConvertedJdbcMapping<>(bean, context.getBootstrapContext().getTypeConfiguration());
}
Also used : AttributeConverter(jakarta.persistence.AttributeConverter) ManagedBeanRegistry(org.hibernate.resource.beans.spi.ManagedBeanRegistry) ConvertedJdbcMapping(org.hibernate.cfg.internal.ConvertedJdbcMapping) StandardServiceRegistry(org.hibernate.boot.registry.StandardServiceRegistry)

Aggregations

AttributeConverter (jakarta.persistence.AttributeConverter)1 StandardServiceRegistry (org.hibernate.boot.registry.StandardServiceRegistry)1 ConvertedJdbcMapping (org.hibernate.cfg.internal.ConvertedJdbcMapping)1 ManagedBeanRegistry (org.hibernate.resource.beans.spi.ManagedBeanRegistry)1