<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-3-29 上午10:09:45  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FND_SCORE_TARGET_TYPE_PARA">
    <bm:fields>
        <bm:field name="target_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET_TYPE_CODE" prompt="FND711.FND_SCORE_TARGET_TYPE.TARGET_TYPE_CODE"/>
        <bm:field name="parameter_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PARAMETER_SEQ" prompt="FND711.FND_SCORE_TARGET_TYPE_PARA.PARAMETER_SEQ"/>
        <bm:field name="parameter_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARAMETER_CODE" prompt="FND711.FND_SCORE_TARGET_TYPE_PARA.PARAMETER_CODE"/>
        <bm:field name="parameter_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARAMETER_DESC" prompt="FND711.FND_SCORE_TARGET_TYPE_PARA.PARAMETER_DESC"/>
        <bm:field name="parameter_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARAMETER_TYPE" prompt="FND711.FND_SCORE_TARGET_TYPE_PARA.PARAMETER_TYPE"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:operations>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
    			begin
    			   fnd_score_define_pkg.type_parameter_delete(p_target_type_code => ${@target_type_code},
								                              p_parameter_seq    => ${@parameter_seq},
								                              p_user_id          => ${/session/@user_id});
    			end;
    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:primary-key>
        <bm:pk-field name="parameter_seq"/>
        <bm:pk-field name="target_type_code"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter name="target_type_code" enforceOperations="query" expression="target_type_code=${@target_type_code}"/>
    </bm:data-filters>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="FND711.ERROR_MESSAGE.PARAMETER_SEQ_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
