<?xml version="1.0" encoding="UTF-8"?>
<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="ej" baseTable="exp_employee_jobs">
    <ns1:fields>
        <ns1:field name="employee_job_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <ns1:field name="employee_job_code" databaseType="VARCHAR2" datatype="java.lang.String" prompt="EXP_EMPLOYEE_JOBS.EMPLOYEE_JOB_CODE"/>
        <ns1:field name="description_id" databaseType="NUMBER" datatype="java.lang.Long" multiLanguage="true" multiLanguageDescField="employee_job_description"/>
        <ns1:field name="employee_job_description" databaseType="VARCHAR2" datatype="java.lang.String" forInsert="false" forUpdate="false" prompt="EXP_EMPLOYEE_JOBS.EMPLOYEE_JOB_DESCRIPTION"/>
        <ns1:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" prompt="FND_OPERATION_UNITS.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 = ej.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_job_id"/>
    </ns1:primary-key>
    <ns1:query-fields>
        <ns1:query-field field="employee_job_code" queryOperator="like"/>
        <ns1:query-field field="employee_job_description" queryExpression="exists (select 1 from fnd_descriptions fd where ej.description_id=fd.description_id and fd.description_text like ${@employee_job_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_JOBS.EMPLOYEE_JOB_CODE_DISTINCT"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</ns1:model>
