com.gisgraphy.hibernate.criterion

## Class NativeSQLOrder

- java.lang.Object
- - org.hibernate.criterion.Order
  - - com.gisgraphy.hibernate.criterion.NativeSQLOrder

- All Implemented Interfaces:
    Serializable

      public class NativeSQLOrder
      extends org.hibernate.criterion.Order

  Author:
    David Masclet An hibernate order for SQL
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NativeSQLOrder(String sql)`
    `NativeSQLOrder(String sql, boolean ascending)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### NativeSQLOrder

          public NativeSQLOrder(String sql,
                        boolean ascending)

      Parameters:
        `sql` - the sql code
        `ascending` - whether we want to sort asc or desc

    - #### NativeSQLOrder

          public NativeSQLOrder(String sql)

      Parameters:
        `sql` - the sql code Default sorting will be ascending

  - ### Method Detail

    - #### 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 © 2015. All rights reserved.