Package org.hibernate.spatial.criterion
Class SpatialRelateExpression
- java.lang.Object
-
- org.hibernate.spatial.criterion.SpatialRelateExpression
-
- All Implemented Interfaces:
java.io.Serializable
,Criterion
public class SpatialRelateExpression extends java.lang.Object implements Criterion
ACriterion
constraining aGeometry
property to have specific spatial relation to a searchGeometry
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SpatialRelateExpression(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value, int spatialRelation)
Constructs an instance
-
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
-
SpatialRelateExpression
public SpatialRelateExpression(java.lang.String propertyName, com.vividsolutions.jts.geom.Geometry value, int spatialRelation)
Constructs an instance- Parameters:
propertyName
- The name of the property being constrainedvalue
- The searchGeometry
spatialRelation
- The type ofSpatialRelation
to use in the comparison
-
-
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.
-
-