Skip to content

Commit

Permalink
HHH-6509 - Improves how SpatialFunctionalTestCase extends BasecoreFun…
Browse files Browse the repository at this point in the history
…ctionalTestCase.
  • Loading branch information
maesenka authored and sebersole committed Apr 24, 2015
1 parent d226ef3 commit 6e91485
Show file tree
Hide file tree
Showing 82 changed files with 2,351 additions and 1,719 deletions.
2 changes: 1 addition & 1 deletion hibernate-spatial/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This file is part of Hibernate Spatial, an extension to the
hibernate ORM solution for spatial (geographic) data.

Copyright © 2007-2012 Geovise BVBA
Copyright © 2007-2013 Geovise BVBA

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand Down
4 changes: 3 additions & 1 deletion hibernate-spatial/hibernate-spatial.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
*/

apply plugin: 'java'
apply plugin: org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin
apply plugin: 'hibernate-matrix-testing'

//apply plugin: org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin

dependencies {
compile(project(':hibernate-core'))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* This file is part of Hibernate Spatial, an extension to the
* hibernate ORM solution for spatial (geographic) data.
*
* Copyright © 2007-2013 Geovise BVBA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

package org.hibernate.spatial;

import org.geolatte.geom.Geometry;
Expand All @@ -8,16 +29,23 @@
import org.hibernate.type.descriptor.java.AbstractTypeDescriptor;

/**
* Descriptor for geolatte-geom {@code Geometry}s.
*
* @author Karel Maesen, Geovise BVBA
* creation-date: 10/12/12
*/
public class GeolatteGeometryJavaTypeDescriptor extends AbstractTypeDescriptor<Geometry> {

/**
* an instance of this descriptor
*/
public static final GeolatteGeometryJavaTypeDescriptor INSTANCE = new GeolatteGeometryJavaTypeDescriptor();

public static final GeolatteGeometryJavaTypeDescriptor INSTANCE = new GeolatteGeometryJavaTypeDescriptor( Geometry.class );

public GeolatteGeometryJavaTypeDescriptor(Class<Geometry> type) {
super( type );
/**
* Initialize a type descriptor for the geolatte-geom {@code Geometry} type.
*/
public GeolatteGeometryJavaTypeDescriptor() {
super( Geometry.class );
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* This file is part of Hibernate Spatial, an extension to the
* hibernate ORM solution for spatial (geographic) data.
*
* Copyright © 2007-2013 Geovise BVBA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

package org.hibernate.spatial;

import org.geolatte.geom.Geometry;
Expand All @@ -13,11 +34,22 @@
import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;

/**
* a {@code Type} that maps between the database geometry type and geolatte-geom {@code Geometry}.
*
* @author Karel Maesen, Geovise BVBA
* creation-date: 10/12/12
*/
public class GeolatteGeometryType extends AbstractSingleColumnStandardBasicType<Geometry> implements Spatial {

/**
* Constructs an instance with the specified {@code SqlTypeDescriptor}
*
* @param sqlTypeDescriptor The Descriptor for the type used by the database for geometries.
*/
public GeolatteGeometryType(SqlTypeDescriptor sqlTypeDescriptor) {
super( sqlTypeDescriptor, GeolatteGeometryJavaTypeDescriptor.INSTANCE );
}

@Override
public String[] getRegistrationKeys() {
return new String[] {
Expand All @@ -33,10 +65,6 @@ public String[] getRegistrationKeys() {
};
}

public GeolatteGeometryType(SqlTypeDescriptor sqlTypeDescriptor) {
super( sqlTypeDescriptor, GeolatteGeometryJavaTypeDescriptor.INSTANCE );
}

@Override
public String getName() {
return "geolatte_geometry";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/*
* This file is part of Hibernate Spatial, an extension to the
* hibernate ORM solution for spatial (geographic) data.
* hibernate ORM solution for spatial (geographic) data.
*
* Copyright © 2007-2012 Geovise BVBA
* Copyright © 2007-2013 Geovise BVBA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

package org.hibernate.spatial;
Expand All @@ -31,16 +31,23 @@
import org.hibernate.type.descriptor.java.JavaTypeDescriptor;

/**
* Descriptor for JTS {@code Geometry}s.
*
* @author Karel Maesen, Geovise BVBA
* creation-date: 7/27/11
*/
public class JTSGeometryJavaTypeDescriptor extends AbstractTypeDescriptor<Geometry> {

/**
* An instance of this descriptor
*/
public static final JavaTypeDescriptor<Geometry> INSTANCE = new JTSGeometryJavaTypeDescriptor();

public static final JavaTypeDescriptor<Geometry> INSTANCE = new JTSGeometryJavaTypeDescriptor( Geometry.class );

public JTSGeometryJavaTypeDescriptor(Class<Geometry> type) {
super( type );
/**
* Initialize a type descriptor for the geolatte-geom {@code Geometry} type.
*/
public JTSGeometryJavaTypeDescriptor() {
super( Geometry.class );
}

@Override
Expand All @@ -50,7 +57,7 @@ public String toString(Geometry value) {

@Override
public Geometry fromString(String string) {
WKTReader reader = new WKTReader();
final WKTReader reader = new WKTReader();
try {
return reader.read( string );
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/*
* This file is part of Hibernate Spatial, an extension to the
* hibernate ORM solution for spatial (geographic) data.
* hibernate ORM solution for spatial (geographic) data.
*
* Copyright © 2007-2012 Geovise BVBA
* Copyright © 2007-2013 Geovise BVBA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package org.hibernate.spatial;

Expand All @@ -26,12 +26,21 @@
import org.hibernate.type.descriptor.sql.SqlTypeDescriptor;

/**
* A {@link org.hibernate.type.BasicType BasicType} for JTS <code>Geometry</code>s.
* A {@code Type} that maps between the database geometry type and JTS {@code Geometry}.
*
* @author Karel Maesen
*/
public class JTSGeometryType extends AbstractSingleColumnStandardBasicType<Geometry> implements Spatial {

/**
* Constructs an instance with the specified {@code SqlTypeDescriptor}
*
* @param sqlTypeDescriptor The descriptor for the type used by the database for geometries.
*/
public JTSGeometryType(SqlTypeDescriptor sqlTypeDescriptor) {
super( sqlTypeDescriptor, JTSGeometryJavaTypeDescriptor.INSTANCE );
}

@Override
public String[] getRegistrationKeys() {
return new String[] {
Expand All @@ -47,9 +56,6 @@ public String[] getRegistrationKeys() {
};
}

public JTSGeometryType(SqlTypeDescriptor sqlTypeDescriptor) {
super( sqlTypeDescriptor, JTSGeometryJavaTypeDescriptor.INSTANCE );
}

@Override
public String getName() {
Expand Down
29 changes: 15 additions & 14 deletions hibernate-spatial/src/main/java/org/hibernate/spatial/Log.java
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/*
* This file is part of Hibernate Spatial, an extension to the
* hibernate ORM solution for spatial (geographic) data.
* hibernate ORM solution for spatial (geographic) data.
*
* Copyright © 2007-2012 Geovise BVBA
* Copyright © 2007-2013 Geovise BVBA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

package org.hibernate.spatial;
Expand All @@ -25,8 +25,9 @@
import org.jboss.logging.MessageLogger;

/**
* The logger interface for the Hibernate Spatial module.
*
* @author Karel Maesen, Geovise BVBA
* creation-date: 1/14/12
*/
@MessageLogger(projectCode = "HS")
public interface Log extends BasicLogger {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/*
* This file is part of Hibernate Spatial, an extension to the
* hibernate ORM solution for spatial (geographic) data.
* hibernate ORM solution for spatial (geographic) data.
*
* Copyright © 2007-2012 Geovise BVBA
* Copyright © 2007-2013 Geovise BVBA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

package org.hibernate.spatial;
Expand All @@ -25,17 +25,24 @@

/**
* A static factory for <code>Log</code>s.
* <p/>
* <p>The implementation is based on the hibernate-ogm LoggerFactory class.</p>
*
* The implementation is based on the hibernate-ogm LoggerFactory class.
*
* @author Karel Maesen, Geovise BVBA
* creation-date: 1/14/12
*/
public class LogFactory {

private LogFactory(){}

/**
* Creates a new logger for the class that invokes this method.
*
* @return A new logger for the invoking class.
*/
public static Log make() {
Throwable t = new Throwable();
StackTraceElement directCaller = t.getStackTrace()[1];
final Throwable t = new Throwable();
final StackTraceElement directCaller = t.getStackTrace()[1];
return Logger.getMessageLogger( Log.class, directCaller.getClassName() );
}

Expand Down
Loading

0 comments on commit 6e91485

Please sign in to comment.