guicamest/InterfaceToDTO — Issue #21: Make HibernateDTOUtils support map results
Author: guicamest
Created: 2011-10-18 00:48:35+00:00
State: open

Depends on #17

Let's say we have the query:

String hql = "select user, sum(userdata.followers + userdata.following) ..."

usage would be:

Map followData = DTOHibernateUtils.getFor(IUserFollowingData.class).map()
.key(0).fromQuery(query);

If user wants to use the second value as key:

Map followData = DTOHibernateUtils.getFor(IUserFollowingData.class).map()
.key(1).fromQuery(query);