You can download the code for this example here:
Onyx Database is capable of sorting and paging.
This tutorial demonstrates how to order your results as well as limit the number of results and the starting index of your search.
As an example, we will retrieve a list of all "Player" entities in the database and specifically we will order the results by lastName and firstName.
We will retrieve the first page of results then the second.
To see how the data was seeded for this example, see Main.java.
A QueryOrder can be used to sort the result set. There is not limit to the number of QueryOrders you can use in a single Query. This list of QueryOrders below will retrieve a list of players and order them by lastName ascending, then firstName ascending.
This example uses one of the many constructors that are available.