public void updatePersons(Person[] updated, Integer[] resetPassword,
String newPassword, Integer[] deleted, Integer adminId)
throws FinderException, RemoveException, RemoteException
{
IPersonHome home = getPersonHome();
int count = Tapestry.size(updated);
for(int i = 0; i < count; i++)
{
Person u = updated[i];
IPerson person = home.findByPrimaryKey(u.getId());
person.setAdmin(u.isAdmin());
person.setLockedOut(u.isLockedOut());
}
count = Tapestry.size(resetPassword);
for(int i = 0; i < count; i++)
{
IPerson person = home.findByPrimaryKey(resetPassword[i]);
person.setPassword(newPassword);
}
count = Tapestry.size(deleted);
if (count > 0)
{
returnBooksFromDeletedPersons(deleted);
moveBooksFromDeletedPersons(deleted, adminId);
}
for(int i = 0; i < count; i++)
home.remove(deleted[i]);
}