<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang
    $Date: 2013-6-18 下午3:47:27  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    		select t1.tab_type,
       			   t1.tab_code,
		           t1.tab_group,
		           t1.tab_seq
		  from hls_doc_layout_tab_group_v t1
		 where t1.layout_code = ${@layout_code}
		   and t1.tree_code = ${@tree_code}
		   and ((t1.parent_tab_code is null and ${@tab_tab_code} is null) or
		       (${@tab_tab_code} is not null and t1.parent_tab_code = ${@tab_tab_code}))
		   and t1.enabled_flag = 'Y'
		 group by t1.tab_type,
		          t1.tab_code,
		          t1.tab_group,
		          t1.tab_seq
		 order by t1.tab_seq, t1.tab_type
    	 ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
