From 8475bfed8753b88ffbb57b5e6e3bc50a570a46df Mon Sep 17 00:00:00 2001 From: Karel Maesen Date: Wed, 13 Feb 2013 22:28:33 +0100 Subject: [PATCH] HHH-6509 - Updates to new TypeContributor interface. --- .../spatial/dialect/postgis/PostgisDialect.java | 4 ++-- .../spatial/integration/SpatialTypeContributor.java | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisDialect.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisDialect.java index 7e7448d947..c86ea2a57d 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisDialect.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/dialect/postgis/PostgisDialect.java @@ -22,7 +22,7 @@ package org.hibernate.spatial.dialect.postgis; import org.hibernate.HibernateException; -import org.hibernate.dialect.PostgreSQLDialect; +import org.hibernate.dialect.PostgreSQL82Dialect; import org.hibernate.dialect.function.StandardSQLFunction; import org.hibernate.spatial.GeometrySqlTypeDescriptor; import org.hibernate.spatial.JTSGeometryType; @@ -39,7 +39,7 @@ import org.hibernate.type.descriptor.sql.SqlTypeDescriptor; * * @author Karel Maesen */ -public class PostgisDialect extends PostgreSQLDialect implements SpatialDialect { +public class PostgisDialect extends PostgreSQL82Dialect implements SpatialDialect { public PostgisDialect() { diff --git a/hibernate-spatial/src/main/java/org/hibernate/spatial/integration/SpatialTypeContributor.java b/hibernate-spatial/src/main/java/org/hibernate/spatial/integration/SpatialTypeContributor.java index ae2530f3d4..7e7a6c5c0e 100644 --- a/hibernate-spatial/src/main/java/org/hibernate/spatial/integration/SpatialTypeContributor.java +++ b/hibernate-spatial/src/main/java/org/hibernate/spatial/integration/SpatialTypeContributor.java @@ -21,8 +21,9 @@ package org.hibernate.spatial.integration; -import org.hibernate.metamodel.spi.MetadataImplementor; +import org.hibernate.metamodel.spi.TypeContributions; import org.hibernate.metamodel.spi.TypeContributor; +import org.hibernate.service.ServiceRegistry; import org.hibernate.spatial.GeolatteGeometryType; import org.hibernate.spatial.JTSGeometryType; import org.hibernate.spatial.Log; @@ -36,11 +37,11 @@ public class SpatialTypeContributor implements TypeContributor { private static final Log LOG = LogFactory.make(); - public void contribute(MetadataImplementor builder) { + @Override + public void contribute(TypeContributions typeContributions, ServiceRegistry serviceRegistry) { LOG.info( "Registering JTSGeometryType" ); - builder.getTypeResolver().registerTypeOverride( JTSGeometryType.INSTANCE ); - LOG.info( "Registering GeolatteGeometryType" ); - builder.getTypeResolver().registerTypeOverride( GeolatteGeometryType.INSTANCE ); + typeContributions.contributeType( JTSGeometryType.INSTANCE ); + LOG.info( "Registering GeolatteGeometryType" ); + typeContributions.contributeType( GeolatteGeometryType.INSTANCE ); } - }