<?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.document_type_code,
		       t.description document_type_dec,		      
		       t.enabled_flag
		  from fnd_attach_document_types_vl t
		#WHERE_CLAUSE#  order by document_type_code
]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[ begin
			  fnd_attach_document_pkg.update_fnd_attach_doc_types(${@document_type_code},
														 ${@document_type_dec},		
														 ${@enabled_flag},												
														 ${/session/@user_id}												 
														 );
		 end;
		 ]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="document_type_code" dataType="java.lang.String" queryExpression="DOCUMENT_TYPE_CODE like  &apos;%&apos;||upper(${@document_type_code})||&apos;%&apos;"/>
        <bm:query-field name="document_type_dec" dataType="java.lang.String" queryExpression="description like  &apos;%&apos;||${@document_type_dec}||&apos;%&apos;"/>
    </bm:query-fields>
</bm:model>
