The Sort class is a JavaBean that abstractly represents the data needed to calculate a sort on some data set. A sort consists of some {@link String} expression and a {@link SortDirection}. The mechanism for performing the sort is not provided here.
A Sort object can be used by some sorting infrastructure to either parameterise a SQL or XQuery query or to simply sort in-memory Java objects. For example, when converting a Sort into a SQL fragment, a Sort with sortExpression "foo" and sortDirection {@link SortDirection#DESCENDING} couldbe converted into:
ORDER BY FOO DESC
|
|
|
|
|
|
|
|
|
|
|
|