<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features">
    <bm:operations>
        <bm:operation name="insert">
            <bm:parameters>
                <bm:parameter dataType="java.lang.Long" name="company_id" required="true"/>
                <bm:parameter dataType="java.lang.Long" name="parent_company_id" required="true"/>
                <bm:parameter dataType="java.lang.String" name="enabled_flag" required="true"/>
                <bm:parameter dataType="java.lang.Long" inputPath="@company_hierarchy_id" name="company_hierarchy_id" output="true" outputPath="@company_hierarchy_id"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
				 begin 
				 fnd_company_hierarchy_dtl_pkg.ins_fnd_company_hierarchy_dtl(   ${@company_hierarchy_id},
				                                                                ${@company_id},
				                                                                ${@parent_company_id},
				                                                                ${@enabled_flag},
				                                                                ${/session/@user_id}
				                                                                    );
				                      
				end;            
            ]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:parameters>
                <bm:parameter dataType="java.lang.Long" name="company_id" required="true"/>
                <bm:parameter dataType="java.lang.String" name="enabled_flag" required="true"/>
                <bm:parameter dataType="java.lang.Long" name="company_hierarchy_id" required="true"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
				 begin
				     fnd_company_hierarchy_dtl_pkg.upd_fnd_company_hierarchy_dtl(    ${@company_hierarchy_id},
					                                                                 ${@company_id},                                                                   
					                                                                 ${@enabled_flag},
					                                                                 ${/session/@user_id}
				                                                                 );
				end;            
            ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
