Ok folks here's a further update.
I have a custom class for the store, lets call it MyStoreObject. I also have a custom class which represents and entire 'table' of data from the store called ObjectDB.
I have a method already which gets the whole hashtable and puts it into an array of a custom data type, E.g. I can do :
Code:
MyStoreObject myStore = new MyStoreObject();
ObjectDB[] objDBProducts = myStore.getAllDataObject(PRODUCTS);
Products[] prodObj = new Products[objDBProducts.length];
for (int i = 0; i < objDBProducts.length; i++) {
prodObj[i] = (Products)objDBProducts[i]
}
Now the products object is defined in such a way that I can refer to the 'fields' of the object as prodObj[i].PRODUCT_ID for example.
Now I'm think I ought to be able to use the sort method on the prodObj[] array in order to sort the records by a given column, and I should be able to write a comparator to use to perform this sort, but I really don't know where to begin. I'm not a java developer (although I am a developer) and I've inherited this project. All my java expertise has come from unravelling this app and some lucky finds in the docs to develop new stuff, but now I've got stuck!
Any ideas (even code to point my syntax in the right direction) would be very much appreciated!
Cheers!
this will give me