class HibernateProjectedResultMapper {

    @SuppressWarnings("unchecked")
    public <T, R> List<R> mapResults(List<?> objects, final Query<T, R> query) {
        final String[] returnFields = returnFields(query);
        return query.getEntityClass().equals(query.getReturnType())
                ? (List<R>) objects
                : Lists.transform(objects, new Function<Object,R>() {
                    @Override
                    public R apply(Object arg0) {
                        return mapResult(arg0, query, returnFields);
                    }
                });
    }

    public  HibernateProjectedResultMapper(ProjectedResultMapper mapper);

}