<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-5-29 下午2:24:37  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FND_BASE_RATE_SET" defaultOrderBy="t1.base_rate_type,t1.valid_from">
    <bm:fields>
        <bm:field name="base_rate_set" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BASE_RATE_SET" prompt="FND251.FND_BASE_RATE_SET.BASE_RATE_SET"/>
        <bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.DESCRIPTION"/>
        <bm:field name="base_rate_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BASE_RATE_TYPE" prompt="FND250.FND_BASE_RATE_TYPE.BASE_RATE_TYPE"/>
        <bm:field name="currency" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY" prompt="HLS.CURRENCY"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS.ENABLED_FLAG"/>
        <bm:field name="valid_from" databaseType="DATE" datatype="java.util.Date" physicalName="VALID_FROM" prompt="HLS.VALIDITY_FROM"/>
        <bm:field name="valid_to" databaseType="DATE" datatype="java.util.Date" physicalName="VALID_TO" prompt="HLS.VALIDITY_TO"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
    			begin
				   FND251_SAVE_PKG.rateSet_manage(p_sql_type	   => 'INSERT',
				   								  p_base_rate_set  => ${@base_rate_set},
									              p_description    => ${@description},
									              p_base_rate_type => ${@base_rate_type},
									              p_currency       => ${@currency},
									              p_enabled_flag   => ${@enabled_flag},
									              p_valid_from     => to_date(${@valid_from},'yyyy-mm-dd'),
									              p_valid_to       => to_date(${@valid_to},'yyyy-mm-dd'),
									              p_user_id        => ${/session/@user_id});
    				
    			end;
    		]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
    			begin
				   FND251_SAVE_PKG.rateSet_manage(p_sql_type	   => 'UPDATE',
				   								  p_base_rate_set  => ${@base_rate_set},
									              p_description    => ${@description},
									              p_base_rate_type => ${@base_rate_type},
									              p_currency       => ${@currency},
									              p_enabled_flag   => ${@enabled_flag},
									              p_valid_from     => to_date(${@valid_from},'yyyy-mm-dd'),
									              p_valid_to       => to_date(${@valid_to},'yyyy-mm-dd'),
									              p_user_id        => ${/session/@user_id});
    				
    			end;
    		]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
    			begin
				   FND251_SAVE_PKG.rateSet_manage(p_sql_type	   => 'DELETE',
				   								  p_base_rate_set  => ${@base_rate_set},
									              p_description    => ${@description},
									              p_base_rate_type => ${@base_rate_type},
									              p_currency       => ${@currency},
									              p_enabled_flag   => ${@enabled_flag},
									              p_valid_from     => to_date(${@valid_from},'yyyy-mm-dd'),
									              p_valid_to       => to_date(${@valid_to},'yyyy-mm-dd'),
									              p_user_id        => ${/session/@user_id});
    				
    			end;
    		]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="execute">
            <bm:update-sql><![CDATA[
    			begin
				     FND251_SAVE_PKG.rateSet_copy(p_old_base_rate_set   => ${@old_base_rate_set},
				   								  p_base_rate_set  		=> ${@base_rate_set},
									              p_description    		=> ${@description},
									              p_valid_from     		=> to_date(${@valid_from},'yyyy-mm-dd'),
									              p_user_id        		=> ${/session/@user_id});
    				
    			end;
    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="base_rate_set"/>
    </bm:primary-key>
</bm:model>
