protected static PCaseInfo newPCase(DbResult res) throws Exception { PCaseInfo out = new PCaseInfo(UUID.fromString( res.getString("id_")), res.getString("uri_"), res.getString("name_"), toCaseState(res.getInt("state_")), res.getString("custom_"), res.getString("customer_"), res.getTimestamp("created_").getTime(), res.getTimestamp("modified_").getTime(), res.getInt("priority_"), res.getInt("score_"), new String[] { res.getString("index0_"), res.getString("index1_"), res.getString("index2_"), res.getString("index3_"), res.getString("index4_"), res.getString("index5_"), res.getString("index6_"), res.getString("index7_"), res.getString("index8_"), res.getString("index9_") }, res.getString("milestone_") ); return out; }
protected static PNodeInfo newPNode(DbResult res) throws Exception { PNodeInfo out = new PNodeInfo( UUID.fromString(res.getString("id_")), UUID.fromString(res.getString("case_")), res.getString("name_"), res.getString("assigned_"), toNodeState(res.getInt("state_")), toNodeType(res.getInt("type_")), res.getString("uri_"), res.getString("custom_"), res.getString("customer_"), res.getTimestamp("created_").getTime(), res.getTimestamp("modified_").getTime(), res.getInt("priority_"), res.getInt("score_"), res.getString("actor_"), new String[] { res.getString("index0_"), res.getString("index1_"), res.getString("index2_"), res.getString("index3_"), res.getString("index4_"), res.getString("index5_"), res.getString("index6_"), res.getString("index7_"), res.getString("index8_"), res.getString("index9_")
public void dumpNodes() { try { DbConnection con = pool.getConnection(); MProperties prop = new MProperties(); DbStatement sta = con.createStatement("SELECT * FROM " + prefix + "_node_"); DbResult res = sta.executeQuery(prop); while(res.next()) { System.out.println("NODE:"); for (String name : res.getColumnNames()) if (!name.toLowerCase().equals("content_")) System.out.println(" " + name + ": " + res.getString(name)); } } catch (Exception e) { throw new RuntimeException(e); } }
public void dumpCases() { try { DbConnection con = pool.getConnection(); MProperties prop = new MProperties(); DbStatement sta = con.createStatement("SELECT * FROM " + prefix + "_case_"); DbResult res = sta.executeQuery(prop); while(res.next()) { System.out.println("CASE:"); for (String name : res.getColumnNames()) if (!name.toLowerCase().equals("content_")) System.out.println(" " + name + ": " + res.getString(name)); } } catch (Exception e) { throw new RuntimeException(e); } }