int c = query.getStatement(con).executeUpdate(attributes); if ( c != 1) throw new MException("update failed, updated objects " + c);
@Override public boolean setNodeScope(UUID nodeId, int scope) throws IOException { try { DbConnection con = pool.getConnection(); MProperties prop = new MProperties(); DbStatement sta = null; prop.put("id", nodeId); prop.put("value", scope); sta = con.createStatement("UPDATE " + prefix + "_node_ SET scope_=$value$ WHERE id_=$id$"); int res = sta.executeUpdate(prop); con.close(); return res == 1; } catch (Exception e) { throw new IOException(e); } }
@Override public boolean setCasePriority(UUID caseId, int priority) throws IOException { try { DbConnection con = pool.getConnection(); MProperties prop = new MProperties(); DbStatement sta = null; prop.put("id", caseId); prop.put("value", priority); sta = con.createStatement("UPDATE " + prefix + "_case_ SET priority_=$value$ WHERE id_=$id$"); int res = sta.executeUpdate(prop); con.close(); return res == 1; } catch (Exception e) { throw new IOException(e); } }
@Override public boolean setNodePriority(UUID nodeId, int priority) throws IOException { try { DbConnection con = pool.getConnection(); MProperties prop = new MProperties(); DbStatement sta = null; prop.put("id", nodeId); prop.put("value", priority); sta = con.createStatement("UPDATE " + prefix + "_node_ SET priority_=$value$ WHERE id_=$id$"); int res = sta.executeUpdate(prop); con.close(); return res == 1; } catch (Exception e) { throw new IOException(e); } }
@Override public boolean setCaseScope(UUID caseId, int scope) throws IOException { try { DbConnection con = pool.getConnection(); MProperties prop = new MProperties(); DbStatement sta = null; prop.put("id", caseId); prop.put("value", scope); sta = con.createStatement("UPDATE " + prefix + "_case_ SET scope_=$value$ WHERE id_=$id$"); int res = sta.executeUpdate(prop); con.close(); return res == 1; } catch (Exception e) { throw new IOException(e); } }
if (exists) { DbStatement sta = con.createStatement("UPDATE " + prefix + "_engine_ SET content_=$content$,modified_=$modified$ WHERE id_=$id$"); sta.executeUpdate(prop); sta.close(); sta.executeUpdate(prop); sta.close();
/** * <p>saveObject.</p> * * @param con a {@link de.mhus.lib.sql.DbConnection} object. * @param object a {@link java.lang.Object} object. * @throws java.lang.Exception if any. */ public void saveObject(DbConnection con, Object object) throws Exception { for (Feature f : features) f.preSaveObject(con,object); HashMap<String, Object> attributes = new HashMap<String, Object>(); for (Field f : fList) { attributes.put(f.name, f.getFromTarget(object)); } for (FieldRelation f : relationList) { f.prepareSave(con,object); } schema.internalSaveObject(con, name, object, attributes); int c = sqlUpdate.getStatement(con).executeUpdate(attributes); if ( c != 1) throw new MException("update failed, updated objects " + c); for (Feature f : features) f.postSaveObject(con,object); for (FieldRelation f : relationList) { f.saved(con,object); } }
int c = sqlUpdateForce.getStatement(con).executeUpdate(attributes); if ( c != 1) throw new MException("update failed, updated objects " + c);
sta.executeUpdate(prop); sta.close();
sta.executeUpdate(prop); sta.close();
sta.executeUpdate(prop); sta.close(); } else { + "$index9$" + ")"); sta.executeUpdate(prop); sta.close();
sta.executeUpdate(prop); sta.close(); } else { + "$actor$" + ")"); sta.executeUpdate(prop); sta.close();