fnd_atm_attachment_query.lwm 2.04 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Administrator  
    $Date: 2011-10-13 下午7:48:39  
    $Revision: 1.0  
    $Purpose: 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[SELECT fa.attachment_id,
       fa.source_type_code,
       fa.source_pk_value,
       fa.file_name,
       fa.file_size,
       fa.file_path,
       '1' AS status,
       fam.table_name,
       fam.table_pk_value
  FROM fnd_atm_attachment fa
  LEFT OUTER JOIN fnd_atm_attachment_multi fam
    ON fa.attachment_id = fam.attachment_id #WHERE_CLAUSE#]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:fields>
        <bm:field name="attachment_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ATTACHMENT_ID" required="true"/>
        <bm:field name="source_type_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_TYPE_CODE"/>
        <bm:field name="source_pk_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SOURCE_PK_VALUE"/>
        <bm:field name="file_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_NAME"/>
        <bm:field name="file_size" databaseType="NUMBER" datatype="java.lang.Long" physicalName="FILE_SIZE"/>
        <bm:field name="file_path" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="FILE_PATH"/>
        <bm:field name="status" databaseType="CHAR" datatype="java.lang.String" physicalName="STATUS"/>
        <bm:field name="table_name" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_NAME"/>
        <bm:field name="table_pk_value" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="TABLE_PK_VALUE"/>
    </bm:fields>
    <bm:query-fields>
        <bm:query-field name="table_name" queryExpression="table_name=${/parameter/@table_name}"/>
        <bm:query-field name="table_pk_value" queryExpression="table_pk_value=${/parameter/@table_pk_value}"/>
    </bm:query-fields>
</bm:model>