1 package body WF_NTF_RULECRITERIA_PKG as
2 /* $Header: WFNTFRCB.pls 120.1 2005/07/02 03:16:11 appldev noship $ */
3
4 procedure insert_row(x_rule_name in varchar2,
5 x_msg_type in varchar2)
6 is
7 begin
8 insert into wf_ntf_rule_criteria (
9 rule_name,
10 message_type,
11 creation_date
12 ) values (
13 x_rule_name,
14 x_msg_type,
15 sysdate);
16 exception
17 when others then
18 wf_core.context('Wf_ntf_rulecriteria_pkg', 'Insert_Row', x_rule_name, x_msg_type);
19 raise;
20 end insert_row;
21
22 procedure delete_row(x_rule_name in varchar2,
23 x_msg_type in varchar2)
24 is
25 begin
26 delete from wf_ntf_rule_criteria
27 where rule_name = x_rule_name
28 and message_type = x_msg_type;
29
30 if (sql%notfound) then
31 raise no_data_found;
32 end if;
33 exception
34 when others then
35 wf_core.context('Wf_ntf_rulecriteria_pkg', 'Delete_Row', x_rule_name, x_msg_type);
36 raise;
37 end delete_row;
38
39 procedure update_row(x_rule_name in varchar2,
40 x_msg_type in varchar2)
41 is
42 begin
43 update wf_ntf_rule_criteria
44 set message_type = x_msg_type
45 where rule_name = x_rule_name;
46
47 if SQL%NOTFOUND then
48 raise no_data_found;
49 end if;
50 exception
51 when others then
52 wf_core.context('Wf_ntf_rulecriteria_pkg', 'Update_Row', x_rule_name, x_msg_type);
53 raise;
54 end update_row;
55
56 procedure load_row(x_rule_name in varchar2,
57 x_msg_type in varchar2)
58 is
59 begin
60 if wf_ntf_rules_pkg.g_mode = 'FORCE' then
61 wf_ntf_rulecriteria_pkg.update_row(x_rule_name,
62 x_msg_type);
63 end if;
64 exception
65 when others then
66 wf_ntf_rulecriteria_pkg.insert_row(x_rule_name,
67 x_msg_type);
68 end load_row;
69
70 end WF_NTF_RULECRITERIA_PKG;
71