<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-2-26 下午3:49:54  
    $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="GLD_JE_TRX_PARAMETERS">
    <bm:fields>
        <bm:field name="je_transaction_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_TRANSACTION_CODE" prompt="GLD104.GLD_JE_TRANSACTION.JE_TRANSACTION_CODE"/>
        <bm:field name="parameter_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PARAMETER_SEQ" prompt="GLD104.GLD_JE_TRX_PARAMETERS.PARAMETER_SEQ"/>
        <bm:field name="parameter_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARAMETER_CODE" prompt="GLD104.GLD_JE_TRX_PARAMETERS.PARAMETER_CODE"/>
        <bm:field name="parameter_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARAMETER_DESC" prompt="GLD104.GLD_JE_TRX_PARAMETERS.PARAMETER_DESC"/>
        <bm:field name="parameter_type" databaseType="VARCHAR2" datatype="java.lang.String" lookupCode="GLD104_COLUMN_TYPE" lookupField="parameter_type_desc" physicalName="PARAMETER_TYPE"/>
        <bm:field name="parameter_type_desc" forInsert="false" forUpdate="false" prompt="GLD104.GLD_JE_TRX_PARAMETERS.PARAMETER_TYPE"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select t1.je_transaction_code,
				       t1.parameter_seq,
				       t1.parameter_code,
				       t1.parameter_desc,
				       t1.parameter_type,
				       (select v.code_value_name
				          from sys_code_values_v v
				         where v.code = 'GLD104_COLUMN_TYPE'
				           and v.code_value = t1.parameter_type) as parameter_type_desc
				  from gld_je_trx_parameters t1
				 #WHERE_CLAUSE#
				order by t1.parameter_seq
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="je_transaction_code"/>
        <bm:pk-field name="parameter_seq"/>
    </bm:primary-key>
    <bm:data-filters>
        <bm:data-filter name="je_transaction_code" enforceOperations="query" expression="t1.je_transaction_code = ${@je_transaction_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="GLD104.ERROR.PARAMETER_SEQ_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
