static void setSingleParam(String key, String value, DbConn cnx)
    {
        QueryResult r = cnx.runUpdate("globalprm_update_value_by_key", value, key);
        if (r.nbUpdated == 0)
        {
            cnx.runUpdate("globalprm_insert", key, value);
        }
        cnx.commit();
    }
static void setSingleParam ( String key , String value , DbConn cnx ) { QueryResult r = cnx . runUpdate ( "globalprm_update_value_by_key" , value , key ) ; if ( r . nbUpdated == 0 ) { cnx . runUpdate ( "globalprm_insert" , key , value ) ; } cnx . commit ( ) ; }
Checks if a parameter exists. If it exists, it is updated. If it doesn't, it is created. Only works for parameters which key is
unique. Will create a transaction on the given entity manager.