com.gisgraphy.hibernate.criterion
Class IntersectsRestriction

java.lang.Object
  extended by com.gisgraphy.hibernate.criterion.IntersectsRestriction
All Implemented Interfaces:
java.io.Serializable, org.hibernate.criterion.Criterion

public class IntersectsRestriction
extends java.lang.Object
implements org.hibernate.criterion.Criterion

An implementation of the Criterion interface that implements restriction for a psql intersects restriction

Author:
David Masclet
See Also:
Serialized Form

Constructor Summary
IntersectsRestriction(java.lang.String columnName, com.vividsolutions.jts.geom.Polygon polygon)
           
 
Method Summary
 org.hibernate.engine.TypedValue[] getTypedValues(org.hibernate.Criteria criteria, org.hibernate.criterion.CriteriaQuery criteriaQuery)
           
 java.lang.String toSqlString(org.hibernate.Criteria criteria, org.hibernate.criterion.CriteriaQuery criteriaQuery)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntersectsRestriction

public IntersectsRestriction(java.lang.String columnName,
                             com.vividsolutions.jts.geom.Polygon polygon)
Parameters:
columnName - the name of the column that hold GIS information (typically shape column)
polygon - The shape we want to see if the column data intersects
Method Detail

getTypedValues

public org.hibernate.engine.TypedValue[] getTypedValues(org.hibernate.Criteria criteria,
                                                        org.hibernate.criterion.CriteriaQuery criteriaQuery)
                                                 throws org.hibernate.HibernateException
Specified by:
getTypedValues in interface org.hibernate.criterion.Criterion
Throws:
org.hibernate.HibernateException

toSqlString

public java.lang.String toSqlString(org.hibernate.Criteria criteria,
                                    org.hibernate.criterion.CriteriaQuery criteriaQuery)
                             throws org.hibernate.HibernateException
Specified by:
toSqlString in interface org.hibernate.criterion.Criterion
Throws:
org.hibernate.HibernateException


Copyright © 2010. All Rights Reserved.