package com.tenwa.flow.comm.handler; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.BizObjectManager; import com.amarsoft.are.jbo.JBOFactory; import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.awe.dw.handler.impl.CommonHandler; public class LBProjectHandler extends CommonHandler{ @Override protected void beforeUpdate(JBOTransaction tx, BizObject bo) throws Exception { String FlowUnid=this.asPage.getParameter("FlowUnid"); BizObjectManager bom=JBOFactory.getBizObjectManager(jbo.com.tenwa.entity.comm.flow.FLOW_BUSSINESS_OBJECT.CLASS_NAME); BizObject fbo=bom.createQuery("flow_unid=:flow_unid").setParameter("flow_unid", FlowUnid).getSingleResult(false); String proj_name=fbo.getAttribute("proj_name").toString(); String project_name=bo.getAttribute("project_name").toString(); if(!proj_name.equals(project_name)){ bom.createQuery("update O set proj_name=:proj_name where flow_unid=:flow_unid").setParameter("proj_name", project_name).setParameter("flow_unid",FlowUnid).executeUpdate(); } super.beforeUpdate(tx, bo); } }