return (WorkflowDefinition) super.getJdbcTemplate().queryForObject(sql, new Object[] { id }, new RowMapper()
{
public Object mapRow(ResultSet rs, int rowNum) throws SQLException
{
WorkflowDefinition workFlowDefinition = new WorkflowDefinition();
workFlowDefinition.setId(rs.getString("id"));
workFlowDefinition.setDefinitionType(rs.getString("definition_type"));
workFlowDefinition.setProcessId(rs.getString("process_id"));
workFlowDefinition.setName(rs.getString("name"));
workFlowDefinition.setDisplayName(rs.getString("display_name"));
workFlowDefinition.setDescription(rs.getString("description"));
workFlowDefinition.setVersion(rs.getInt("version"));
workFlowDefinition.setState(rs.getInt("state") == 1 ? true : false);
workFlowDefinition.setUploadUser(rs.getString("upload_user"));
workFlowDefinition.setUploadTime(rs.getTimestamp("upload_time"));
workFlowDefinition.setPublishUser(rs.getString("publish_user"));
workFlowDefinition.setPublishTime(rs.getTimestamp("publish_time"));
// 读取blob大字段
workFlowDefinition.setProcessContent(lobHandler.getClobAsString(rs, "process_content"));
return workFlowDefinition;
}
});
}