com.gisgraphy.hibernate.criterion
Class DistanceOrder
java.lang.Object
org.hibernate.criterion.Order
com.gisgraphy.hibernate.criterion.DistanceOrder
- All Implemented Interfaces:
- Serializable
public class DistanceOrder
- extends org.hibernate.criterion.Order
A criteria that sort by distance for better performance you can use
ProjectionOrder
if a projection for distance calculation have been
added
- Author:
- David Masclet
- See Also:
- Serialized Form
Constructor Summary |
DistanceOrder(com.vividsolutions.jts.geom.Point point)
|
DistanceOrder(com.vividsolutions.jts.geom.Point point,
boolean ascending)
|
Method Summary |
String |
toSqlString(org.hibernate.Criteria criteria,
org.hibernate.criterion.CriteriaQuery criteriaQuery)
|
Methods inherited from class org.hibernate.criterion.Order |
asc, desc, ignoreCase, toString |
DistanceOrder
public DistanceOrder(com.vividsolutions.jts.geom.Point point,
boolean ascending)
- Parameters:
point
- The point from which we calculate the distanceascending
- Whether we sort Ascending
DistanceOrder
public DistanceOrder(com.vividsolutions.jts.geom.Point point)
- Parameters:
point
- the point from which we calculate the distance, default
ascending is true
toSqlString
public String toSqlString(org.hibernate.Criteria criteria,
org.hibernate.criterion.CriteriaQuery criteriaQuery)
throws org.hibernate.HibernateException
- Overrides:
toSqlString
in class org.hibernate.criterion.Order
- Throws:
org.hibernate.HibernateException
Copyright © 2012. All Rights Reserved.