Revision 892efc69
Added by Andreas Kohlbecker almost 14 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/agent/AgentDaoImpl.java | ||
---|---|---|
125 | 125 |
/* (non-Javadoc) |
126 | 126 |
* @see eu.etaxonomy.cdm.persistence.dao.agent.IAgentDao#getTeamOrPersonBaseUuidAndNomenclaturalTitle() |
127 | 127 |
*/ |
128 |
public List<UuidAndTitleCache<TeamOrPersonBase>> getTeamOrPersonBaseUuidAndNomenclaturalTitle() {
|
|
129 |
List<UuidAndTitleCache<TeamOrPersonBase>> list = new ArrayList<UuidAndTitleCache<TeamOrPersonBase>>();
|
|
128 |
public List<UuidAndTitleCache<Team>> getTeamUuidAndNomenclaturalTitle() {
|
|
129 |
List<UuidAndTitleCache<Team>> list = new ArrayList<UuidAndTitleCache<Team>>();
|
|
130 | 130 |
Session session = getSession(); |
131 | 131 |
|
132 |
Query query = session.createQuery("select uuid, nomenclaturalTitle from " + type.getSimpleName() + " where dtype = 'Person' or dtype = 'Team'");
|
|
132 |
Query query = session.createQuery("select uuid, nomenclaturalTitle from " + type.getSimpleName() + " where dtype = 'Team'"); |
|
133 | 133 |
|
134 | 134 |
List<Object[]> result = query.list(); |
135 | 135 |
|
136 | 136 |
for(Object[] object : result){ |
137 |
list.add(new UuidAndTitleCache<TeamOrPersonBase>(TeamOrPersonBase.class, (UUID) object[0], (String) object[1]));
|
|
137 |
list.add(new UuidAndTitleCache<Team>(Team.class, (UUID) object[0], (String) object[1]));
|
|
138 | 138 |
} |
139 | 139 |
|
140 | 140 |
return list; |
Also available in: Unified diff
merging /branches/cdmlib/SPRINT-Chichorieae1/ to trunk