Class ExpressionUtil


  • public class ExpressionUtil
    extends java.lang.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 java.lang.String findColumn​(java.lang.String propertyName, org.hibernate.Criteria criteria, org.hibernate.criterion.CriteriaQuery criteriaQuery)
      Determines the column name corresponding to the specified property path.
      static SpatialDialect getSpatialDialect​(org.hibernate.criterion.CriteriaQuery criteriaQuery, SpatialFunction function)
      Determines the SpatialDialect for the specified CriteriaQuery, and checks if the specified function is supported.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSpatialDialect

        public static SpatialDialect getSpatialDialect​(org.hibernate.criterion.CriteriaQuery criteriaQuery,
                                                       SpatialFunction function)
        Determines the SpatialDialect for the specified CriteriaQuery, and checks if the specified function is supported.
        Parameters:
        criteriaQuery - The CriteriaQuery for which the dialect is sought
        function - The function for which to check support
        Returns:
        The SpatialDialect associated with the specified CriteriaQuery
        Throws:
        org.hibernate.HibernateException - If the dialect for the specified CriteriaQuery is not a SpatialDialect. or the specified SpatialFunction is not supported by the dialect.
      • findColumn

        public static java.lang.String findColumn​(java.lang.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 path
        criteria - The criteria
        criteriaQuery - 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.