<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:fields>
        <bm:field name="log_id" databaseType="NUMBER" datatype="java.lang.Long"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
        		select hl_hsbc_interface_log_s.nextval as log_id from dual
        	]]></bm:query-sql>
        </bm:operation>

        <bm:operation name="insert">
            <bm:query-sql><![CDATA[
        		  BEGIN
                    hl_hsbc_interface_pkg.insert_log(
                        p_log_id => ${@log_id},
                        p_interface_code=> ${@interface_code},
                        p_reqsn => ${@reqsn},
                        p_request => ${@request},
                        p_send_return_code => ${@send_return_code},
                        p_user_id => ${/session/@user_id}
                    );
                END;
        	]]></bm:query-sql>
        </bm:operation>

        <bm:operation name="update">
            <bm:query-sql><![CDATA[
        		  BEGIN
                    hl_hsbc_interface_pkg.hl_hsbc_error(
                        p_reqsn => ${@reqsn},
                        p_user_id => '-1'
                    );
                END;
        	]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
