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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?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="CON_COLLECTION_CALLBACK_TEMP">
<bm:fields>
<bm:field name="callback_temp_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CALLBACK_TEMP_ID" prompt="CON_COLLECTION_CALLBACK_TEMP.CALLBACK_TEMP_ID"/>
<bm:field name="contract_lease_item_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_LEASE_ITEM_ID" prompt="CON_COLLECTION_CALLBACK_TEMP.CONTRACT_LEASE_ITEM_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="CON_COLLECTION_CALLBACK_TEMP.BATCH_ID"/>
<bm:field name="callback_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CALLBACK_ID" prompt="CON_COLLECTION_CALLBACK_TEMP.CALLBACK_ID"/>
</bm:fields>
<bm:features>
<f:standard-who/>
</bm:features>
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
DECLARE
v_callback_temp_id NUMBER;
BEGIN
SELECT
con_collection_callback_temp_s.nextval
INTO
v_callback_temp_id
FROM
dual;
INSERT
INTO
CON_COLLECTION_CALLBACK_TEMP
(
callback_temp_id,
contract_lease_item_id,
batch_id,
callback_id,
creation_date,
created_by,
last_update_date,
last_updated_by
)
VALUES
(
v_callback_temp_id,
${@contract_lease_item_id},
${@batch_id},
${@callback_id},
sysdate,
${/session/@user_id},
sysdate,
${/session/@user_id}
);
UPDATE
con_collection_callback
SET
batch_id = ${@batch_id}
WHERE
callback_id = ${@callback_id};
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>