Person user = (Person) getHibernateSession().load(Person.class, inRequest.getPersonId());
// add new preferences
for (NotificationFilterPreferenceDTO dto : inRequest.getPrefList())
{
NotificationFilterPreferenceEntity entity = new NotificationFilterPreferenceEntity();
entity.setPerson(user);
entity.setNotificationCategory(dto.getNotificationCategory());
entity.setNotifierType(dto.getNotifierType());
getEntityManager().persist(entity);
}
return null;
}