<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: niujiaqing1265 $
    $Date: 2010/12/09 05:48:38 $
    $Revision: 1.3 $
    $Purpose "exp_employee_levels" 对应的bm文件
-->
<ns1:model xmlns:e="leaf.service.exception" xmlns:ns2="leaf.database.local.oracle" xmlns:ns1="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="el" baseTable="exp_employee_levels">
    <ns1:fields>
        <ns1:field name="employee_levels_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <ns1:field name="employee_levels_code" databaseType="VARCHAR2" datatype="java.lang.String" prompt="EXP_EMPLOYEE_LEVELS.EMPLOYEE_LEVELS_CODE"/>
        <ns1:field name="description_id" databaseType="NUMBER" datatype="java.lang.Long" multiLanguage="true" multiLanguageDescField="employee_levels_description"/>
        <ns1:field name="employee_levels_description" databaseType="VARCHAR" datatype="java.lang.String" forInsert="false" forUpdate="false" prompt="EXP_EMPLOYEE_LEVELS.EMPLOYEE_LEVELS_DESCRIPTION"/>
        <ns1:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" prompt="SYS_CODE.ENABLED_FLAG"/>
        <ns1:field name="level_series_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <ns1:field name="level_series_code_display" databaseType="VARCHAR2" datatype="java.lang.String" expression="(select els.level_series_code || &apos;-&apos; || fd.description_text from fnd_descriptions fd,exp_level_series els where els.description_id = fd.description_id             and fd.language = ${/session/@lang} and els.level_series_id = el.level_series_id)" forInsert="false" forUpdate="false" prompt="EXP_LEVEL_SERIES.LEVEL_SERIES"/>
        <!--level_series_code_display 字段是为了页面上的下拉框使用的。非表中字段 -->
    </ns1:fields>
    <ns1:primary-key>
        <ns1:pk-field name="employee_levels_id"/>
    </ns1:primary-key>
    <ns1:query-fields>
        <ns1:query-field field="employee_levels_code" queryOperator="like"/>
        <ns1:query-field field="employee_levels_description" queryExpression="exists (select 1 from fnd_descriptions fd where el.description_id=fd.description_id and fd.description_text like ${@employee_levels_description} and fd.language = ${/session/@lang})"/>
    </ns1:query-fields>
    <ns1:features>
        <ns2:sequence-pk/>
        <f:standard-who/>
        <f:multi-language-storage/>
    </ns1:features>
    <ns1:ref-fields/>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="EXP_EMPLOYEE_LEVELS.EMPLOYEE_LEVELS_CODE_DISTINCT"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</ns1:model>
