<?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_DETAIL_MOVABLE_PROPERTY_M' AND
			       ${@mortgage_ast_classfication} in
			       ('MOVABLE_PROPERTY_M', 'MOVABLE_PROPERTY_P')) or
			       (SC.code = 'HLS209_ASSET_DETAIL_IMMOVABLE_PROPERTY_M' AND
			       ${@mortgage_ast_classfication} = 'IMMOVABLE_PROPERTY_M') or
			       (SC.code = 'HLS209_ASSET_DETAIL_RIGHT_P' AND
			       ${@mortgage_ast_classfication} = 'RIGHT_P'))
			   and sc.code_enabled_flag = 'Y'
			   and sc.code_value_enabled_flag = 'Y'
			)
			#WHERE_CLAUSE#
   			]]></bm:query-sql>
            <bm:parameters>
                <bm:parameter name="mortgage_ast_classfication"/>
            </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_ASSET_DETAIL"/>
        <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>
