Map searchArgsMap = new HashMap();
for (int i = 0; i < args.length; i++) {
searchArgsMap.put(args[i].getName(), args[i].getValue());
}
Collection people = PersonDAO.getInstance().findPeople(searchArgsMap);
Person[] peopleArray = new Person[people.size()];
Iterator pIter = people.iterator();
int i = 0;
while (pIter.hasNext()) {
peopleArray[i++] = (Person)pIter.next();
}
return peopleArray;