<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:e="leaf.service.exception" xmlns:ns2="leaf.database.local.oracle" xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:f="leaf.database.features" alias="ut" baseTable="exp_org_unit_types" defaultOrderBy="unit_type_id">
    <bm:fields>
        <bm:field name="unit_type_id" databaseType="NUMBER" datatype="java.lang.Long"/>
        <bm:field name="unit_type_code" databaseType="VARCHAR2" datatype="java.lang.String" prompt="EXP_ORG_UNIT_TYPES.UNIT_TYPE_CODE"/>
        <bm:field name="description_id" databaseType="BIGINT" datatype="java.lang.Long" multiLanguage="true" multiLanguageDescField="description"/>
        <bm:field name="description" databaseType="VARCHAR" datatype="java.lang.String" prompt="EXP_ORG_UNIT_TYPES.DESCRIPTION"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" prompt="EXP_ORG_UNIT_TYPES.ENABLED_FLAG"/>
        <bm:field name="set_of_books_id"/>
    </bm:fields>
    <bm:primary-key>
        <bm:pk-field name="unit_type_id"/>
    </bm:primary-key>
    <bm:query-fields>
        <bm:query-field field="set_of_books_id" queryOperator="="/>
        <bm:query-field field="unit_type_id" queryOperator="="/>
        <bm:query-field field="unit_type_code" queryOperator="like"/>
        <bm:query-field field="description" queryExpression="exists (select 1 from fnd_descriptions fd where ut.description_id=fd.description_id and fd.description_text like ${@description} and fd.language = ${/session/@lang})"/>
    </bm:query-fields>
    <bm:features>
        <ns2:sequence-pk/>
        <f:standard-who/>
        <f:multi-language-storage/>
    </bm:features>
    <bm:ref-fields/>
    <e:exception-descriptor-config>
        <e:exception-descriptor exception="java.sql.SQLException" handleClass="leaf.database.SQLExceptionDescriptor">
            <e:error-message code="1" message="EXP_ORG_UNIT_TYPES.DISTINCT"/>
        </e:exception-descriptor>
    </e:exception-descriptor-config>
</bm:model>
