Package org.hibernate.spatial.criterion
Class ExpressionUtil
- java.lang.Object
-
- org.hibernate.spatial.criterion.ExpressionUtil
-
public class ExpressionUtil extends Object
This class assists in the formation of a SQL-fragment in the various spatial query expressions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringfindColumn(String propertyName, org.hibernate.Criteria criteria, org.hibernate.criterion.CriteriaQuery criteriaQuery)Determines the column name corresponding to the specified property path.static SpatialDialectgetSpatialDialect(org.hibernate.criterion.CriteriaQuery criteriaQuery, SpatialFunction function)Determines theSpatialDialectfor the specifiedCriteriaQuery, and checks if the specified function is supported.
-
-
-
Method Detail
-
getSpatialDialect
public static SpatialDialect getSpatialDialect(org.hibernate.criterion.CriteriaQuery criteriaQuery, SpatialFunction function)
Determines theSpatialDialectfor the specifiedCriteriaQuery, and checks if the specified function is supported.- Parameters:
criteriaQuery- TheCriteriaQueryfor which the dialect is soughtfunction- The function for which to check support- Returns:
- The
SpatialDialectassociated with the specifiedCriteriaQuery - Throws:
org.hibernate.HibernateException- If the dialect for the specifiedCriteriaQueryis not aSpatialDialect. or the specifiedSpatialFunctionis not supported by the dialect.
-
findColumn
public static String findColumn(String propertyName, org.hibernate.Criteria criteria, org.hibernate.criterion.CriteriaQuery criteriaQuery)
Determines the column name corresponding to the specified property path.- Parameters:
propertyName- The property pathcriteria- The criteriacriteriaQuery- The criteria query- Returns:
- The column name
- Throws:
org.hibernate.HibernateException- If the property could not be resolved, or more than one column is mapped by the property path.
-
-