1
|
/**
|
2
|
* Copyright (C) 2009 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
|
10
|
package eu.etaxonomy.cdm.persistence.query;
|
11
|
|
12
|
import org.hibernate.criterion.ProjectionList;
|
13
|
import org.hibernate.criterion.Projections;
|
14
|
|
15
|
import eu.etaxonomy.cdm.persistence.query.OrderHint.SortOrder;
|
16
|
|
17
|
public class GroupByCount extends Grouping {
|
18
|
|
19
|
public GroupByCount(String name, SortOrder order) {
|
20
|
super("", name, null, order);
|
21
|
}
|
22
|
|
23
|
@Override
|
24
|
public void addProjection(ProjectionList projectionList) {
|
25
|
projectionList.add(Projections.rowCount(),name);
|
26
|
}
|
27
|
|
28
|
@Override
|
29
|
public String getAssociatedObj() {
|
30
|
return null;
|
31
|
}
|
32
|
|
33
|
}
|