models = systemNotificationService.getAllForTypes(true, types);
} else {
models = systemNotificationService.getAllModels(true);
}
Comparator<SystemNotificationModel> notificationTypeComparator = new BeanComparator("notificationType", new SystemNotificationTypeComparator());
Comparator<SystemNotificationModel> notificationSeverityComparator = new BeanComparator("notificationSeverity", new SystemNotificationSeverityComparator());
ComparatorChain chain = new ComparatorChain();
chain.addComparator(notificationTypeComparator);
chain.addComparator(notificationSeverityComparator);