Reusable « Criteria « JPA Q&A





1. how to get Reusable Hibernate Criteria.?    stackoverflow.com

How to clone criteria object? I have created Criteria object for joining multiple tables and applying multiple restrictions. Then i need total number of records based on the restrictions applied.Then i need ...

2. Reusable Criteria instance - is it possible?    forum.hibernate.org

You have not posted the code for the gridHelper object, but since you say it is a POJO I assume that the getCriteria() is simply returning a reference to the instance that is kept inside it. So there is only one copy and when you modify it it will not help to call getCriteria() again since it is returning a reference ...