DetachedCriteria criteria = DetachedCriteria.forClass(/*classname.class*/);
criteria = criteria.setProjection(
Projections.distinct(Projections.property(/*Criteria*/))).addOrder(Order.asc(/*Order by criteria*/));
// Enable query caching.
criteria.getExecutableCriteria(getSession()).setCacheable(true);
List
Using sessions :
session = HibernateSessionFactory.currentSession();
List
No comments:
Post a Comment