I want to write a JDO query which fetches all objects of Advertisement class and then sort it on the base of time attribute of type long. For fetching all Advertisement objects, i am using following query.
List<Advertisement> annonces = null;
Query query = pm.newQuery(Advertisement.class);
advertisements = (List<Advertisement>) query.execute();
I want to add a filter which should sort result on the base of long property of Advertisement class. Thanks in advance