<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-2-26 下午4:54:30  
    $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_TAB_COLUMNS">
    <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="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME" prompt="GLD104.GLD_JE_TRX_TABLES.TABLE_NAME"/>
        <bm:field name="table_desc" forInsert="false" forUpdate="false" physicalName="TABLE_DESC" prompt="HLS.TABLE_DESC"/>
        <bm:field name="table_column" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_COLUMN" prompt="GLD104.GLD_JE_TRX_TAB_COLUMNS.TABLE_COLUMN"/>
        <bm:field name="column_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_DESC" prompt="GLD104.GLD_JE_TRX_TAB_COLUMNS.COLUMN_DESC"/>
        <bm:field name="column_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_TYPE"/>
        <bm:field name="column_type_desc" forInsert="false" forUpdate="false" prompt="GLD104.GLD_JE_TRX_TAB_COLUMNS.COLUMN_TYPE"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select t1.je_transaction_code,
				       t1.table_name,
				       t1.table_desc,
				       t1.table_column,
				       t1.column_desc,
				       t1.column_type,
				       t1.column_type_name as column_type_desc
				  from GLD_JE_TRX_TAB_COLUMNS_V t1
				  #WHERE_CLAUSE#
				 order by t1.je_transaction_code,t1.table_name,t1.table_column
    		]]></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="table_column"/>
        <bm:pk-field name="table_name"/>
    </bm:primary-key>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="GLD104.ERROR.TABLE_COLUMN_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
    <bm:data-filters>
        <bm:data-filter name="je_transaction_code" enforceOperations="query" expression="je_transaction_code=${@je_transaction_code}"/>
        <bm:data-filter name="table_name" enforceOperations="query" expression="table_name=${@table_name}"/>
    </bm:data-filters>
</bm:model>
