[Home] [Help]
PACKAGE BODY: APPS.WPS_PREFERENCES_PKG
Source
1 PACKAGE BODY WPS_PREFERENCES_PKG AS
2 /* $Header: WPSPREFB.pls 120.1 2005/07/26 15:16:35 sjchen noship $ */
3
4
5 /**
6 * This will remove all the saved preferences for the given application/user
7 * combination.
8 */
9 PROCEDURE delete_user_preferences(x_application_id NUMBER, x_organization_id NUMBER,
10 x_user_id NUMBER) IS
11
12 PRAGMA AUTONOMOUS_TRANSACTION;
13 BEGIN
14
15 delete from wps_preferences
16 where application_id = x_application_id
17 and user_id = x_user_id
18 and organization_id = x_organization_id;
19
20 COMMIT;
21
22 END delete_user_preferences;
23
24
25 /**
26 * This will insert a record into the preference table.
27 */
28 PROCEDURE insert_preference(x_application_id NUMBER,
29 x_organization_id NUMBER,
30 x_user_id NUMBER,
31 x_preference_type NUMBER,
32 x_value VARCHAR2,
33 x_value_index NUMBER) IS
34 PRAGMA AUTONOMOUS_TRANSACTION;
35 BEGIN
36
37 insert into wps_preferences (preference_id,
38 application_id,
39 organization_id,
40 user_id,
41 preference_type,
42 value,
43 value_index,
44 last_update_date,
45 last_updated_by,
46 creation_date,
47 created_by)
48 values (wps_preferences_seq.nextval,
49 x_application_id,
50 x_organization_id,
51 x_user_id,
52 x_preference_type,
53 x_value,
54 x_value_index,
55 sysdate,
56 x_user_id,
57 sysdate,
58 x_user_id);
59
60 COMMIT;
61
62
63 END insert_preference;
64
65
66 END WPS_PREFERENCES_PKG;