traversing and pagination
562565Feb 19 2007 — edited Jan 4 2009One thing I noticed is that while using DPL we are not able to get the arraylist proxy implementation like map and sortemap. suppose if I want to fetch to the next 50 records from index 5000 I would be traversing through the iterator of EntityCursor or the map keys to fetch next 50 records.
So when we implement the pagination providing a traversing page by page this process do consumes lot of CPU cycles. Can I use the EntityCursor to jump to the record position number not by primary key. Right now I dont see any such option. Is there any other way by using DPL we can access the records from record number not by primary key.
This will eat up the whole memory if I do this, in case if there are millions of records.
ArrayList list = new ArrayList(dao.getMyEntityByPK().map().values());
This will be loading wole list of entity values to the arraylist.
Thanks,
Shoaib