code: static void initSingleParam(String key, String initValue, DbConn cnx)
      {
          try
          {
              cnx.runSelectSingle("globalprm_select_by_key", 2, String.class, key);
              return;
          }
          catch (NoResultException e)
          {
              GlobalParameter.create(cnx, key, initValue);
          }
          catch (NonUniqueResultException e)
          {
              // It exists! Nothing to do...
          }
      }
docs: Checks if a parameter exists. If it exists, it is left untouched. If it doesn't, it is created. Only works for parameters which key
  is unique. Must be called from within an open transaction.