<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: hp  
    $Date: 2014-10-23 下午2:29:26  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
    <bm:operations>
        <bm:operation name="execute">
            <bm:parameters>
                <bm:parameter name="headcode"/>
                <bm:parameter name="txcode"/>
                <bm:parameter name="xmlclob" output="true"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
               declare
                xmlclob clob;
               begin
                    hls_ebank_ccb_xml_pkg.create_xml(p_transaction_id =>1,
                       p_headcode      =>${/parameter/@headcode},
                       p_txcode         => ${/parameter/@txcode},
                       p_xmlclob        =>${@xmlclob});
                 end;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    t1.txcode,
                    dbms_lob.substr(t1.xml_tplclob, dbms_lob.getlength(t1.xml_tplclob), 1) tpl_xml
                FROM
                    hls_ebank_xml_tpl t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="txcode"/>
        <bm:field name="tpl_xml" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="tpl_xml" prompt="HLS_EBANK_XML_VLAUES_LV.tpl_xml"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="txcode" queryOperator="="/>
    </bm:query-fields>
</bm:model>
