DBA Data[Home] [Help]

PACKAGE: APPS.AMS_USER_STATUSES_PVT

Source


1 PACKAGE AMS_User_Statuses_PVT AUTHID CURRENT_USER AS
2 /* $Header: amsvusts.pls 115.15 2004/03/05 07:06:11 vmodur ship $ */
3 
4 -----------------------------------------------------------
5 -- PACKAGE
6 --    AMS_User_Statuses_PVT
7 --
8 -- PURPOSE
9 --    This package is a Private API for managing User Status information in
10 --    AMS.  It contains specification for pl/sql records and tables
11 --
12 --    AMS_USER_STATUSES_VL:
13 --    Create_User_Status (see below for specification)
14 --    Update_User_Status (see below for specification)
15 --    Delete_User_Status (see below for specification)
16 --    Lock_User_Status (see below for specification)
17 --    Validate_User_Status (see below for specification)
18 --
19 --    Check_User_Status_Items (see below for specification)
20 --    Check_User_Status_Record (see below for specification)
21 --    Init_User_Status_Rec
22 --    Complete_User_Status_Rec
23 --
24 -- NOTES
25 --
26 --
27 -- HISTORY
28 -- 10-Nov-1999    rvaka      Created.
29 -----------------------------------------------------------
30 
31 -------------------------------------
32 -----          USER STATUSES            -----
33 -------------------------------------
34 -- Record for AMS_USER_STATUSES_VL
35 TYPE User_Status_Rec_Type IS RECORD (
36    user_status_id          NUMBER,
37    last_update_date        DATE,
38    last_updated_by         NUMBER,
39    creation_date           DATE,
40    created_by              NUMBER,
41    last_update_login       NUMBER,
42    object_version_number   NUMBER,
43    system_status_type      VARCHAR2(240),
44    system_status_code      VARCHAR2(30),
45    default_flag            VARCHAR2(1),
46    enabled_flag            VARCHAR2(1),
47    seeded_flag             VARCHAR2(1),
48    start_date_active       DATE,
49    end_date_active         DATE,
50    name                    VARCHAR2(120),
51    description             VARCHAR2(4000)
52 );
53 
54 --------------------------------------------------------------------
55 -- PROCEDURE
56 --    Create_User_Status
57 --
58 -- PURPOSE
59 --    Create User Status entry.
60 --
61 -- PARAMETERS
62 --    p_user_status_rec: the record representing AMS_USER_STATUSES_VL view..
63 --    x_user_status_id: the user_status_id.
64 --
65 -- NOTES
66 --    1. object_version_number will be set to 1.
67 --    2. If user_status_id is passed in, the uniqueness will be checked.
68 --       Raise exception in case of duplicates.
69 --    4. If a flag column is passed in, check if it is 'Y' or 'N'.
70 --       Raise exception for invalid flag.
71 --    5. If a flag column is not passed in, default it to 'Y' or 'N'.
72 --    6. Please don't pass in any FND_API.g_mess_char/num/date.
73 --------------------------------------------------------------------
74 PROCEDURE Create_User_Status (
75    p_api_version       IN  NUMBER,
76    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
77    p_commit            IN  VARCHAR2  := FND_API.g_false,
78    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
79 
80    x_return_status     OUT NOCOPY VARCHAR2,
81    x_msg_count         OUT NOCOPY NUMBER,
82    x_msg_data          OUT NOCOPY VARCHAR2,
83 
84    p_user_status_rec   IN  User_Status_Rec_Type,
85    x_user_status_id    OUT NOCOPY NUMBER
86 );
87 
88 --------------------------------------------------------------------
89 -- PROCEDURE
90 --    Update_User_Status
91 --
92 -- PURPOSE
93 --    Update an User Status entry.
94 --
95 -- PARAMETERS
96 --    p_user_status_rec: the record representing AMS_USER_STATUSES_VL (without the ROW_ID column).
97 --
98 -- NOTES
99 --    1. Raise exception if the object_version_number doesn't match.
100 --    2. If an attribute is passed in as FND_API.g_miss_char/num/date,
101 --       that column won't be updated.
102 --------------------------------------------------------------------
103 PROCEDURE Update_User_Status (
104    p_api_version       IN  NUMBER,
105    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
106    p_commit            IN  VARCHAR2  := FND_API.g_false,
107    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
108 
109    x_return_status     OUT NOCOPY VARCHAR2,
110    x_msg_count         OUT NOCOPY NUMBER,
111    x_msg_data          OUT NOCOPY VARCHAR2,
112 
113    p_user_status_rec   IN  User_Status_Rec_Type
114 );
115 
116 --------------------------------------------------------------------
117 -- PROCEDURE
118 --    Delete_User_Status
119 --
120 -- PURPOSE
121 --    Delete a user_status entry.
122 --
123 -- PARAMETERS
124 --    p_user_status_id: the user_status_id
125 --    p_object_version: the object_version_number
126 --
127 -- ISSUES
128 --
129 -- NOTES
130 --    1. Raise exception if the object_version_number doesn't match.
131 --------------------------------------------------------------------
132 PROCEDURE Delete_User_Status (
133    p_api_version       IN  NUMBER,
134    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
135    p_commit            IN  VARCHAR2  := FND_API.g_false,
136    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
137 
138    x_return_status     OUT NOCOPY VARCHAR2,
139    x_msg_count         OUT NOCOPY NUMBER,
140    x_msg_data          OUT NOCOPY VARCHAR2,
141 
142    p_user_status_id          IN  NUMBER,
143    p_object_version    IN  NUMBER
144 );
145 
146 --------------------------------------------------------------------
147 -- PROCEDURE
148 --    Lock_User_Status
149 --
150 -- PURPOSE
151 --    Lock a user_status entry.
152 --
153 -- PARAMETERS
154 --    p_user_status_id: the user_status
155 --    p_object_version: the object_version_number
156 --
157 -- ISSUES
158 --
159 -- NOTES
160 --    1. Raise exception if the object_version_number doesn't match.
161 --------------------------------------------------------------------
162 PROCEDURE Lock_User_Status (
163    p_api_version       IN  NUMBER,
164    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
165    p_commit            IN  VARCHAR2  := FND_API.g_false,
166    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
167 
168    x_return_status     OUT NOCOPY VARCHAR2,
169    x_msg_count         OUT NOCOPY NUMBER,
170    x_msg_data          OUT NOCOPY VARCHAR2,
171 
172    p_user_status_id          IN  NUMBER,
173    p_object_version    IN  NUMBER
174 );
175 
176 --------------------------------------------------------------------
177 -- PROCEDURE
178 --    Validate_User_Status
179 --
180 -- PURPOSE
181 --    Validate a user_status entry.
182 --
183 -- PARAMETERS
184 --    p_user_status_rec: the record representing AMS_USER_STATUSES_VL (without ROW_ID).
185 --
186 -- NOTES
187 --    1. p_user_status_rec should be the complete user_status record. There
188 --       should not be any FND_API.g_miss_char/num/date in it.
189 --    2. If FND_API.g_miss_char/num/date is in the record, then raise
190 --       an exception, as those values are not handled.
191 --------------------------------------------------------------------
192 PROCEDURE Validate_User_Status (
193    p_api_version       IN  NUMBER,
194    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
195    p_commit            IN  VARCHAR2  := FND_API.g_false,
196    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
197 
198    x_return_status     OUT NOCOPY VARCHAR2,
199    x_msg_count         OUT NOCOPY NUMBER,
200    x_msg_data          OUT NOCOPY VARCHAR2,
201 
202    p_user_status_rec         IN  User_Status_Rec_Type
203 );
204 
205 ---------------------------------------------------------------------
206 -- PROCEDURE
207 --    Check_User_Status_Items
208 --
209 -- PURPOSE
210 --    Perform the item level checking including unique keys,
211 --    required columns, foreign keys, domain constraints.
212 --
213 -- PARAMETERS
214 --    p_user_status_rec: the record to be validated
215 --    p_validation_mode: JTF_PLSQL_API.g_create/g_update
216 ---------------------------------------------------------------------
217 PROCEDURE Check_User_Status_Items (
218    p_user_status_rec       IN  User_Status_Rec_Type,
219    p_validation_mode IN  VARCHAR2 := JTF_PLSQL_API.g_create,
220    x_return_status   OUT NOCOPY VARCHAR2
221 );
222 
223 ---------------------------------------------------------------------
224 -- PROCEDURE
225 --    Check_User_Status_Record
226 --
227 -- PURPOSE
228 --    Check the record level business rules.
229 --
230 -- PARAMETERS
231 --    p_user_status_rec: the record to be validated; may contain attributes
232 --       as FND_API.g_miss_char/num/date
233 --    p_complete_rec: the complete record after all "g_miss" items
234 --       have been replaced by current database values
235 ---------------------------------------------------------------------
236 PROCEDURE Check_User_Status_Record (
237    p_user_status_rec        IN  User_Status_Rec_Type,
238    p_complete_rec     IN  User_Status_Rec_Type := NULL,
239    x_return_status    OUT NOCOPY VARCHAR2
240 );
241 
242 ---------------------------------------------------------------------
243 -- PROCEDURE
244 --    Init_User_Status_Rec
245 --
246 -- PURPOSE
247 --    Initialize all attributes to be FND_API.g_miss_char/num/date.
248 ---------------------------------------------------------------------
249 PROCEDURE Init_User_Status_Rec (
250    x_user_status_rec         OUT NOCOPY  User_Status_Rec_Type
251 );
252 
253 ---------------------------------------------------------------------
254 -- PROCEDURE
255 --    Complete_User_Status_Rec
256 --
257 -- PURPOSE
258 --    For Update_User_Status, some attributes may be passed in as
259 --    FND_API.g_miss_char/num/date if the user doesn't want to
260 --    update those attributes. This procedure will replace the
261 --    "g_miss" attributes with current database values.
262 --
263 -- PARAMETERS
264 --    p_user_status_rec: the record which may contain attributes as
265 --       FND_API.g_miss_char/num/date
266 --    x_complete_rec: the complete record after all "g_miss" items
267 --       have been replaced by current database values
268 ---------------------------------------------------------------------
269 PROCEDURE Complete_User_Status_Rec (
270    p_user_status_rec      IN  User_Status_Rec_Type,
271    x_complete_rec   OUT NOCOPY User_Status_Rec_Type
272 );
273 
274 
275 END AMS_User_Statuses_PVT;