Esempio n. 1
0
  public List<PreventionExt> getPreventionExtByPrevention(
      LoggedInInfo loggedInInfo, Integer preventionId) {
    List<PreventionExt> results = preventionExtDao.findByPreventionId(preventionId);

    LogAction.addLogSynchronous(
        loggedInInfo,
        "PreventionManager.getPreventionExtByPrevention",
        "preventionId=" + preventionId);

    return (results);
  }
Esempio n. 2
0
  public void addPreventionWithExts(Prevention prevention, HashMap<String, String> exts) {
    if (prevention == null) return;

    preventionDao.persist(prevention);
    if (exts != null) {
      for (String keyval : exts.keySet()) {
        if (StringUtils.filled(keyval) && StringUtils.filled(exts.get(keyval))) {
          PreventionExt preventionExt = new PreventionExt();
          preventionExt.setPreventionId(prevention.getId());
          preventionExt.setKeyval(keyval);
          preventionExt.setVal(exts.get(keyval));
          preventionExtDao.persist(preventionExt);
        }
      }
    }
  }