<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2013-9-30 上午09:37:34  
    $Revision: 1.0  
    $Purpose: 如果类型是SQL
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
            select a.* from 
            	(SELECT tv.line_number,
				       tv.description AS score_value_desc,
				       lv.score_value score_value,
				       tv.score_target_value_id,
				       lv.score_template_line_id
				  FROM fnd_score_target_values tv, fnd_score_template_ln_value lv
				 where tv.score_target_value_id = lv.score_target_value_id
				 )a
			 #WHERE_CLAUSE#
			 order by a.line_number asc
 ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="score_value" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="50" forDisplay="true" forQuery="true" physicalName="SCORE_VALUE" prompt="FND713.FND_SCORE_TEMPLATE_LN_VALUE.SCORE_VALUE"/>
        <bm:field name="score_value_desc" displayWidth="380" forDisplay="true" forInsert="false" forQuery="true" forUpdate="false" prompt="FND713.FND_SCORE_TEMPLATE_LN_VALUE.SCORE_VALUE_DESC"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="score_value" queryOperator="like"/>
        <bm:query-field field="score_value_desc" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="score_template_line_id" enforceOperations="query" expression="a.score_template_line_id=${@score_template_line_id}"/>
    </bm:data-filters>
</bm:model>
