ObjectDB ObjectDB

setOrdering(ordering) - JDO Query's method

Method
javax.jdo.Query
void setOrdering(
  String ordering
)

Set the ordering specification for the result Collection. The ordering specification is a String containing one or more ordering declarations separated by commas.

Each ordering declaration is the name of the field on which to order the results followed by one of the following words: "ascending" or "descending".

The field must be declared in the candidate class or must be a navigation expression starting with a field in the candidate class.

Valid field types are primitive types except boolean; wrapper types except Boolean; BigDecimal; BigInteger; String; and Date.

Parameters:
ordering - the ordering specification.
Since:
JDO 1.0