<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="BGFL_PRJ_BP_ORG_EXECUTIVES_LN">
    <bm:fields>
        <bm:field name="ln_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LN_ID" prompt="BGFL_PRJ_BP_ORG_EXECUTIVES_LN.LN_ID"/>
        <bm:field name="executive_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EXECUTIVE_ID" prompt="BGFL_PRJ_BP_ORG_EXECUTIVES_LN.EXECUTIVE_ID"/>
        <bm:field name="data_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DATA_TYPE" prompt="BGFL_PRJ_BP_ORG_EXECUTIVES_LN.DATA_TYPE"/>
        <bm:field name="start_date" databaseType="DATE" datatype="java.util.Date" physicalName="START_DATE" prompt="BGFL_PRJ_BP_ORG_EXECUTIVES_LN.START_DATE"/>
        <bm:field name="end_date" databaseType="DATE" datatype="java.util.Date" physicalName="END_DATE" prompt="BGFL_PRJ_BP_ORG_EXECUTIVES_LN.END_DATE"/>
        <bm:field name="description_summary" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_SUMMARY" prompt="BGFL_PRJ_BP_ORG_EXECUTIVES_LN.DESCRIPTION_SUMMARY"/>
        <bm:field name="description_detail" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION_DETAIL" prompt="BGFL_PRJ_BP_ORG_EXECUTIVES_LN.DESCRIPTION_DETAIL"/>
    </bm:fields>
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="ln_id"/>
    </bm:primary-key>
    <bm:operations>
        <bm:operation name="insert">
            <bm:update-sql><![CDATA[
            begin
            insert into bgfl_prj_bp_org_executives_ln
            (ln_id,executive_id,data_type,start_date,end_date,description_summary,description_detail)
            values
            (bgfl_prj_bp_executives_ln_s.nextval,
            ${@executive_id},${@data_type},
            to_date(${@start_date},'yyyy-mm-dd'),to_date(${@end_date},'yyyy-mm-dd'),
            ${@description_summary},${@description_detail});
            end;
    		]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
            begin
            update bgfl_prj_bp_org_executives_ln 
            set start_date=${@start_date},end_date=${@end_date},description_summary=${@description_summary},description_detail=${@description_detail}
            where ln_id=${@ln_id};
            end;
    		]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="t1.executive_id=${/parameter/@executive_id} and t1.data_type=${/parameter/@data_type}"/>
    </bm:data-filters>
</bm:model>
