I have been using open source data set provider Casper to achieve in-memory representation of a collection of Database objects in Java.

Github Repository : https://github.com/casperds/casperdatasets

Below is the code that I have been using to pull data in Casper datasets

String[] primaryKeys = { "QUESTION_ID" }; if (resultSet != null) { container = CDataCacheDBAdapter.loadData(resultSet, null, primaryKeys,new HashMap<Object, Object>()); lCDataRowset = container.getAll(); preparedStatement.close(); resultSet.close(); }

The problem with using this is, when I don't mention primary keys then DBAdapter does not load data. And If I mention some column as primary keys then "Order By" does not have effect in the dataset. It just orders by primary keys.

I want to be able to pull data in dataset in order the way I have mentioned in the query.

Did anybody face this issue? Any kind of help is appreciated!! Thanks