Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.gisgraphy.hibernate.criterion
Class DistanceOrder

    java.lang.Object
      org.hibernate.criterion.Order
          com.gisgraphy.hibernate.criterion.DistanceOrder

All Implemented Interfaces:
  java.io.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
`java.lang.String` | `toSqlString(org.hibernate.Criteria criteria, org.hibernate.criterion.CriteriaQuery criteriaQuery)`

Methods inherited from class org.hibernate.criterion.Order
`asc, desc, ignoreCase, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### DistanceOrder

    public DistanceOrder(com.vividsolutions.jts.geom.Point point,
                         boolean ascending)

Parameters:
  `point` - The point from which we calculate the distance
  `ascending` - 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

Method Detail

### toSqlString

    public java.lang.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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.