<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-7-23 下午06:33:48  
    $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 s.function_id, s.function_code, s.function_name FROM sys_function_vl s
					union
				select null, l.function_code, l.function_name from sys_function_dynamic l) t1
                #WHERE_CLAUSE#
                order by t1.function_code
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="function_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FUNCTION_ID"/>
        <bm:field name="function_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FUNCTION_CODE"/>
        <bm:field name="function_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FUNCTION_NAME"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="function_code" queryOperator="like"/>
        <bm:query-field field="function_name" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="EXISTS (SELECT 1 FROM hls_doc_layout_button h WHERE h.function_code = t1.function_code)"/>
    </bm:data-filters>
</bm:model>
