org.hibernate.spatial.criterion
Class SpatialRestrictions

java.lang.Object
  extended by org.hibernate.spatial.criterion.SpatialRestrictions

public class SpatialRestrictions
extends java.lang.Object

Static Factory Class for creating spatial criterion types.

The criterion types created by this class implement the spatial query expressions of the OpenGIS Simple Features Specification for SQL, Revision 1.1.

In addition, it provides for a simple spatial filter that works mostly using the spatial index. This corresponds to the Oracle Spatial's "SDO_FILTER" function, or the "&&" operator of PostGIS.


Method Summary
static SpatialRelateExpression contains(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
static SpatialRelateExpression crosses(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
static SpatialRelateExpression disjoint(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
static org.hibernate.criterion.Criterion distanceWithin(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry geometry, double distance)
           
static SpatialRelateExpression eq(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
static SpatialFilter filter(java.lang.String propertyName, com.vividsolutions.jts.geom.Envelope envelope, int SRID)
           
static SpatialFilter filter(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry filter)
           
static org.hibernate.criterion.Criterion havingSRID(java.lang.String propertyName, int srid)
           
static SpatialRelateExpression intersects(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
static org.hibernate.criterion.Criterion isEmpty(java.lang.String propertyName)
           
static org.hibernate.criterion.Criterion isNotEmpty(java.lang.String propertyName)
           
static SpatialRelateExpression overlaps(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
static org.hibernate.criterion.Criterion spatialRestriction(int relation, java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
static SpatialRelateExpression touches(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
static SpatialRelateExpression within(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

eq

public static SpatialRelateExpression eq(java.lang.String propertyName,
                                         com.vividsolutions.jts.geom.Geometry value)

within

public static SpatialRelateExpression within(java.lang.String propertyName,
                                             com.vividsolutions.jts.geom.Geometry value)

contains

public static SpatialRelateExpression contains(java.lang.String propertyName,
                                               com.vividsolutions.jts.geom.Geometry value)

crosses

public static SpatialRelateExpression crosses(java.lang.String propertyName,
                                              com.vividsolutions.jts.geom.Geometry value)

disjoint

public static SpatialRelateExpression disjoint(java.lang.String propertyName,
                                               com.vividsolutions.jts.geom.Geometry value)

intersects

public static SpatialRelateExpression intersects(java.lang.String propertyName,
                                                 com.vividsolutions.jts.geom.Geometry value)

overlaps

public static SpatialRelateExpression overlaps(java.lang.String propertyName,
                                               com.vividsolutions.jts.geom.Geometry value)

touches

public static SpatialRelateExpression touches(java.lang.String propertyName,
                                              com.vividsolutions.jts.geom.Geometry value)

filter

public static SpatialFilter filter(java.lang.String propertyName,
                                   com.vividsolutions.jts.geom.Geometry filter)

filter

public static SpatialFilter filter(java.lang.String propertyName,
                                   com.vividsolutions.jts.geom.Envelope envelope,
                                   int SRID)

distanceWithin

public static org.hibernate.criterion.Criterion distanceWithin(java.lang.String propertyName,
                                                               com.vividsolutions.jts.geom.Geometry geometry,
                                                               double distance)

havingSRID

public static org.hibernate.criterion.Criterion havingSRID(java.lang.String propertyName,
                                                           int srid)

isEmpty

public static org.hibernate.criterion.Criterion isEmpty(java.lang.String propertyName)

isNotEmpty

public static org.hibernate.criterion.Criterion isNotEmpty(java.lang.String propertyName)

spatialRestriction

public static org.hibernate.criterion.Criterion spatialRestriction(int relation,
                                                                   java.lang.String propertyName,
                                                                   com.vividsolutions.jts.geom.Geometry value)