1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.hr.time.person.dao;
17
18 import java.util.LinkedList;
19 import java.util.List;
20
21 import org.apache.log4j.Logger;
22 import org.kuali.hr.time.person.TKPerson;
23 import org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb;
24 import org.kuali.rice.kim.api.identity.Person;
25 import org.kuali.rice.kim.api.services.KimApiServiceLocator;
26
27 public class PersonDaoSpringOjbImpl extends PlatformAwareDaoBaseOjb implements PersonDao {
28
29 private static final Logger LOG = Logger.getLogger(PersonDaoSpringOjbImpl.class);
30
31 public List<TKPerson> getPersonCollection(List<String> principalIds) {
32
33 List<TKPerson> persons = new LinkedList<TKPerson>();
34
35 for (String principalId : principalIds) {
36 Person p = KimApiServiceLocator.getPersonService().getPerson(principalId);
37 if (p != null) {
38 TKPerson person = new TKPerson();
39 person.setPrincipalId(p.getPrincipalId());
40 person.setFirstName(p.getFirstName());
41 person.setLastName(p.getLastName());
42 person.setPrincipalName(p.getName());
43 persons.add(person);
44 }
45 }
46 return persons;
47 }
48
49 }