<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zjw  
    $Date: 2011-9-8 上午10:57: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 gp.*, fc.company_short_name
			  from gld_period_sets_vl gp, gld_set_of_books gs, fnd_companies_vl fc
			 where fc.company_id = ${/session/@company_id}
			   and fc.set_of_books_id = gs.set_of_books_id
			   and gs.period_set_code = gp.period_set_code
			 ORDER BY gp.PERIOD_SET_CODE]]></bm:query-sql>
            <bm:parameters>
                <bm:parameter inputPath="/session/@company_id"/>
            </bm:parameters>
        </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_set_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_SET_NAME"/>
        <bm:field name="total_period_num" databaseType="NUMBER" datatype="java.lang.Long" physicalName="TOTAL_PERIOD_NUM"/>
        <bm:field name="period_additional_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="PERIOD_ADDITIONAL_FLAG"/>
        <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="company_short_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_SHORT_NAME"/>
    </bm:fields>
</bm:model>
