Implementation of findPeople. Here we simply invoke our PersonDAO
to perform the search using whatever information source it's configured
to use.
PersonDAO dao = PersonDAO.getInstance();
Map searchParamsMap = new HashMap();
for (int i = 0; i < args.length; i++) {
searchParamsMap.put(args[i].getName(), args[i].getValue());
}
Collection people = dao.findPeople(searchParamsMap);
Person[] peopleArray = new Person[people.size()];
Iterator pIter = people.iterator();
int i = 0;
while (pIter.hasNext()) {
peopleArray[i++] = (Person)pIter.next();
}
return peopleArray;