<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: DJ  
    $Date: 2013-10-16 下午2:36:34  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select * from
            (
            SELECT sc.code_value, sc.code_value_name
			  FROM SYS_CODE_VALUES_V SC
			 WHERE ((SC.code = 'HLS209_ASSET_MORTGAGE' AND
			       ${@mortgage_type} = 'MORTGAGE') or
			       (SC.code = 'HLS209_ASSET_PLEDGE' AND ${@mortgage_type} = 'PLEDGE'))
			   and sc.code_enabled_flag = 'Y'
			   and sc.code_value_enabled_flag = 'Y'
			)
			#WHERE_CLAUSE#
   			]]></bm:query-sql>
            <bm:parameters>
                <bm:parameter name="mortgage_type"/>
            </bm:parameters>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="code_value" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="CODE_VALUE" prompt="HLS216.HLS_MORTGAGE.MORTGAGE_AST_CLASSFICATION"/>
        <bm:field name="code_value_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="CODE_VALUE_NAME" prompt="HLS.DESCRIPTION"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="code_value" queryOperator="like"/>
        <bm:query-field field="code_value_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
