Using Hibernate how would you design and implement a search criteria page (which has multiple editable/selectable fields/drop-downs as search criteria) such that queries shouldn’t clutter data accessor code. I mean no query-string concatenation based on conditionals and ultimately all the queries should go in a separate xml file. I’ve done such an implementation using IBatis’s dynamic queries. Couldn’t find such thing in Hibernate so I started thinking what would be the elegant way to implement dynamic criteria based page in hibernate.
Using Hibernate how would you design and implement a search criteria page (which has
Share
Sounds like you are looking for, unsurprisingly, the
CriteriaAPI:http://docs.jboss.org/hibernate/core/3.5/reference/en/html/querycriteria.html