<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-5-6 下午3:03:36  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:e="leaf.service.exception" xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="CSH_BANK" needAccessControl="false">
    <bm:fields>
        <bm:field name="bank_id" databaseType="NUMBER" datatype="java.lang.Double" insertExpression="hls_bp_master_s.nextval" physicalName="BANK_ID" prompt="CSH_BANK.BANK_ID"/>
        <bm:field name="bank_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BANK_CODE" prompt="HLS.BANK_CODE"/>
        <bm:field name="bank_short_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BANK_SHORT_NAME" prompt="HLS.BANK_SHORT_NAME"/>
        <bm:field name="bank_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_TYPE"/>
        <bm:field name="bank_type_name" forInsert="false" forUpdate="false" prompt="HLS.BANK_TYPE"/>
        <bm:field name="bank_full_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_FULL_NAME" prompt="HLS.BANK_FULL_NAME"/>
        <bm:field name="zero_amounts_allowed" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ZERO_AMOUNTS_ALLOWED" prompt="CSH101.CSH_BANK.ZERO_AMOUNTS_ALLOWED"/>
        <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.bank_id,
    			       t1.bank_code,
				       t1.bank_short_name,
				       t1.bank_type,
				       t1.bank_type_name,
				       t1.bank_full_name,
				       t1.zero_amounts_allowed,
				       t1.enabled_flag
				  from csh_bank_v t1
				  #WHERE_CLAUSE#
    		]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field field="bank_code" queryOperator="like"/>
        <bm:query-field field="bank_short_name" queryOperator="like"/>
        <bm:query-field field="bank_full_name" queryOperator="like"/>
        <bm:query-field field="bank_type" queryOperator="="/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.enabled_flag = &apos;Y&apos;"/>
    </bm:data-filters>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="bank_id"/>
    </bm:primary-key>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="CSH101.ERROR.BANK_CODE_REPEATED"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
