1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package com.hack23.cia.service.data.impl;
20
21 import java.util.List;
22
23 import javax.persistence.criteria.CriteriaQuery;
24 import javax.persistence.criteria.Root;
25
26 import org.springframework.stereotype.Repository;
27
28 import com.hack23.cia.model.internal.application.data.committee.impl.RiksdagenCommitteeEmbeddedId;
29 import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee;
30 import com.hack23.cia.model.internal.application.data.committee.impl.ViewRiksdagenCommittee_;
31 import com.hack23.cia.service.data.api.ViewRiksdagenCommitteeDAO;
32
33
34
35
36 @Repository("ViewRiksdagenCommitteeDAO")
37 final class ViewRiksdagenCommitteeDAOImpl
38 extends
39 AbstractGenericDAOImpl<ViewRiksdagenCommittee, RiksdagenCommitteeEmbeddedId>
40 implements ViewRiksdagenCommitteeDAO {
41
42
43
44
45 public ViewRiksdagenCommitteeDAOImpl() {
46 super(ViewRiksdagenCommittee.class);
47 }
48
49 @Override
50 public List<RiksdagenCommitteeEmbeddedId> getIdList() {
51 final CriteriaQuery<RiksdagenCommitteeEmbeddedId> criteria = getCriteriaBuilder()
52 .createQuery(RiksdagenCommitteeEmbeddedId.class);
53 final Root<ViewRiksdagenCommittee> root = criteria
54 .from(ViewRiksdagenCommittee.class);
55 criteria.select(getCriteriaBuilder().construct(
56 RiksdagenCommitteeEmbeddedId.class,
57 root.get(ViewRiksdagenCommittee_.embeddedId)));
58 return getEntityManager().createQuery(criteria).getResultList();
59 }
60
61 }