hibernate/hibernate-ogm — pull request #321 by gunnarmorling (2014-05-20 11:38:49+00:00)
Title: OGM-494, OGM-487, OGM-512

To untangle the current work in progress, I'm going to close my previous PRs and create this new one (which is now based on master instead of Davide's Neo4j work). Feature-wise, this PR adds:

* support for ORDER BY for the Lucene backend
* support for ORDER BY for the MongoDB backend
* support for `Query#setFirstRow()` and `setMaxResults()`

Note that I've included several commits from my previous PRs for OGM-480 and OGM-506 as they lay ground for the actual feature commits. More specifically this:

* provides the infrastructure for named query parameters in native queries (OGM-480; I'll send another PR which actually makes use of this for Neo4j once Davide's work has been merged)
* unifies query execution for MongoDB, i.e. queries translated from JP-QL and native queries are handled uniformely in `MongoDBDialect`; This new approach now gets largely rid of the different query objects flying around before
* adds `NoSQLQuery createNativeQuery() on OgmSession` which basically is an alias for `createSQLQuery()` but naming-wise just makes much more sense