<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="op" basetable="exp_org_position" defaultOrderBy="position_code">
    <bm:fields>
        <bm:field name="position_id"/>
        <bm:field name="position_code" displayWidth="117" forDisplay="true" forQuery="true" prompt="EXP_ORG_POSITION.POSITION_CODE"/>
        <bm:field name="position_name" displayWidth="117" forDisplay="true" forQuery="true" prompt="EXP_EMPLOYEE_ASSIGN.POSITION_NAME"/>
        <bm:field name="employee_job_id"/>
        <bm:field name="job_code" displayWidth="117" forDisplay="true" prompt="EXP_EMPLOYEE_ASSIGN.JOB_CODE"/>
        <bm:field name="job_name" displayWidth="117" forDisplay="true" prompt="EXP_EMPLOYEE_JOBS.EMPLOYEE_JOB_NAME"/>
        <bm:field name="level_series_id"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
          select * from 
        ( select v.position_id, 
                  v.position_code, 
                  v.description position_name, 
                  j.employee_job_id, 
                  j.employee_job_code job_code, 
                  j.description job_name, 
                  j.level_series_id 
         from exp_org_position_vl v, exp_employee_jobs_vl j 
         where v.company_id=${/parameter/@company_id}  
                and v.enabled_flag='Y' 
                and v.employee_job_id = j.employee_job_id(+))h
            #WHERE_CLAUSE# order by  h.position_code
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:query-fields>
        <bm:query-field field="position_code" queryOperator="like"/>
        <bm:query-field field="position_name" queryOperator="like"/>
    </bm:query-fields>
</bm:model>
