<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-7-3 下午07:21:28  
    $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
                        t.tree_code,
                        t.tree_desc,
                        t.tree_seq,
                        t.layout_code,
                        t.parent_tree_code,
                        t.expand_flag,
                        t.enabled_flag
                    FROM
                        hls_doc_layout_tree t
                    WHERE
                        t.enabled_flag = 'Y' AND
                        t.layout_code  = ${@layout_code}
                    ) START
                WITH parent_tree_code IS NULL CONNECT BY prior tree_code = parent_tree_code
                ORDER BY
                    tree_seq
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="tree_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TREE_CODE" required="true"/>
        <bm:field name="tree_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TREE_DESC" required="true"/>
        <bm:field name="tree_seq" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TREE_SEQ"/>
        <bm:field name="layout_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAYOUT_CODE" required="true"/>
        <bm:field name="parent_tree_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PARENT_TREE_CODE"/>
        <bm:field name="expand_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPAND_FLAG"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
    </bm:fields>
</bm:model>
