HHH-6509 - Updates to new TypeContributor interface.

This commit is contained in:
Karel Maesen 2013-02-13 22:28:33 +01:00 committed by Steve Ebersole
parent c9f27779dd
commit 8475bfed87
2 changed files with 9 additions and 8 deletions

View File

@ -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() {

View File

@ -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 );
}
}