<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-4-2 上午11:09:24  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:o="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_LEASE_ITEM_COMPANY">
    <bm:fields>
        <bm:field name="record_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RECORD_ID"/>
        <bm:field name="lease_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LEASE_ITEM_ID" prompt="HLS_LEASE_ITEM_COMPANY.LEASE_ITEM_ID"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="HLS_LEASE_ITEM_COMPANY.COMPANY_ID"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="HLS_LEASE_ITEM_COMPANY.ENABLED_FLAG"/>
        <bm:field name="division" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DIVISION" prompt="HLS_LEASE_ITEM_COMPANY.DIVISION"/>
        <bm:field name="abc_class" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ABC_CLASS" prompt="HLS_LEASE_ITEM_COMPANY.ABC_CLASS"/>
        <bm:field name="lease_item_group" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="LEASE_ITEM_GROUP" prompt="HLS_LEASE_ITEM_COMPANY.LEASE_ITEM_GROUP"/>
        <bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="HLS_LEASE_ITEM_COMPANY.REF_V01"/>
        <bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="HLS_LEASE_ITEM_COMPANY.REF_V02"/>
        <bm:field name="ref_v03" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V03" prompt="HLS_LEASE_ITEM_COMPANY.REF_V03"/>
        <bm:field name="ref_v04" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V04" prompt="HLS_LEASE_ITEM_COMPANY.REF_V04"/>
        <bm:field name="ref_v05" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V05" prompt="HLS_LEASE_ITEM_COMPANY.REF_V05"/>
        <bm:field name="ref_n01" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N01" prompt="HLS_LEASE_ITEM_COMPANY.REF_N01"/>
        <bm:field name="ref_n02" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N02" prompt="HLS_LEASE_ITEM_COMPANY.REF_N02"/>
        <bm:field name="ref_n03" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N03" prompt="HLS_LEASE_ITEM_COMPANY.REF_N03"/>
        <bm:field name="ref_n04" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N04" prompt="HLS_LEASE_ITEM_COMPANY.REF_N04"/>
        <bm:field name="ref_n05" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REF_N05" prompt="HLS_LEASE_ITEM_COMPANY.REF_N05"/>
        <bm:field name="ref_d01" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D01" prompt="HLS_LEASE_ITEM_COMPANY.REF_D01"/>
        <bm:field name="ref_d02" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D02" prompt="HLS_LEASE_ITEM_COMPANY.REF_D02"/>
        <bm:field name="ref_d03" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D03" prompt="HLS_LEASE_ITEM_COMPANY.REF_D03"/>
        <bm:field name="ref_d04" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D04" prompt="HLS_LEASE_ITEM_COMPANY.REF_D04"/>
        <bm:field name="ref_d05" databaseType="DATE" datatype="java.util.Date" physicalName="REF_D05" prompt="HLS_LEASE_ITEM_COMPANY.REF_D05"/>
        <bm:field name="company_code" expression="(select fc.company_code from fnd_companies_vl fc where fc.company_id = t1.company_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="company_name" expression="(select fc.company_short_name from fnd_companies_vl fc where fc.company_id = t1.company_id)" forInsert="false" forUpdate="false"/>
        <bm:field name="division_display" expression="(select d.description from hls_division d where d.division = t1.division)" forInsert="false" forUpdate="false"/>
        <bm:field name="abc_class_display" expression="(select a.description from hls_abc_class a where a.abc_class=t1.abc_class)" forInsert="false" forUpdate="false"/>
        <bm:field name="lease_item_group_display" expression="(select g.description from hls_lease_item_group g where g.lease_item_group=t1.lease_item_group)" forInsert="false" forUpdate="false"/>
        <bm:field name="company_enabled_flag" expression="(t1.enabled_flag)" forInsert="false" forUpdate="false"/>
        <bm:field name="authority_usage" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="AUTHORITY_USAGE" prompt="HLS_LEASE_ITEM_COMPANY.AUTHORITY_USAGE"/>
        <bm:field name="authorization_group_display" expression="(select g.description from fnd_authorization_group_v g where g.authorization_group=t1.authority_usage)" forInsert="false" forUpdate="false"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
        <o:sequence-pk/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="record_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="lease_item_id" queryOperator="="/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
    </bm:data-filters>
</bm:model>
