Package org.hibernate.spatial.criterion
Class SpatialFilter
- java.lang.Object
-
- org.hibernate.spatial.criterion.SpatialFilter
-
- All Implemented Interfaces:
java.io.Serializable
,Criterion
public class SpatialFilter extends java.lang.Object implements Criterion
ACriterion
constraining a geometry property to have a bounding box that overlaps with a specified bounding box.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpatialFilter(java.lang.String propertyName, com.vividsolutions.jts.geom.Envelope envelope, int srid)
Constructs an instance with the specified property and the bounding box of the specified geometry.SpatialFilter(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry filter)
Constructs an instance with the specified property and the bounding box of the specified geometry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypedValue[]
getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery)
Return typed values for all parameters in the rendered SQL fragmentjava.lang.String
toSqlString(Criteria criteria, CriteriaQuery criteriaQuery)
Render the SQL fragment
-
-
-
Constructor Detail
-
SpatialFilter
public SpatialFilter(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry filter)
Constructs an instance with the specified property and the bounding box of the specified geometry.- Parameters:
propertyName
- The name of the propety being constrainedfilter
- The geometry whose bounding box is used as search geometry
-
SpatialFilter
public SpatialFilter(java.lang.String propertyName, com.vividsolutions.jts.geom.Envelope envelope, int srid)
Constructs an instance with the specified property and the bounding box of the specified geometry.- Parameters:
propertyName
- The name of the propety being constrainedenvelope
- The bounding box is used as search geometrysrid
- The SRID of the specified bounding box
-
-
Method Detail
-
getTypedValues
public TypedValue[] getTypedValues(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException
Description copied from interface:Criterion
Return typed values for all parameters in the rendered SQL fragment- Specified by:
getTypedValues
in interfaceCriterion
- Parameters:
criteria
- The local criteriacriteriaQuery
- The overal criteria query- Returns:
- The types values (for binding)
- Throws:
HibernateException
- Problem determining types.
-
toSqlString
public java.lang.String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException
Description copied from interface:Criterion
Render the SQL fragment- Specified by:
toSqlString
in interfaceCriterion
- Parameters:
criteria
- The local criteriacriteriaQuery
- The overal criteria query- Returns:
- The generated SQL fragment
- Throws:
HibernateException
- Problem during rendering.
-
-