public JqmTester addParameter(String key, String value) { RuntimeParameter.create(cnx, ji, key, value); cnx.commit(); return this; }
public void loadPrmCache(DbConn cnx) { prmCache = new HashMap<String, String>(); for (Map.Entry<String, String> jp : RuntimeParameter.select_map(cnx, "jiprm_select_by_ji", this.id).entrySet()) { prmCache.put(jp.getKey(), jp.getValue()); } }
/** * Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards. * * @param key * name of the parameter to add * @param value * value of the parameter to create * @return the newly created parameter */ public RuntimeParameter addParameter(String key, String value) { RuntimeParameter jp = new RuntimeParameter(); jp.setJi(this.getId()); jp.setKey(key); jp.setValue(value); return jp; }
/** * Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards. * * @param key * name of the parameter to add * @param value * value of the parameter to create * @return the newly created parameter */ public RuntimeParameter addParameter(String key, String value) { RuntimeParameter jp = new RuntimeParameter(); jp.setJi(this.getId()); jp.setKey(key); jp.setValue(value); return jp; }
public JqmTester addParameter(String key, String value) { RuntimeParameter.create(cnx, ji, key, value); cnx.commit(); return this; }
public void loadPrmCache(DbConn cnx) { prmCache = new HashMap<>(); for (Map.Entry<String, String> jp : RuntimeParameter.select_map(cnx, "jiprm_select_by_ji", this.id).entrySet()) { prmCache.put(jp.getKey(), jp.getValue()); } }
public static int enqueue(DbConn cnx, State status, int queue_id, int job_id, String application, Integer parentId, String module, String keyword1, String keyword2, String keyword3, String sessionId, String userName, String email, boolean highlander, boolean fromSchedule, Calendar notBefore, int priority, Instruction instruction, Map<String, String> prms) { QueryResult qr = cnx.runUpdate("ji_insert_enqueue", email, application, keyword1, keyword2, keyword3, module, parentId, sessionId, status, userName, job_id, queue_id, highlander, fromSchedule, notBefore, priority, instruction); int newId = qr.getGeneratedId(); if (prms != null) { for (Map.Entry<String, String> prm : prms.entrySet()) { RuntimeParameter.create(cnx, newId, prm.getKey(), prm.getValue()); } } return newId; } }
Map<String, String> prms = RuntimeParameter.select_map(cnx, "jiprm_select_by_ji", launchId); ResultSet rs = cnx.runSelect("history_select_reenqueue_by_id", launchId);
public static int enqueue(DbConn cnx, State status, int queue_id, int job_id, String application, Integer parentId, String module, String keyword1, String keyword2, String keyword3, String sessionId, String userName, String email, boolean highlander, boolean fromSchedule, Calendar notBefore, int priority, Instruction instruction, Map<String, String> prms) { QueryResult qr = cnx.runUpdate("ji_insert_enqueue", email, application, keyword1, keyword2, keyword3, module, parentId, sessionId, status, userName, job_id, queue_id, highlander, fromSchedule, notBefore, priority, instruction); int newId = qr.getGeneratedId(); if (prms != null) { for (Map.Entry<String, String> prm : prms.entrySet()) { RuntimeParameter.create(cnx, newId, prm.getKey(), prm.getValue()); } } return newId; } }