public String getCurrentUserFrequencyCode() {
   if (userSettings == null) {
     userSettings =
         DelayedNotificationFactory.getDelayedNotification()
             .getDelayedNotificationUserSettingByUserIdAndChannel(userId, NotifChannel.SMTP);
   }
   if (userSettings != null) {
     return userSettings.getFrequency().getCode();
   }
   return null;
 }
 public Set<DelayedNotificationFrequency> getFrequencies() {
   return DelayedNotificationFactory.getDelayedNotification().getPossibleFrequencies();
 }
 public DelayedNotificationFrequency getDefaultFrequency() {
   return DelayedNotificationFactory.getDelayedNotification()
       .getDefaultDelayedNotificationFrequency();
 }