Hi,
Here is example, You can try with createCriteria. you can expand on this example and hope it works.
Code:
Session session = getCurrentSession();
Criteria criteria = session.createCriteria(FidsEventParameter.class);
criteria.setProjection(Projections.distinct(Projections.projectionList().add(Projections.property("terminal", "terminal").add(Projections.property("airline","airline"))).setResultTransformer(new AliasToBeanResultTransformer(FidsEventParameter.class));
List allparameterList = criteria.list();
return allparameterList;
My Forte 4GL and Spring Blog
srigold