1 package dinamica; 2 3 import electric.xml.*; 4 5 18 public class GenericTableManager extends GenericTransaction 19 { 20 21 24 public int service(Recordset inputParams) throws Throwable 25 { 26 27 int rc = 0; 29 30 super.service(inputParams); 32 33 Db db = getDb(); 35 36 Config c = getConfig(); 38 39 Document doc = c.getDocument(); 41 Elements q = doc.getRoot().getElements("query"); 42 43 if (q!=null) 44 { 45 while (q.hasMoreElements()) 46 { 47 48 Element e = q.next(); 50 String queryName = e.getString(); 51 52 String sql = getResource(queryName); 54 55 sql = this.getSQL(sql, inputParams); 57 58 db.exec(sql); 60 61 } 62 } 63 64 return rc; 65 66 } 67 68 } 69 | Popular Tags |