<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-5-24 下午1:57:48  
    $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_TEMPLATE_SET_COMPANY">
    <bm:fields>
        <bm:field name="je_template_set_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="JE_TEMPLATE_SET_CODE" prompt="GLD105.GLD_JE_TEMPLATE_SET.JE_TEMPLATE_SET_CODE"/>
        <bm:field name="je_template_set_desc" forInsert="false" forUpdate="false" prompt="GLD105.GLD_JE_TEMPLATE_SET.JE_TEMPLATE_SET_DESC"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID"/>
        <bm:field name="company_code" forInsert="false" forUpdate="false" prompt="HLS.COMPANY_CODE"/>
        <bm:field name="company_short_name" forInsert="false" forUpdate="false" prompt="HLS.COMPANY_SHORT_NAME"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS.ENABLED_FLAG"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select t1.je_template_set_code,
				       t1.company_id,
				       t1.company_code,
				       t1.company_short_name,
				       t1.enabled_flag,
				       t1.je_template_set_desc
				  from gld_je_template_set_company_v t1
				  #WHERE_CLAUSE#
				 order by t1.je_template_set_code
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="company_id"/>
        <bm:pk-field name="je_template_set_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="GLD118.ERROR.JE_TEMPLATE_SET_CODE_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
