HHH-6512 Adds Oracle10g (SDOGeometry) integration tests.
This commit is contained in:
parent
c07657685c
commit
28cf93f6eb
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* Hibernate, Relational Persistence for Idiomatic Java
|
||||
*
|
||||
* Copyright (c) 2011, Red Hat Inc. or third-party contributors as
|
||||
* indicated by the @author tags or express copyright attribution
|
||||
* statements applied by the authors. All third-party contributions are
|
||||
* distributed under license by Red Hat Inc.
|
||||
*
|
||||
* This copyrighted material is made available to anyone wishing to use, modify,
|
||||
* copy, or redistribute it subject to the terms and conditions of the GNU
|
||||
* Lesser General Public License, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program 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 distribution; if not, write to:
|
||||
* Free Software Foundation, Inc.
|
||||
* 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
jdbcDependency "com.oracle.jdbc:ojdbc6:11.1.0.7.0"
|
|
@ -0,0 +1,40 @@
|
|||
#
|
||||
# Hibernate, Relational Persistence for Idiomatic Java
|
||||
#
|
||||
# Copyright (c) 2011, Red Hat Inc. or third-party contributors as
|
||||
# indicated by the @author tags or express copyright attribution
|
||||
# statements applied by the authors. All third-party contributions are
|
||||
# distributed under license by Red Hat Inc.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing to use, modify,
|
||||
# copy, or redistribute it subject to the terms and conditions of the GNU
|
||||
# Lesser General Public License, as published by the Free Software Foundation.
|
||||
#
|
||||
# This program 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 distribution; if not, write to:
|
||||
# Free Software Foundation, Inc.
|
||||
# 51 Franklin Street, Fifth Floor
|
||||
# Boston, MA 02110-1301 USA
|
||||
#
|
||||
|
||||
hibernate.dialect org.hibernate.spatial.dialect.oracle.OracleSpatial10gDialect
|
||||
hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
|
||||
hibernate.connection.url jdbc:oracle:thin:@oracle.geovise.com/ORCL
|
||||
hibernate.connection.username hbs
|
||||
hibernate.connection.password hbs
|
||||
|
||||
|
||||
hibernate.connection.pool_size 5
|
||||
|
||||
hibernate.show_sql true
|
||||
hibernate.format_sql true
|
||||
|
||||
hibernate.max_fetch_depth 5
|
||||
|
||||
hibernate.cache.region_prefix hibernate.test
|
||||
hibernate.cache.region.factory_class org.hibernate.testing.cache.CachingRegionFactory
|
|
@ -1,78 +0,0 @@
|
|||
<TestData>
|
||||
<!-- points -->
|
||||
<Element>
|
||||
<id>1</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(10 5)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>2</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(79 79)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>3</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(50 50)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>4</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(10 20)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>5</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(-4 -5)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>6</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0, 20.0 15.0)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>7</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0 1, 20.0 15.0 2, 30.3 22.4 5, 10 30.0 2)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>8</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0 1 1, 20.0 15.0 2 3, 30.3 22.4 5 10, 10 30.0 2 12)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>9</id>
|
||||
<type>MULTILINESTRING</type>
|
||||
<wkt>MULTILINESTRING((10.0 5.0, 20.0 15.0, 30.3 22.4, 10 30.0), (40.0 20.0, 42.0 18.0, 43.0 16.0, 40 14.0))
|
||||
</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>10</id>
|
||||
<type>POLYGON</type>
|
||||
<wkt>POLYGON( (0 0, 0 10, 10 10, 10 0, 0 0) )</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>11</id>
|
||||
<type>MULTIPOLYGON</type>
|
||||
<wkt>MULTIPOLYGON( ((10 20, 30 40, 44 50, 10 20)), ((15 10, 12 14, 13 13, 15 10)) )</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
</TestData>
|
||||
|
|
@ -1,298 +0,0 @@
|
|||
<TestData>
|
||||
<Element>
|
||||
<id>1</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(10 5)</wkt>
|
||||
<srid>0</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>2</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(52.25 2.53)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>3</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(150000 200000)</wkt>
|
||||
<srid>31370</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>4</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT(10.0 2.0 1.0 3.0)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>5</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0, 20.0 15.0)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>6</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0, 20.0 15.0, 30.3 22.4, 10 30.0)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>7</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0 0.0, 20.0 15.0 3.0)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>8</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0 0.0 0.0, 20.0 15.0 3.0 1.0)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>9</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0 1, 20.0 15.0 2, 30.3 22.4 5, 10 30.0 2)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>10</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING(10.0 5.0 1 1, 20.0 15.0 2 3, 30.3 22.4 5 10, 10 30.0 2 12)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>11</id>
|
||||
<type>MULTILINESTRING</type>
|
||||
<wkt>MULTILINESTRING((10.0 5.0, 20.0 15.0),( 25.0 30.0, 30.0 20.0))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>12</id>
|
||||
<type>MULTILINESTRING</type>
|
||||
<wkt>MULTILINESTRING((10.0 5.0, 20.0 15.0, 30.3 22.4, 10 30.0), (40.0 20.0, 42.0 18.0, 43.0 16.0, 40 14.0))
|
||||
</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>13</id>
|
||||
<type>MULTILINESTRING</type>
|
||||
<wkt>MULTILINESTRING((10.0 5.0 1.0, 20.0 15.0 2.0, 30.3 22.4 1.0, 10 30.0 1.0),(40.0 20.0 0.0, 42.0 18.0 1.0,
|
||||
43.0 16.0 2.0, 40 14.0 3.0))
|
||||
</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>14</id>
|
||||
<type>MULTILINESTRING</type>
|
||||
<wkt>MULTILINESTRING((10.0 5.0 1.0 0.0, 20.0 15.0 2.0 0.0, 30.3 22.4 1.0 1.0, 10 30.0 1.0 2.0),(40.0 20.0 0.0
|
||||
3.0, 42.0 18.0 1.0 4.0, 43.0 16.0 2.0 5.0, 40 14.0 3.0 6.0))
|
||||
</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>15</id>
|
||||
<type>MULTILINESTRING</type>
|
||||
<wkt>MULTILINESTRING((10.0 5.0 1.0 0.0, 20.0 15.0 2.0 0.0, 30.3 22.4 1.0 1.0, 10 30.0 1.0 2.0))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>16</id>
|
||||
<type>POLYGON</type>
|
||||
<wkt>POLYGON( (0 0, 0 10, 10 10, 10 0, 0 0) )</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>17</id>
|
||||
<type>POLYGON</type>
|
||||
<wkt>POLYGON( (0 0 0, 0 10 1, 10 10 1, 10 0 1, 0 0 0) )</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>18</id>
|
||||
<type>POLYGON</type>
|
||||
<wkt>POLYGON( (0 0, 0 10, 10 10, 10 0, 0 0), (2 2, 2 5, 5 5,5 2, 2 2))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>19</id>
|
||||
<type>POLYGON</type>
|
||||
<wkt>POLYGON( (110 110, 110 120, 120 120, 120 110, 110 110) )</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>20</id>
|
||||
<type>MULTIPOLYGON</type>
|
||||
<wkt>MULTIPOLYGON( ((10 20, 30 40, 44 50, 10 20)), ((105 100, 120 140, 130 134, 105 100)) )</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>21</id>
|
||||
<type>MULTIPOLYGON</type>
|
||||
<wkt>MULTIPOLYGON( ((10 20 1, 30 40 2, 44 50 2, 10 20 1)), ((105 100 0, 120 140 10, 130 134 20, 105 100 0)) )
|
||||
</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>22</id>
|
||||
<type>MULTIPOLYGON</type>
|
||||
<wkt>MULTIPOLYGON(( (0 0, 0 50, 50 50, 50 0, 0 0), (10 10, 10 20, 20 20, 20 10, 10 10) ),((105 100, 120 140, 130
|
||||
134, 105 100)) )
|
||||
</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
|
||||
<Element>
|
||||
<id>25</id>
|
||||
<type>MULTIPOINT</type>
|
||||
<wkt>MULTIPOINT(21 2, 25 5, 30 3)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>26</id>
|
||||
<type>MULTIPOINT</type>
|
||||
<wkt>MULTIPOINT(21 2)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>27</id>
|
||||
<type>MULTIPOINT</type>
|
||||
<wkt>MULTIPOINT(21 2 1, 25 5 2, 30 3 5)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>28</id>
|
||||
<type>MULTIPOINT</type>
|
||||
<wkt>MULTIPOINT(21 2 1 0, 25 5 2 4, 30 3 5 2)</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>30</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>31</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3), POLYGON((0 0, 3 0, 3 3,0 3, 0 0)))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>32</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3), POLYGON((0 0, 3 0, 3 3,0 3, 0 0),(1 1, 2 1, 2 2, 1 2,
|
||||
1 1)))
|
||||
</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>33</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION( MULTIPOINT(21 2, 25 5, 30 3), MULTIPOLYGON( ((10 20, 30 40, 44 50, 10 20)), ((105 100,
|
||||
120 140, 130 134, 105 100)) ), MULTILINESTRING((10.0 5.0, 20.0 15.0),( 25.0 30.0, 30.0 20.0)))
|
||||
</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>34</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), POINT EMPTY, LINESTRING(4 2, 5 3))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>35</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), LINESTRING EMPTY, LINESTRING(4 2, 5 3))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>36</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), GEOMETRYCOLLECTION EMPTY, LINESTRING(4 2, 5 3))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>37</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), POLYGON EMPTY, LINESTRING(4 2, 5 3))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>38</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), MULTILINESTRING EMPTY, LINESTRING(4 2, 5 3))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>39</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), MULTIPOINT EMPTY, LINESTRING(4 2, 5 3))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>40</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION(POINT(4 0), MULTIPOLYGON EMPTY, LINESTRING(4 2, 5 3))</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
<Element>
|
||||
<id>50</id>
|
||||
<type>POINT</type>
|
||||
<wkt>POINT EMPTY</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>51</id>
|
||||
<type>LINESTRING</type>
|
||||
<wkt>LINESTRING EMPTY</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>52</id>
|
||||
<type>POLYGON</type>
|
||||
<wkt>POLYGON EMPTY</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>53</id>
|
||||
<type>MULTIPOINT</type>
|
||||
<wkt>MULTIPOINT EMPTY</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>54</id>
|
||||
<type>MULTILINESTRING</type>
|
||||
<wkt>MULTILINESTRING EMPTY</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>55</id>
|
||||
<type>MULTIPOLYGON</type>
|
||||
<wkt>MULTIPOLYGON EMPTY</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
<Element>
|
||||
<id>56</id>
|
||||
<type>GEOMETRYCOLLECTION</type>
|
||||
<wkt>GEOMETRYCOLLECTION EMPTY</wkt>
|
||||
<srid>4326</srid>
|
||||
</Element>
|
||||
|
||||
|
||||
</TestData>
|
|
@ -84,13 +84,21 @@ public abstract class SpatialFunctionalTestCase extends BaseCoreFunctionalTestCa
|
|||
expectationsFactory = support.createExpectationsFactory( dataSourceUtils );
|
||||
testData = support.createTestData( this );
|
||||
geometryEquality = support.createGeometryEquality();
|
||||
dataSourceUtils.afterCreateSchema();
|
||||
}
|
||||
catch ( Exception e ) {
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwrites the afterSessionFactoryBuilt() method in BaseCoreFunctionalTestCase.
|
||||
*
|
||||
* Mostly used to register spatial metadata in databases such as Oracle Spatial.
|
||||
*/
|
||||
protected void afterSessionFactoryBuilt() {
|
||||
dataSourceUtils.afterCreateSchema();
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans up the dataSourceUtils
|
||||
* @throws SQLException
|
||||
|
|
|
@ -16,7 +16,7 @@ public class OracleSDOTestSupport extends TestSupport {
|
|||
|
||||
@Override
|
||||
public TestData createTestData(BaseCoreFunctionalTestCase testcase) {
|
||||
return TestData.fromFile( "test-sdo-geometry-data-set-2D.xml", new SDOTestDataReader() );
|
||||
return TestData.fromFile("oracle10g/test-sdo-geometry-data-set-2D.xml", new SDOTestDataReader() );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue