HQL Devuelve el nuevo objeto de la consulta

return em.createQuery("select new YourClass(yourTable.yourValue, sum(yourTable.yourValueButSum)) from YourTable yourTable " +
                                "where yourTable.yourValue = :value" +
                                " group by yourTable.yourGroup" +
                                " order by yourTable.yourValue desc",
                        Yourclass.class).setParameter("value", value);
Zwazel