<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zjw  
    $Date: 2011-9-8 上午11:56:57  
    $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 t.*,
                   to_char(t.start_date, 'yyyy-mm-dd') start_date_c,
                   to_char(t.end_date, 'yyyy-mm-dd') end_date_c
            from gld_periods t 
            #WHERE_CLAUSE#
            order by t.internal_period_num
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="period_set_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_SET_CODE"/>
        <bm:field name="period_year" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PERIOD_YEAR"/>
        <bm:field name="period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="PERIOD_NUM"/>
        <bm:field name="period_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_NAME"/>
        <bm:field name="adjustment_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ADJUSTMENT_FLAG"/>
        <bm:field name="internal_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERNAL_PERIOD_NUM"/>
        <bm:field name="start_date" databaseType="DATE" datatype="java.util.Date" physicalName="START_DATE"/>
        <bm:field name="end_date" databaseType="DATE" datatype="java.util.Date" physicalName="END_DATE"/>
        <bm:field name="quarter_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="QUARTER_NUM"/>
        <bm:field name="creation_date" databaseType="DATE" datatype="java.util.Date" physicalName="CREATION_DATE"/>
        <bm:field name="created_by" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CREATED_BY"/>
        <bm:field name="last_update_date" databaseType="DATE" datatype="java.util.Date" physicalName="LAST_UPDATE_DATE"/>
        <bm:field name="last_updated_by" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LAST_UPDATED_BY"/>
        <bm:field name="start_date_c" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="START_DATE_C"/>
        <bm:field name="end_date_c" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="END_DATE_C"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field field="period_name" queryOperator="like"/>
        <bm:query-field name="period_set_code" queryExpression="t.period_set_code=${@period_set_code}"/>
    </bm:query-fields>
</bm:model>
