<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Clocc  
    $Date: 2015-7-30 下午4:25:07  
    $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
                        control_id,
                        status,
                        check_date,
                        last_submit_date,
                        rpt_id,
                        rpt_name,
                        check_company_id,
                        last_submitted_by
                    FROM
                        rpt_report_control_lv
                    ) tt #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="control_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTROL_ID" required="true"/>
        <bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS"/>
        <bm:field name="check_date" databaseType="DATE" datatype="java.util.Date" physicalName="CHECK_DATE"/>
        <bm:field name="last_submit_date" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAST_SUBMIT_DATE"/>
        <bm:field name="rpt_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RPT_ID" required="true"/>
        <bm:field name="rpt_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RPT_NAME" required="true"/>
        <bm:field name="check_company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CHECK_COMPANY_ID"/>
        <bm:field name="last_submitted_by" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LAST_SUBMITTED_BY"/>
    </bm:fields>
    <bm:data-filters>
        <bm:data-filter name="init_filter" enforceOperations="query" expression="tt.control_id = ${@control_id}"/>
    </bm:data-filters>
</bm:model>
