<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: lixi  
    $Date: 2011-7-12 下午05:16:26  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" defaultOrderBy="t.expense_item_code,t.enabled_flag">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    t.expense_item_id,
                    t.set_of_books_id,
                    t.expense_item_code,
                    t.expense_item_desc,
                    t.currency_code,
                    t.standard_price,
                    t.enabled_flag,
                    t.req_item_id,                    
                    t.budget_item_id                                                        
                FROM
                    exp_expense_items t                  
                    #WHERE_CLAUSE# #ORDER_BY_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="expense_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EXPENSE_ITEM_ID"/>
        <bm:field name="set_of_books_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SET_OF_BOOKS_ID"/>
        <bm:field name="expense_item_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPENSE_ITEM_CODE"/>
        <bm:field name="expense_item_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EXPENSE_ITEM_DESC"/>
        <bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_CODE"/>
        <bm:field name="standard_price" databaseType="NUMBER" datatype="java.lang.Long" physicalName="STANDARD_PRICE"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
        <bm:field name="req_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REQ_ITEM_ID"/>
        <bm:field name="budget_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BUDGET_ITEM_ID"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="expense_item_code" dataType="java.lang.String" queryExpression=" t.EXPENSE_ITEM_CODE  like &apos;%&apos;||${@expense_item_code}||&apos;%&apos;"/>
        <bm:query-field name="expense_item_desc" dataType="java.lang.String" queryExpression="t.DESCRIPTION like &apos;%&apos;||${@expense_item_desc}||&apos;%&apos;"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="set_of_books_id" enforceOperations="query" expression="t.set_of_books_id = ${@query_set_of_books_id}"/>
    </bm:data-filters>
</bm:model>
