Object o = n.getValue();
if (o instanceof WValue)
try {
st.setParam(stm, k, ((WValue)o).getValueWait());
} catch (Throwable e) {
throw new CalculateException(getOwner(), e);
}
else
st.setParam(stm, k, o);
}
tl.addPointTime(TimeList.Type.END_WAIT);
Record result = new Record();
stm.execute();
con.commit();
StringList slist = st.getOutParamNames();
for(int i = 0; i < slist.size(); i++) {
String name = slist.get(i);
Object value = st.getParam(stm, name);
result.setObject(name, value);
}
return result;
} catch (SQLException e) {
e.printStackTrace();
attempt--;
if (attempt > 0) {
con = Manager.reInitConnection(con);
} else
throw new CalculateException(owner, e);
} catch (CalculateException ex) {
throw ex;
} catch (Exception ex) {
throw new CalculateException(owner, ex);
} finally {
st.closeStatement(stm);
}
} finally {
Manager.freeConnection(con);
}
} catch(SysException ex) {
throw new CalculateException(owner, ex);
} finally {
tl.addPointTime(Type.END);
}
}