callbizatomstatement.java

来自「这个是使用java开发的一个平台」· Java 代码 · 共 60 行

JAVA
60
字号
/*
 * Created on 2005-8-1
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.exp.bizatom.auto.statement;

import com.exp.bizatom.BizAtomEngine;
import com.exp.bizatom.auto.BizAutoAtomLogic;
import com.exp.bizatom.auto.BizAutoAtomUtil;

/**
 * @author Administrator
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class CallBizAtomStatement extends NormalBizAtomStatement {

    /*
     * (non-Javadoc)
     * 
     * @see com.exp.bizatom.auto.statement.NormalBizAtomStatement#executeStatement(com.exp.bizatom.auto.BizAutoAtomLogic,
     *      int)
     */
    protected int executeStatement(BizAutoAtomLogic logic, int row)
            throws Throwable {
        String bizAtom = this.getAttribute("target");
        String param = this.getAttribute("param");
        String setVar = this.getAttribute("set-var");
        if (!"".equals(bizAtom)) {
            Object paramObj = null;
            if (!"".equals(param)) {
                paramObj = BizAutoAtomUtil
                        .getRealValue(logic.getStack(), param);
            }
            BizAtomEngine engine = BizAtomEngine.getBizAtomEngine();
            Object ret = engine.executeBizAtom(bizAtom, paramObj);
            if (!"".equals(setVar)) {
                if (ret != null) {
                    logic.getStack().setVariable(setVar, ret);
                }
            }
        }
        return 1;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.exp.fcl.interfaces.Prototype#create()
     */
    public Object create() {
        CallBizAtomStatement call = new CallBizAtomStatement();
        call.copyAttributesTo(this);
        return call;
    }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?