csh_tenant_bank.lwm 4.77 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author:  
    $Date: 2013-5-6 下午3:03:36  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="csh_tenant_bank">
    <bm:fields>
        <bm:field name="bank_id" databaseType="NUMBER" datatype="java.lang.Double" insertExpression="csh_bank_s.nextval" physicalName="BANK_ID" prompt="CSH_BANK.BANK_ID"/>
        <bm:field name="bank_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BANK_CODE" prompt="HLS.BANK_CODE"/>
        <bm:field name="bank_short_name" databaseType="VARCHAR2" datatype="java.lang.String" 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_tenant_bank_v t1
				  #WHERE_CLAUSE#
				 order by t1.bank_code
    		]]></bm:query-sql>
        </bm:operation>
        <!--    <bm:operation name="insert">
            <bm:parameters>
                <bm:parameter name="bank_id" input="false" output="true" outputPath="@bank_id"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
        		begin
				  CSH101_SAVE_PKG.bank_manage(p_sql_type			 => 'INSERT',
				  							  p_bank_id              => ${@bank_id},
								              p_bank_code            => ${@bank_code},
								              p_bank_type            => ${@bank_type},
								              p_bank_short_name      => ${@bank_short_name},
								              p_bank_full_name       => ${@bank_full_name},
								              p_zero_amounts_allowed => ${@zero_amounts_allowed},
								              p_enabled_flag         => ${@enabled_flag},
								              p_user_id              => ${/session/@user_id});
				end;
        	]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
        		begin
				  CSH101_SAVE_PKG.bank_manage(p_sql_type			 => 'UPDATE',
				  							  p_bank_id              => ${@bank_id},
								              p_bank_code            => ${@bank_code},
								              p_bank_type            => ${@bank_type},
								              p_bank_short_name      => ${@bank_short_name},
								              p_bank_full_name       => ${@bank_full_name},
								              p_zero_amounts_allowed => ${@zero_amounts_allowed},
								              p_enabled_flag         => ${@enabled_flag},
								              p_user_id              => ${/session/@user_id});
				end;
        	]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
        		begin
				  CSH101_SAVE_PKG.bank_manage(p_sql_type			 => 'DELETE',
				  							  p_bank_id              => ${@bank_id},
								              p_bank_code            => ${@bank_code},
								              p_bank_type            => ${@bank_type},
								              p_bank_short_name      => ${@bank_short_name},
								              p_bank_full_name       => ${@bank_full_name},
								              p_zero_amounts_allowed => ${@zero_amounts_allowed},
								              p_enabled_flag         => ${@enabled_flag},
								              p_user_id              => ${/session/@user_id});
				end;
        	]]></bm:update-sql>
        </bm:operation>-->
    </bm:operations>
    <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>