}
private Map<String, List<ContentMailInfo>> extractContentMailInfoFromResultSet(ResultSet res) throws SQLException {
Map<String, List<ContentMailInfo>> contentsToNotify = new HashMap<String, List<ContentMailInfo>>();
while (res.next()) {
ContentMailInfo info = new ContentMailInfo();
info.setId(res.getInt(1));
info.setDate(res.getTimestamp(2));
info.setOperationCode(res.getInt(3));
info.setContentId(res.getString(4));
info.setContentTypeCode(res.getString(5));
info.setContentDescr(res.getString(6));
info.setMainGroup(res.getString(7));
String groups = res.getString(8);
if (groups!=null) {
info.setGroups(groups.split(","));
}
String contentType = info.getContentTypeCode();
List<ContentMailInfo> infosForContentType = (List<ContentMailInfo>) contentsToNotify.get(contentType);
if (infosForContentType == null) {
infosForContentType = new ArrayList<ContentMailInfo>();
contentsToNotify.put(contentType, infosForContentType);
}