public static void load(Regione model, String id, boolean forceReload) throws SQLException, Exception { if (!model.getCodice().matches(id) || forceReload == true) { String dbName = JndiName.dbTakaloa; RegioneDto.load(model, dbName, id); } }
public static void load(ArrayList list, boolean forceReload) throws SQLException, Exception { if (list.isEmpty() || forceReload == true) { list.clear(); ArrayList params = new ArrayList(); String dbName = JndiName.dbTakaloa; String sqry = "SELECT * FROM regione ORDER BY reg_nome"; Regione model; for (RowSet rowSet = Query.select(sqry, params, dbName); rowSet.next(); list.add(model)) { model = new Regione(); String id = rowSet.getString(1); RegioneDto.load(model, dbName, id); } } }