<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
                BEGIN
                    ${@hired_req_id}:=hn_intermediary_hired_req_pkg.create_intermediary_hired_req(p_bp_id =>${@bp_id},
                                         p_req_date =>to_date(${@req_date},'YYYY-MM-DD'),
                                         p_company_id =>${/session/@company_id},
                                         p_user_id  =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="hired_req_id" output="true" outputPath="@hired_req_id"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_intermediary_hired_req_pkg.delete_intermediary_hired_req(p_hired_req_id =>${@hired_req_id},
                                          p_user_id      =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
                BEGIN
                    hn_intermediary_hired_req_pkg.submit_intermediary_hired_req(p_hired_req_id =>${@hired_req_id},
                                          p_company_id   =>${/session/@company_id},
                                          p_user_id      =>${/session/@user_id});
                END;
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
