<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FND_AGING_BUCKET_LINES_VL" defaultorderby="days">
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
    			begin
					fnd_aging_buckets_pkg.ins_aging_bucket_line(
														p_aging_bucket_line_id => ${@aging_bucket_line_id},
			                                            p_aging_bucket_id      => ${@aging_bucket_id},
			                                            p_description          => ${@description},
			                                            p_days                 => ${@days},
			                                            p_user                 => ${/session/@user_id}
					);
				end;
    		]]></bm:update-sql>
            <bm:parameters>
                <bm:parameter name="aging_bucket_line_id" dataType="java.lang.Long" input="false" inputPath="@aging_bucket_line_id" output="true" outputPath="@aging_bucket_line_id"/>
            </bm:parameters>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
    			begin
					fnd_aging_buckets_pkg.upd_aging_bucket_line(
														p_aging_bucket_line_id => ${@aging_bucket_line_id},
			                                            p_description          => ${@description},
			                                            p_days                 => ${@days},
			                                            p_user                 => ${/session/@user_id});
				end;
    		]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
    			begin
					fnd_aging_buckets_pkg.del_aging_bucket_line(p_aging_bucket_line_id => ${@aging_bucket_line_id});
				end;
    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="row_id" databaseType="ROWID" physicalName="ROW_ID"/>
        <bm:field name="aging_bucket_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AGING_BUCKET_ID"/>
        <bm:field name="aging_bucket_line_id" databaseType="NUMBER" datatype="java.lang.Double" physicalName="AGING_BUCKET_LINE_ID"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION"/>
        <bm:field name="days" databaseType="NUMBER" datatype="java.lang.Double" physicalName="DAYS"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="aging_bucket_id" queryExpression="aging_bucket_id=${@aging_bucket_id}"/>
    </bm:query-fields>
</bm:model>
