Rev 1378 | Rev 1395 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1378 | Rev 1380 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | package pt.estgp.estgweb.domain.dao.impl; |
1 | package pt.estgp.estgweb.domain.dao.impl; |
2 | 2 | ||
3 | import jomm.dao.impl.AbstractDao; |
3 | import jomm.dao.impl.AbstractDao; |
4 | import org.hibernate.Query; |
4 | import org.hibernate.Query; |
- | 5 | import org.hibernate.criterion.Projections; |
|
5 | import pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfeto; |
6 | import pt.estgp.estgweb.domain.QuestionarioPedagogicoCursoAfeto; |
6 | 7 | ||
7 | import java.util.List; |
8 | import java.util.List; |
8 | 9 | ||
9 | import static org.hibernate.criterion.Restrictions.eq; |
10 | import static org.hibernate.criterion.Restrictions.eq; |
Line 31... | Line 32... | ||
31 | return createCriteria() |
32 | return createCriteria() |
32 | .add(eq("questionario.id", questionarioId)) |
33 | .add(eq("questionario.id", questionarioId)) |
33 | .list(); |
34 | .list(); |
34 | } |
35 | } |
35 | 36 | ||
- | 37 | public List<Long> findCursosAfetosIds(long questionarioId) |
|
- | 38 | { |
|
- | 39 | return createCriteria() |
|
- | 40 | .setProjection(Projections.distinct(Projections.property("id"))) |
|
- | 41 | .add(eq("questionario.id", questionarioId)) |
|
- | 42 | .list(); |
|
- | 43 | } |
|
- | 44 | ||
36 | 45 | ||
37 | 46 | ||
38 | 47 | ||
39 | public static class CourseStatsVars |
48 | public static class CourseStatsVars |
40 | { |
49 | { |