<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang 
    $Date: 2015-6-10 下午04:07: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
                    p.bookmark,
                    hls_doc_file_templet_pkg.get_doc_bookmark_value_new(nvl(${/session/@session_id},${/parameter/@session_id}),cc.content_id, p.bookmark, nvl(${/session/@user_id},${/parameter/@user_id}),'PROJECT') bookmark_value,
                    NVL(p.bookmark_type,'TEXT') bookmark_type,
                    NVL(NVL(l.font_family,p.font_family),'微软雅黑') font_family,
                    NVL(NVL(l.font_size,p.font_size),'15') font_size,
                    NVL(l.underline,p.underline) underline
                FROM
                    prj_project_content cc,
                    con_clause_templet t,
                    hls_doc_file_tmp_para_link l,
                    hls_doc_file_templet_para p
                WHERE
                    cc.content_id     = nvl(${/parameter/@content_id},${@content_id}) AND
                    cc.templet_id     = t.templet_id AND
                    t.doc_template_id = l.templet_id AND
                    t.doc_plugin_flag = 'Y' AND
                    l.templet_para_id = p.templet_para_id AND
                    l.ENABLED_FLAG    ='Y' AND
                    p.enabled_flag    = 'Y'
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="bookmark" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BOOKMARK"/>
        <bm:field name="bookmark_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BOOKMARK_TYPE"/>
        <bm:field name="bookmark_value" databaseType="CLOB" datatype="java.sql.Clob" physicalName="BOOKMARK_VALUE"/>
        <bm:field name="font_family"/>
        <bm:field name="font_size"/>
        <bm:field name="underline"/>
    </bm:fields>
</bm:model>
