use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method touches.
@Test
public void touches() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.touches)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getTouches(expectationsFactory.getTestPolygon());
Criterion spatialCriterion = SpatialRestrictions.touches("geom", expectationsFactory.getTestPolygon());
retrieveAndCompare(dbexpected, spatialCriterion);
}
use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method disjoint.
@Test
public void disjoint() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.disjoint)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getDisjoint(expectationsFactory.getTestPolygon());
Criterion spatialCriterion = SpatialRestrictions.disjoint("geom", expectationsFactory.getTestPolygon());
retrieveAndCompare(dbexpected, spatialCriterion);
}
use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method within.
@Test
public void within() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.within)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getWithin(expectationsFactory.getTestPolygon());
Criterion spatialCriterion = SpatialRestrictions.within("geom", expectationsFactory.getTestPolygon());
retrieveAndCompare(dbexpected, spatialCriterion);
}
use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method eq.
@Test
public void eq() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.equals)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getEquals(expectationsFactory.getTestPolygon());
Criterion spatialCriterion = SpatialRestrictions.eq("geom", expectationsFactory.getTestPolygon());
retrieveAndCompare(dbexpected, spatialCriterion);
}
use of org.hibernate.criterion.Criterion in project hibernate-orm by hibernate.
the class TestSpatialRestrictions method isNotEmpty.
@Test
public void isNotEmpty() throws SQLException {
if (!isSupportedByDialect(SpatialFunction.isempty)) {
return;
}
Map<Integer, Boolean> dbexpected = expectationsFactory.getIsNotEmpty();
Criterion spatialCriterion = SpatialRestrictions.isNotEmpty("geom");
retrieveAndCompare(dbexpected, spatialCriterion);
}
Aggregations