<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: niujiaqing1265 $
    $Date: 2010/12/09 05:48:38 $
    $Revision: 1.2 $
    $Purpose: 对应 gld_exchangerate_types 表的bm
-->
<ns1:model xmlns:e="leaf.service.exception" xmlns:ns1="http://www.leaf-framework.org/schema/bm" xmlns:ns2="leaf.database.features" alias="ge" baseTable="GLD_EXCHANGERATE_TYPES" extendMode="reference">
    <ns1:fields>
        <ns1:field name="type_code" databaseType="VARCHAR2" datatype="java.lang.String" prompt="GLD_EXCHANGERATE_TYPES.TYPE_CODE"/>
        <ns1:field name="rate_method_code" databaseType="VARCHAR2" datatype="java.lang.String"/>
        <ns1:field name="rate_method_code_display" databaseType="VARCHAR2" datatype="java.lang.String" expression="ge.rate_method_code" forInsert="false" forUpdate="false" prompt="GLD_EXCHANGERATE_TYPES.RATE_METHOD_CODE"/>
        <ns1:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" prompt="GLD_EXCHANGERATE_TYPES.ENABLED_FLAG"/>
        <ns1:field name="type_name_id" databaseType="NUMBER" datatype="java.lang.Long" multiLanguage="true" multiLanguageDescField="type_name"/>
        <ns1:field name="type_name" databaseType="VARCHAR2" datatype="java.lang.String" forInsert="false" forUpdate="false" prompt="GLD_EXCHANGERATE_TYPES.TYPE_NAME"/>
    </ns1:fields>
    <ns1:primary-key>
        <ns1:pk-field name="type_code"/>
    </ns1:primary-key>
    <ns1:query-fields>
        <ns1:query-field field="type_code" queryOperator="like"/>
        <ns1:query-field field="type_name" queryExpression="exists (select 1 from fnd_descriptions fd where ge.type_name_id=fd.description_id and fd.description_text like ${@type_name} and fd.language = ${/session/@lang})"/>
    </ns1:query-fields>
    <ns1:features>
        <ns2:multi-language-storage/>
        <ns2:standard-who/>
    </ns1:features>
    <ns1:ref-fields/>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="GLD_EXCHANGERATE_TYPES.TYPE_CODE_DISTINCT"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</ns1:model>
