<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Lichen  
    $Date: 2012-2-20 下午02:29:55  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="t1" baseTable="FND_RESPONSIBILITY_CENTERS_VL">
    <bm:fields>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID" prompt="FND_RESPONSIBILITY_CENTERS_VL.COMPANY_ID"/>
        <bm:field name="responsibility_center_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="RESPONSIBILITY_CENTER_ID" prompt="FND_RESPONSIBILITY_CENTERS_VL.RESPONSIBILITY_CENTER_ID"/>
        <bm:field name="responsibility_center_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="200" forDisplay="true" forQuery="true" physicalName="RESPONSIBILITY_CENTER_CODE" prompt="HLS.RESPONSIBILITY_CENTER_CODE"/>
        <bm:field name="responsibility_center_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="250" forDisplay="true" forQuery="true" physicalName="RESPONSIBILITY_CENTER_NAME" prompt="HLS.RESPONSIBILITY_CENTER_NAME"/>
        <bm:field name="address_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ADDRESS_ID" prompt="FND_RESPONSIBILITY_CENTERS_VL.ADDRESS_ID"/>
        <bm:field name="resp_center_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RESP_CENTER_TYPE_CODE" prompt="FND_RESPONSIBILITY_CENTERS_VL.RESP_CENTER_TYPE_CODE"/>
        <bm:field name="summary_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SUMMARY_FLAG" prompt="FND_RESPONSIBILITY_CENTERS_VL.SUMMARY_FLAG"/>
        <bm:field name="start_date_active" databaseType="DATE" datatype="java.util.Date" physicalName="START_DATE_ACTIVE" prompt="FND_RESPONSIBILITY_CENTERS_VL.START_DATE_ACTIVE"/>
        <bm:field name="end_date_active" databaseType="DATE" datatype="java.util.Date" physicalName="END_DATE_ACTIVE" prompt="FND_RESPONSIBILITY_CENTERS_VL.END_DATE_ACTIVE"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="responsibility_center_code" queryOperator="like"/>
        <bm:query-field field="responsibility_center_name" queryOperator="like"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="company_id = ${/session/@company_id}"/>
        <bm:data-filter enforceOperations="query" expression="t1.responsibility_center_id not in (select t.responsibility_center_id from exp_org_unit_resp_dist t where t.unit_id = ${/parameter/@unit_id})"/>
    </bm:data-filters>
</bm:model>
