以下のSQLを実行したい
select count(*) as myCount from user group by name;
私は同じことについて次の基準を思いついた
DetachedCriteria.ForClass(typeof(UserDTO))
.setProjections(Projections.ProjectionList()
.Add(Projections.rowCount(),"myCount")
.Add(Projections.groupProperty("this.name"));
カウントと名前のペアとして結果が返されます。これからカウントを取得するにはどうすればよいですか。