{quote:m4ktub} Nevertheless the paging issue is terrible. I currently don't know a solution that does not require all objects to be in memory. Paging really requires a deep integration with the presistency engine. {quote} Well if you don't mind having some nasty hacks under the hood your persistence engine could materialize an object, let's call it Pager, that would do the job. The code would be something like (keeping in mind that some verifications should be done and are not present in the example): {code} public class Pager { Integer pageSize; List idsToMaterialize; public Pager(Integer pageSize, List idsToMaterialize) { this.pageSize = pageSize; this.idsToMaterialize = idsToMaterialize; } public List getPage(Integer page) { List pageIds = idsToMaterialize.subList(this.pageSize*page,this.pageSize*page+pageSize); List elements = new ArrayList(); for(Integer id : pageIds) { elements.add(PersistenceEngine.materialize(id)); } return elements; } public int getTotalElements() { return idsToMaterialize.size(); } } {code} This solution is based on how dspace perform searches and how I page them. As I previously mentioned dspace uses Lucene and lucene returns an object that among other things contains the total number of elements matching our search and a list of a certain identifier that allows us to know which object is he talking about. There's one thing bugging me though, I would like that __materialize__ method would also receive the class of the object. But I can't say E.class, although I could say: {code} E x = new E(); Class realClass = x.getClass(); {code} But I think it's...err...too dirty! Any better ideas about this? \\ With this system you could request the persistent system to return a certain list as a Pager instead of a List. But no order on the list, which in many cases might be a problem.