use of org.hibernate.type.descriptor.java.spi.JavaTypeRegistry in project hibernate-orm by hibernate.
the class MLEntity method testSimpleEntity.
@Test
public void testSimpleEntity(SessionFactoryScope scope) {
final EntityPersister entityDescriptor = scope.getSessionFactory().getRuntimeMetamodels().getMappingMetamodel().getEntityDescriptor(MLEntity.class);
final JdbcTypeRegistry jdbcTypeRegistry = entityDescriptor.getFactory().getTypeConfiguration().getJdbcTypeRegistry();
final JavaTypeRegistry javaTypeRegistry = entityDescriptor.getFactory().getTypeConfiguration().getJavaTypeRegistry();
ModelPart part = entityDescriptor.findSubPart("lineString");
assertThat(part.getJavaType(), equalTo(GeolatteGeometryJavaType.MULTILINESTRING_INSTANCE));
}
use of org.hibernate.type.descriptor.java.spi.JavaTypeRegistry in project hibernate-orm by hibernate.
the class JavaTypeRegistryTest method testRegisterJavaTypeDescriptorRegistry.
@Test
public void testRegisterJavaTypeDescriptorRegistry() {
final TypeConfiguration typeConfiguration = new TypeConfiguration();
final JavaTypeRegistry registry = new JavaTypeRegistry(typeConfiguration);
registry.addDescriptor(new CustomJavaType());
final JavaType<?> descriptor = registry.getDescriptor(CustomType.class);
assertThat(descriptor, instanceOf(CustomJavaType.class));
}
Aggregations