try {
con = DbHandler.getConnection();
Iterator<? extends Usergroup> groupsIterator = UsergroupFinderBase
.findAll(con).iterator();
Iterator<? extends Systemmessage> messageIterator;
Usergroup usergroup;
Systemmessage systemmessage;
Set<Systemmessage> group;
while (groupsIterator.hasNext()) {
usergroup = groupsIterator.next();
group = new HashSet<Systemmessage>();
messageIterator = SystemmessageFinder.findByGroupid(con,
usergroup.getId()).iterator();
while (messageIterator.hasNext()) {
systemmessage = messageIterator.next();
group.add(systemmessage);
}
tmpSystemMessageTable.put(usergroup.getId(), group);
}
systemMessageTable = tmpSystemMessageTable;
} catch (SQLException sqle) {
logger.log(Level.FATAL, "Unable to populate system messages", sqle);
} finally {