package com.tenwa.creditlimit.handler; import com.amarsoft.are.jbo.BizObject; import com.amarsoft.are.jbo.JBOTransaction; import com.amarsoft.awe.dw.handler.impl.CommonHandler; import com.amarsoft.dict.als.manage.NameManager; public class LALimitConfigInfoHandler extends CommonHandler { @Override protected void initDisplayForAdd(BizObject bo) throws Exception { String productId = this.asPage.getAttribute("ProductId").toString(); String specificId = this.asPage.getAttribute("SpecificId").toString(); String elementId = this.asPage.getAttribute("ElementId").toString(); String elementName = this.asPage.getAttribute("ElementName").toString(); bo.setAttributeValue("PRODUCT_ID", productId); bo.setAttributeValue("SPECIFIC_ID", specificId); bo.setAttributeValue("LIMIT_ELEMENT", elementId); bo.setAttributeValue("ELEMENT_NAME", elementName); super.initDisplayForAdd(bo); } @Override protected void beforeInsert(JBOTransaction tx, BizObject bo) throws Exception { String elementName = bo.getAttribute("ELEMENT_NAME").toString(); String limitOperator= bo.getAttribute("LIMIT_OPERATOR").toString(); String limitCode= bo.getAttribute("LIMIT_CODE").toString(); bo.setAttributeValue("LIMIT_DESCRIPT", elementName+NameManager.getItemName("OperatorType", limitOperator)+limitCode); super.beforeInsert(tx, bo); } @Override protected void beforeUpdate(JBOTransaction tx, BizObject bo) throws Exception { String elementName = bo.getAttribute("ELEMENT_NAME").toString(); String limitOperator= bo.getAttribute("LIMIT_OPERATOR").toString(); String limitCode= bo.getAttribute("LIMIT_CODE").toString(); bo.setAttributeValue("LIMIT_DESCRIPT", elementName+NameManager.getItemName("OperatorType", limitOperator)+limitCode); super.beforeUpdate(tx, bo); } }