1 package transactions.security; 2 3 import dinamica.*; 4 5 14 public class InsertMaster extends GenericTransaction 15 { 16 17 20 public int service(Recordset inputParams) throws Throwable 21 { 22 23 int rc = super.service(inputParams); 24 25 String sql = getResource("insert.sql"); 27 28 sql = this.getSQL(sql, inputParams); 30 31 Db db = getDb(); 33 34 db.exec(sql); 36 37 Recordset rsId = db.get("select @@identity master_id"); 39 rsId.next(); 40 41 sql = getResource("insert-roles.sql"); 43 sql = this.getSQL(sql, rsId); 44 InsertRoles r = (InsertRoles)getObject("transactions.security.InsertRoles"); 45 r.saveRoles(sql); 46 47 return rc; 48 49 } 50 51 } 52 | Popular Tags |