Because I want to play with the object of the DTO itself, the other types like criteria, native… gives me the output as an object of a different class, like the Object class itself, and if I am using hibernate then I would prefer to use as HQL so that I can take the most advantage of it( if possible) , else I would go for jdbc , I want to avoid using the getters and the setters s much as possible.
Criteria cr = session.createCriteria(com.leadics.as.locator.hb.dto.XYZ.class)
.setProjection(Projections.projectionList()
.add(Projections.max("signal"))
.add(Projections.groupProperty("sender"))
.add(Projections.groupProperty("receiver")));
cr.add(Restrictions.between("createdDatetime", from, to));
List<XYZ> br=()cr.list();
I want to use like above…
but this one fails here( List br=cr.list()
I can only use List br=cr.list();
which is not helpful for me.