use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method intersects.
@Test
public void intersects() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.intersects)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getIntersects(expectationsFactory.getTestPolygon());
Criterion spatialCriterion = SpatialRestrictions.intersects("geom", expectationsFactory.getTestPolygon());
retrieveAndCompare(dbexpected, spatialCriterion);
}
use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method overlaps.
@Test
public void overlaps() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.overlaps)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getOverlaps(expectationsFactory.getTestPolygon());
Criterion spatialCriterion = SpatialRestrictions.overlaps("geom", expectationsFactory.getTestPolygon());
retrieveAndCompare(dbexpected, spatialCriterion);
}
use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method dwithin.
@Test
public void dwithin() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.dwithin)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getDwithin(expectationsFactory.getTestPoint(), 30.0);
Criterion spatialCriterion = SpatialRestrictions.distanceWithin("geom", expectationsFactory.getTestPoint(), 30.0);
retrieveAndCompare(dbexpected, spatialCriterion);
}
use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method crosses.
@Test
public void crosses() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.crosses)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getCrosses(expectationsFactory.getTestPolygon());
Criterion spatialCriterion = SpatialRestrictions.crosses("geom", expectationsFactory.getTestPolygon());
retrieveAndCompare(dbexpected, spatialCriterion);
}
use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method filter.
@Test
public void filter() throws SQLException {
if (!dialectSupportsFiltering()) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getFilter(expectationsFactory.getTestPolygon());
Criterion spatialCriterion = SpatialRestrictions.filter("geom", expectationsFactory.getTestPolygon());
retrieveAndCompare(dbexpected, spatialCriterion);
}
Aggregations