{
System.out.println("FIREWORKFLOW_JDCB:" + sql.toString());
}
super.getJdbcTemplate().execute(sql.toString(),
new AbstractLobCreatingPreparedStatementCallback(this.lobHandler)
{
protected void setValues(PreparedStatement ps, LobCreator lobCreator) throws SQLException
{
ps.setString(1, java.util.UUID.randomUUID().toString().replace("-", ""));
ps.setString(2, workflowDef.getDefinitionType());
ps.setString(3, workflowDef.getProcessId());
ps.setString(4, workflowDef.getName());
ps.setString(5, workflowDef.getDisplayName());
ps.setString(6, workflowDef.getDescription());
ps.setInt(7, workflowDef.getVersion());
ps.setInt(8, workflowDef.getState() == true ? 1 : 0);
ps.setString(9, workflowDef.getUploadUser());
ps.setTimestamp(10, getSqlDateTime(workflowDef.getUploadTime()));
ps.setString(11, workflowDef.getPublishUser());
ps.setTimestamp(12, getSqlDateTime(workflowDef.getPublishTime()));
lobCreator.setClobAsString(ps, 13, workflowDef.getProcessContent());
}
});
}
else
{
StringBuffer sql = new StringBuffer();
sql.append(" update t_ff_df_workflowdef ");
sql.append("set definition_type=?,process_id=?,name=?,display_name=?,");
sql.append("description=?,version=?,state=?,upload_user=?,upload_time=?,");
sql.append("publish_user=?,publish_time=?,process_content=? ");
sql.append(" where id=? ");
if (show_sql)
{
System.out.println("FIREWORKFLOW_JDCB:" + sql.toString());
}
super.getJdbcTemplate().execute(sql.toString(),
new AbstractLobCreatingPreparedStatementCallback(this.lobHandler)
{
protected void setValues(PreparedStatement ps, LobCreator lobCreator) throws SQLException
{
ps.setString(1, workflowDef.getDefinitionType());