<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-11-27 下午4:56:01  
    $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
                    content_number,
                    content_type
                FROM
                    (SELECT
                        con_contract_content_pkg.get_common_content_number(${@contract_id},'ORG','GUT') content_number,
                        'ORG_GUT' content_type
                    FROM
                        dual
                    UNION ALL
                    SELECT
                        con_contract_content_pkg.get_common_content_number(${@contract_id}, 'NP', 'GUT') content_number,
                        'NP_GUT' content_type
                    FROM
                        dual
                    UNION ALL
                    SELECT
                        con_contract_content_pkg.get_common_content_number(${@contract_id},'ORG','MOR') content_number,
                        'ORG_MOR' content_type
                    FROM
                        dual
                    UNION ALL
                    SELECT
                        con_contract_content_pkg.get_common_content_number(${@contract_id}, 'NP', 'MOR') content_number,
                        'NP_MOR' content_type
                    FROM
                        dual
                    
                    UNION ALL
                    SELECT
                        con_contract_content_pkg.get_common_content_number(${@contract_id},'ORG','PLE') content_number,
                        'ORG_PLE' content_type
                    FROM
                        dual
                    UNION ALL
                    SELECT
                        con_contract_content_pkg.get_common_content_number(${@contract_id}, 'NP', 'PLE') content_number,
                        'NP_PLE' content_type
                    FROM
                        dual    
                    ) v WHERE v.content_number IS NOT NULL
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
