<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-4-18 下午12:59:47  
    $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 d.column_code,
       d.column_name,
       d.prompt,
       d.validation_type,
       d.validation_sql,
       d.input_mode,
       d.display_order,
       d.price_list,
       d.layout_area_seq
  from hls_fin_calc_config d
  #WHERE_CLAUSE#
 order by d.display_order desc
]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="column_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_CODE" required="true"/>
        <bm:field name="column_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COLUMN_NAME" required="true"/>
        <bm:field name="prompt" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PROMPT"/>
        <bm:field name="validation_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VALIDATION_TYPE"/>
        <bm:field name="validation_sql" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VALIDATION_SQL"/>
        <bm:field name="input_mode" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INPUT_MODE"/>
        <bm:field name="display_order" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISPLAY_ORDER"/>
        <bm:field name="price_list" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PRICE_LIST" required="true"/>
        <bm:field name="layout_area_seq" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAYOUT_AREA_SEQ" required="true"/>
    </bm:fields>
    <bm:data-filters>
        <bm:data-filter name="query" expression="(d.enabled_flag = &apos;Y&apos; and (d.display_flag = &apos;Y&apos; or (d.display_flag=&apos;C&apos; and exists(select 1 from hls_fin_calc_config_quote q where q.calc_session_id=${/parameter/@calc_session_id} and q.layout_area_seq=d.layout_area_seq and q.column_name=d.column_name and q.display_flag=&apos;Y&apos;))) and d.price_list=nvl(${@price_list},(select h.price_list from hls_fin_calculator_hd h where h.calc_session_id=${/parameter/@calc_session_id})))"/>
    </bm:data-filters>
</bm:model>
