<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-3-29 上午10:10:43  
    $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_COLUM">
    <bm:fields>
        <bm:field name="target_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TARGET_TYPE_CODE"/>
        <bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME" prompt="FND711.FND_SCORE_TARGET_TYPE_TABLE.TABLE_NAME"/>
        <bm:field name="table_column" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_COLUMN" prompt="FND711.FND_SCORE_TARGET_TYPE_COLUM.TABLE_COLUMN"/>
        <bm:field name="column_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_DESC" prompt="FND711.FND_SCORE_TARGET_TYPE_COLUM.COLUMN_DESC"/>
        <bm:field name="column_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_TYPE" prompt="FND711.FND_SCORE_TARGET_TYPE_COLUM.COLUMN_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_tab_col_delete(p_target_type_code 	=> ${@target_type_code},
						                              		 p_table_name       	=> ${@table_name},
							                              	 p_table_column			=> ${@table_column},
							                              	 p_user_id          	=> ${/session/@user_id});
    			end;
    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:primary-key>
        <bm:pk-field name="table_column"/>
        <bm:pk-field name="table_name"/>
        <bm:pk-field name="target_type_code"/>
    </bm:primary-key>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="FND711.ERROR_MESSAGE.TABLE_COLUMN_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
    <bm:data-filters>
        <bm:data-filter name="target_type_code" enforceOperations="query" expression="target_type_code=${@target_type_code}"/>
        <bm:data-filter name="table_name" enforceOperations="query" expression="table_name=${@table_name}"/>
    </bm:data-filters>
</bm:model>
