1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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>