DBA Data[Home] [Help]

PACKAGE: APPS.OZF_THRESHOLD_RULE_PVT

Source


1 PACKAGE OZF_Threshold_Rule_PVT AUTHID CURRENT_USER AS
2 /* $Header: ozfvtrus.pls 115.2 2003/11/28 12:27:38 pkarthik noship $ */
3 -- ===============================================================
4 
5 -- Start of Comments
6 -- Package name
7 --          OZF_Threshold_Rule_PVT
8 -- Purpose
9 --
10 -- History
11 --
12 -- NOTE
13 --
14 -- End of Comments
15 -- ===============================================================
16 
17 -- Default number of records fetch per call
18 G_DEFAULT_NUM_REC_FETCH  NUMBER := 30;
19 --===================================================================
20 --    Start of Comments
21 --   -------------------------------------------------------
22 --    Record name
23 --             threshold_rule_rec_type
24 --   -------------------------------------------------------
25 --   Parameters:
26 --       threshold_rule_id
27 --       last_update_date
28 --       last_updated_by
29 --       last_update_login
30 --       creation_date
31 --       created_by
32 --       created_from
33 --       request_id
34 --       program_application_id
35 --       program_id
36 --       program_update_date
37 --       period_type
38 --       enabled_flag
39 --       threshold_calendar
40 --       start_period_name
41 --       end_period_name
42 --       threshold_id
43 --       start_date
44 --       end_date
45 --       value_limit
46 --       operator_code
47 --       percent_amount
48 --       base_line
49 --       error_mode
50 --       repeat_frequency
51 --       frequency_period
52 --       attribute_category
53 --       attribute1
54 --       attribute2
55 --       attribute3
56 --       attribute4
57 --       attribute5
58 --       attribute6
59 --       attribute7
60 --       attribute8
61 --       attribute9
62 --       attribute10
63 --       attribute11
64 --       attribute12
65 --       attribute13
66 --       attribute14
67 --       attribute15
68 --       org_id
69 --       security_group_id
70 --       converted_days
71 --       object_version_number
72 --
73 --    Required
74 --
75 --    Defaults
76 --
77 --    Note: This is automatic generated record definition, it includes all columns
78 --          defined in the table, developer must manually add or delete some of the attributes.
79 --
80 --   End of Comments
81 
82 --===================================================================
83 TYPE threshold_rule_rec_type IS RECORD
84 (
85        threshold_rule_id               NUMBER ,
86        last_update_date                DATE ,
87        last_updated_by                 NUMBER ,
88        last_update_login               NUMBER ,
89        creation_date                   DATE ,
90        created_by                      NUMBER ,
91        created_from                    VARCHAR2(30) ,
92        request_id                      NUMBER ,
93        program_application_id          NUMBER ,
94        program_id                      NUMBER ,
95        program_update_date             DATE ,
96        period_type                     VARCHAR2(15) ,
97        enabled_flag                    VARCHAR2(1) ,
98        threshold_calendar              VARCHAR2(30) ,
99        start_period_name                    VARCHAR2(15) ,
100        end_period_name                      VARCHAR2(15) ,
101        threshold_id                    NUMBER ,
102        start_date                      DATE ,
103        end_date                        DATE ,
104        value_limit                     VARCHAR2(25) ,
105        operator_code                   VARCHAR2(1) ,
106        percent_amount                  NUMBER ,
107        base_line                       VARCHAR2(25) ,
108        error_mode                      VARCHAR2(15) ,
109        repeat_frequency                NUMBER ,
110        frequency_period                VARCHAR2(15) ,
111        attribute_category              VARCHAR2(30) ,
112        attribute1                      VARCHAR2(150),
113        attribute2                      VARCHAR2(150) ,
114        attribute3                      VARCHAR2(150) ,
115        attribute4                      VARCHAR2(150) ,
116        attribute5                      VARCHAR2(150) ,
117        attribute6                      VARCHAR2(150) ,
118        attribute7                      VARCHAR2(150) ,
119        attribute8                      VARCHAR2(150) ,
120        attribute9                      VARCHAR2(150) ,
121        attribute10                     VARCHAR2(150) ,
122        attribute11                     VARCHAR2(150) ,
123        attribute12                     VARCHAR2(150) ,
124        attribute13                     VARCHAR2(150) ,
125        attribute14                     VARCHAR2(150) ,
126        attribute15                     VARCHAR2(150) ,
127        org_id                          NUMBER ,
128        security_group_id               NUMBER ,
129        converted_days                  NUMBER ,
130        object_version_number           NUMBER ,
131        comparison_type                 VARCHAR2(50) ,
132        alert_type                      VARCHAR2(50)
133 );
134 
135 g_miss_threshold_rule_rec          threshold_rule_rec_type;
136 TYPE  threshold_rule_tbl_type      IS TABLE OF threshold_rule_rec_type INDEX BY BINARY_INTEGER;
137 g_miss_threshold_rule_tbl          threshold_rule_tbl_type;
138 
139 --   ==============================================================================
140 --    Start of Comments
141 --   ==============================================================================
142 --   API Name
143 --           Create_Threshold_Rule
144 --   Type
145 --           Private
146 --   Pre-Req
147 --
148 --   Parameters
149 --
150 --   IN
151 --       p_api_version_number      IN   NUMBER     Required
152 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
153 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
154 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
155 --       p_threshold_rule_rec            IN   threshold_rule_rec_type  Required
156 --
157 --   OUT
158 --       x_return_status           OUT  VARCHAR2
159 --       x_msg_count               OUT  NUMBER
160 --       x_msg_data                OUT  VARCHAR2
161 --   Version : Current version 1.0
162 --   Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
163 --         and basic operation, developer must manually add parameters and business logic as necessary.
164 --
165 --   End of Comments
166 --   ==============================================================================
167 --
168 
169 PROCEDURE Create_Threshold_Rule(
170     p_api_version_number         IN   NUMBER,
171     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
172     p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
173     p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
174 
175     x_return_status              OUT NOCOPY  VARCHAR2,
176     x_msg_count                  OUT NOCOPY  NUMBER,
177     x_msg_data                   OUT NOCOPY  VARCHAR2,
178 
179     p_threshold_rule_rec               IN   threshold_rule_rec_type  := g_miss_threshold_rule_rec,
180     x_threshold_rule_id                   OUT NOCOPY  NUMBER
181      );
182 
183 --   ==============================================================================
184 --    Start of Comments
185 --   ==============================================================================
186 --   API Name
187 --           Update_Threshold_Rule
188 --   Type
189 --           Private
190 --   Pre-Req
191 --
192 --   Parameters
193 --
194 --   IN
195 --       p_api_version_number      IN   NUMBER     Required
196 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
197 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
198 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
199 --       p_threshold_rule_rec            IN   threshold_rule_rec_type  Required
200 --
201 --   OUT
202 --       x_return_status           OUT  VARCHAR2
203 --       x_msg_count               OUT  NUMBER
204 --       x_msg_data                OUT  VARCHAR2
205 --   Version : Current version 1.0
206 --   Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
207 --         and basic operation, developer must manually add parameters and business logic as necessary.
208 --
209 --   End of Comments
210 --   ==============================================================================
211 --
212 
213 PROCEDURE Update_Threshold_Rule(
214     p_api_version_number         IN   NUMBER,
215     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
216     p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
217     p_validation_level           IN  NUMBER       := FND_API.G_VALID_LEVEL_FULL,
218 
219     x_return_status              OUT NOCOPY  VARCHAR2,
220     x_msg_count                  OUT NOCOPY  NUMBER,
221     x_msg_data                   OUT NOCOPY  VARCHAR2,
222 
223     p_threshold_rule_rec               IN    threshold_rule_rec_type,
224     x_object_version_number      OUT NOCOPY  NUMBER
225     );
226 
227 --   ==============================================================================
228 --    Start of Comments
229 --   ==============================================================================
230 --   API Name
231 --           Delete_Threshold_Rule
232 --   Type
233 --           Private
234 --   Pre-Req
235 --
236 --   Parameters
237 --
238 --   IN
239 --       p_api_version_number      IN   NUMBER     Required
240 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
241 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
242 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
243 --       p_THRESHOLD_RULE_ID                IN   NUMBER
244 --       p_object_version_number   IN   NUMBER     Optional  Default = NULL
245 --
246 --   OUT
247 --       x_return_status           OUT  VARCHAR2
248 --       x_msg_count               OUT  NUMBER
249 --       x_msg_data                OUT  VARCHAR2
250 --   Version : Current version 1.0
251 --   Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
252 --         and basic operation, developer must manually add parameters and business logic as necessary.
253 --
254 --   End of Comments
255 --   ==============================================================================
256 --
257 
258 PROCEDURE Delete_Threshold_Rule(
259     p_api_version_number         IN   NUMBER,
260     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
261     p_commit                     IN   VARCHAR2     := FND_API.G_FALSE,
262     p_validation_level           IN   NUMBER       := FND_API.G_VALID_LEVEL_FULL,
263     x_return_status              OUT NOCOPY  VARCHAR2,
264     x_msg_count                  OUT NOCOPY  NUMBER,
265     x_msg_data                   OUT NOCOPY  VARCHAR2,
266     p_threshold_rule_id                   IN  NUMBER,
267     p_object_version_number      IN   NUMBER
268     );
269 
270 --   ==============================================================================
271 --    Start of Comments
272 --   ==============================================================================
273 --   API Name
274 --           Lock_Threshold_Rule
275 --   Type
276 --           Private
277 --   Pre-Req
278 --
279 --   Parameters
280 --
281 --   IN
282 --       p_api_version_number      IN   NUMBER     Required
283 --       p_init_msg_list           IN   VARCHAR2   Optional  Default = FND_API_G_FALSE
284 --       p_commit                  IN   VARCHAR2   Optional  Default = FND_API.G_FALSE
285 --       p_validation_level        IN   NUMBER     Optional  Default = FND_API.G_VALID_LEVEL_FULL
286 --       p_threshold_rule_rec            IN   threshold_rule_rec_type  Required
287 --
288 --   OUT
289 --       x_return_status           OUT  VARCHAR2
290 --       x_msg_count               OUT  NUMBER
291 --       x_msg_data                OUT  VARCHAR2
292 --   Version : Current version 1.0
293 --   Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
294 --         and basic operation, developer must manually add parameters and business logic as necessary.
295 --
296 --   End of Comments
297 --   ==============================================================================
298 --
299 
300 PROCEDURE Lock_Threshold_Rule(
301     p_api_version_number         IN   NUMBER,
302     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
303 
304     x_return_status              OUT NOCOPY  VARCHAR2,
305     x_msg_count                  OUT NOCOPY  NUMBER,
306     x_msg_data                   OUT NOCOPY  VARCHAR2,
307 
308     p_threshold_rule_id                   IN  NUMBER,
309     p_object_version             IN  NUMBER
310     );
311 
312 
313 -- Start of Comments
314 --
315 --  validation procedures
316 --
317 -- p_validation_mode is a constant defined in OZF_UTILITY_PVT package
318 --                  For create: G_CREATE, for update: G_UPDATE
319 -- Note: 1. This is automated generated item level validation procedure.
320 --          The actual validation detail is needed to be added.
321 --       2. We can also validate table instead of record. There will be an option for user to choose.
322 -- End of Comments
323 
324 PROCEDURE Validate_threshold_rule(
325     p_api_version_number         IN   NUMBER,
326     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
327     p_validation_level           IN   NUMBER := FND_API.G_VALID_LEVEL_FULL,
328     p_threshold_rule_rec               IN   threshold_rule_rec_type,
329     x_return_status              OUT NOCOPY  VARCHAR2,
330     x_msg_count                  OUT NOCOPY  NUMBER,
331     x_msg_data                   OUT NOCOPY  VARCHAR2
332     );
333 
334 -- Start of Comments
335 --
336 --  validation procedures
337 --
338 -- p_validation_mode is a constant defined in OZF_UTILITY_PVT package
339 --                  For create: G_CREATE, for update: G_UPDATE
340 -- Note: 1. This is automated generated item level validation procedure.
341 --          The actual validation detail is needed to be added.
342 --       2. Validate the unique keys, lookups here
343 -- End of Comments
344 
345 PROCEDURE Check_threshold_rule_Items (
346     P_threshold_rule_rec     IN    threshold_rule_rec_type,
347     p_validation_mode  IN    VARCHAR2,
348     x_return_status    OUT NOCOPY   VARCHAR2
349     );
350 
351 -- Start of Comments
352 --
353 -- Record level validation procedures
354 --
355 -- p_validation_mode is a constant defined in OZF_UTILITY_PVT package
356 --                  For create: G_CREATE, for update: G_UPDATE
357 -- Note: 1. This is automated generated item level validation procedure.
358 --          The actual validation detail is needed to be added.
359 --       2. Developer can manually added inter-field level validation.
360 -- End of Comments
361 
362 PROCEDURE Validate_threshold_rule_rec(
363     p_api_version_number         IN   NUMBER,
364     p_init_msg_list              IN   VARCHAR2     := FND_API.G_FALSE,
365     x_return_status              OUT NOCOPY  VARCHAR2,
366     x_msg_count                  OUT NOCOPY  NUMBER,
367     x_msg_data                   OUT NOCOPY  VARCHAR2,
368     p_threshold_rule_rec               IN    threshold_rule_rec_type
369     );
370 
371 
372 
373 PROCEDURE Complete_threshold_rule_Rec (
374     P_threshold_rule_rec     IN    threshold_rule_rec_type,
375      x_complete_rec        OUT NOCOPY    threshold_rule_rec_type
376     );
377 
378 
379 END OZF_Threshold_Rule_PVT;