<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[select t.emp_sob_asgn_id,
       t.exp_emp_type_id,
       t.company_id,
       t.set_of_books_id,
       gso.set_of_books_code,
       gso.set_of_books_name,
       fcv.company_code,
       t.enabled_flag,
       eetv.employee_type_code,
       fcv.COMPANY_SHORT_NAME,
       eetv.description emp_type_name
  from EXP_SOB_EMP_ASGN_CM   t,
       fnd_companies_vl      fcv,
       exp_employee_types_vl eetv,
       gld_set_of_books_vl gso
 		#WHERE_CLAUSE# 
 		
]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="emp_sob_asgn_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMP_SOB_ASGN_ID" required="true"/>
        <bm:field name="exp_emp_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EXP_EMP_TYPE_ID"/>
        <bm:field name="set_of_books_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="set_of_books_id"/>
        <bm:field name="set_of_books_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="set_of_books_code"/>
        <bm:field name="set_of_books_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="set_of_books_name"/>
        <bm:field name="company_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="COMPANY_ID"/>
        <bm:field name="company_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_CODE"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG"/>
        <bm:field name="employee_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMPLOYEE_TYPE_CODE" required="true"/>
        <bm:field name="company_short_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="COMPANY_SHORT_NAME"/>
        <bm:field name="emp_type_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="EMP_TYPE_NAME"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="type_id" queryExpression=" t.exp_emp_type_id = ${@type_id}"/>
    </bm:query-fields>
    <bm:data-filters>
        <bm:data-filter expression="t.exp_emp_type_id = eetv.employee_type_id and fcv.COMPANY_ID = t.company_id and gso.set_of_books_id = t.set_of_books_id"/>
    </bm:data-filters>
</bm:model>
