DBA Data[Home] [Help]

PACKAGE: APPS.OTA_LPS_SHD

Source


1 Package ota_lps_shd AUTHID CURRENT_USER as
2 /* $Header: otlpsrhi.pkh 120.0 2005/05/29 07:24:10 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (learning_path_id                number(9)
10   ,business_group_id               number(15)
11   ,duration                        number
12   ,duration_units                  varchar2(30)
13   ,object_version_number           number(9)
14   ,attribute_category              varchar2(30)
15   ,attribute1                      varchar2(150)
16   ,attribute2                      varchar2(150)
17   ,attribute3                      varchar2(150)
18   ,attribute4                      varchar2(150)
19   ,attribute5                      varchar2(150)
20   ,attribute6                      varchar2(150)
21   ,attribute7                      varchar2(150)
22   ,attribute8                      varchar2(150)
23   ,attribute9                      varchar2(150)
24   ,attribute10                     varchar2(150)
25   ,attribute11                     varchar2(150)
26   ,attribute12                     varchar2(150)
27   ,attribute13                     varchar2(150)
28   ,attribute14                     varchar2(150)
29   ,attribute15                     varchar2(150)
30   ,attribute16                     varchar2(150)
31   ,attribute17                     varchar2(150)
32   ,attribute18                     varchar2(150)
33   ,attribute19                     varchar2(150)
34   ,attribute20                     varchar2(150)
35   ,start_date_active               date
36   ,end_date_active                 date
37   ,path_source_code                varchar2(30)
38   ,source_function_code            varchar2(30)
39   ,assignment_id                   number(10,0)
40   ,source_id                       number
41   ,notify_days_before_target       number(10,0)
42   ,person_id                       number
43   ,contact_id                      number(10,0)
44   --Bug#4052408
45   -- Increased lengths of folllowing fields to 9 because update api has default
46   -- value hr_api.g_varchar2 and hence convert_args will throw ORA-06502
47   --,display_to_learner_flag         varchar2(1)
48   --,public_flag                     varchar2(1));
49   ,display_to_learner_flag         varchar2(9)
50   ,public_flag                     varchar2(9)
51   ,competency_update_level      varchar2(30));
52 --
53 -- ----------------------------------------------------------------------------
54 -- |           Global Definitions - Internal Development Use Only             |
55 -- ----------------------------------------------------------------------------
56 --
57 g_old_rec  g_rec_type;                            -- Global record definition
58 -- Global table name
59 g_tab_nam  constant varchar2(30) := 'OTA_LEARNING_PATHS';
60 --
61 -- ----------------------------------------------------------------------------
62 -- |---------------------------< constraint_error >---------------------------|
63 -- ----------------------------------------------------------------------------
64 -- {Start Of Comments}
65 --
66 -- Description:
67 --   This procedure is called when a constraint has been violated (i.e.
68 --   The exception hr_api.check_integrity_violated,
69 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
70 --   hr_api.unique_integrity_violated has been raised).
71 --   The exceptions can only be raised as follows:
72 --   1) A check constraint can only be violated during an INSERT or UPDATE
73 --      dml operation.
74 --   2) A parent integrity constraint can only be violated during an
75 --      INSERT or UPDATE dml operation.
76 --   3) A child integrity constraint can only be violated during an
77 --      DELETE dml operation.
78 --   4) A unique integrity constraint can only be violated during INSERT or
79 --      UPDATE dml operation.
80 --
81 -- Prerequisites:
82 --   1) Either hr_api.check_integrity_violated,
83 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
84 --      hr_api.unique_integrity_violated has been raised with the subsequent
85 --      stripping of the constraint name from the generated error message
86 --      text.
87 --   2) Standalone validation test which corresponds with a constraint error.
88 --
89 -- In Parameter:
90 --   p_constraint_name is in upper format and is just the constraint name
91 --   (e.g. not prefixed by brackets, schema owner etc).
92 --
93 -- Post Success:
94 --   Development dependant.
95 --
96 -- Post Failure:
97 --   Developement dependant.
98 --
99 -- Developer Implementation Notes:
100 --   For each constraint being checked the hr system package failure message
101 --   has been generated as a template only. These system error messages should
102 --   be modified as required (i.e. change the system failure message to a user
103 --   friendly defined error message).
104 --
105 -- Access Status:
106 --   Internal Development Use Only.
107 --
108 -- {End Of Comments}
109 -- ----------------------------------------------------------------------------
110 Procedure constraint_error
111   (p_constraint_name in all_constraints.constraint_name%TYPE);
112 --
113 -- ----------------------------------------------------------------------------
114 -- |-----------------------------< api_updating >-----------------------------|
115 -- ----------------------------------------------------------------------------
116 --  {Start Of Comments}
117 --
118 -- Description:
119 --   This function is used to populate the g_old_rec record with the
120 --   current row from the database for the specified primary key
121 --   provided that the primary key exists and is valid and does not
122 --   already match the current g_old_rec. The function will always return
123 --   a TRUE value if the g_old_rec is populated with the current row.
124 --   A FALSE value will be returned if all of the primary key arguments
125 --   are null.
126 --
127 -- Prerequisites:
128 --   None.
129 --
130 -- In Parameters:
131 --
132 -- Post Success:
133 --   A value of TRUE will be returned indiciating that the g_old_rec
134 --   is current.
135 --   A value of FALSE will be returned if all of the primary key arguments
136 --   have a null value (this indicates that the row has not be inserted into
137 --   the Schema), and therefore could never have a corresponding row.
138 --
139 -- Post Failure:
140 --   A failure can only occur under two circumstances:
141 --   1) The primary key is invalid (i.e. a row does not exist for the
142 --      specified primary key values).
143 --   2) If an object_version_number exists but is NOT the same as the current
144 --      g_old_rec value.
145 --
146 -- Developer Implementation Notes:
147 --   None.
148 --
149 -- Access Status:
150 --   Internal Development Use Only.
151 --
152 -- {End Of Comments}
153 -- ----------------------------------------------------------------------------
154 Function api_updating
155   (p_learning_path_id                     in     number
156   ,p_object_version_number                in     number
157   )      Return Boolean;
158 --
159 -- ----------------------------------------------------------------------------
160 -- |---------------------------------< lck >----------------------------------|
161 -- ----------------------------------------------------------------------------
162 -- {Start of comments}
163 --
164 -- Description:
165 --   The Lck process has two main functions to perform. Firstly, the row to be
166 --   updated or deleted must be locked. The locking of the row will only be
167 --   successful if the row is not currently locked by another user.
168 --   Secondly, during the locking of the row, the row is selected into
169 --   the g_old_rec data structure which enables the current row values from
170 --   the server to be available to the api.
171 --
172 -- Prerequisites:
173 --   When attempting to call the lock the object version number (if defined)
174 --   is mandatory.
175 --
176 -- In Parameters:
177 --   The arguments to the Lck process are the primary key(s) which uniquely
178 --   identify the row and the object version number of row.
179 --
180 -- Post Success:
181 --   On successful completion of the Lck process the row to be updated or
182 --   deleted will be locked and selected into the global data structure
183 --   g_old_rec.
184 --
185 -- Post Failure:
186 --   The Lck process can fail for three reasons:
187 --   1) When attempting to lock the row the row could already be locked by
188 --      another user. This will raise the HR_Api.Object_Locked exception.
189 --   2) The row which is required to be locked doesn't exist in the HR Schema.
190 --      This error is trapped and reported using the message name
191 --      'HR_7220_INVALID_PRIMARY_KEY'.
192 --   3) The row although existing in the HR Schema has a different object
193 --      version number than the object version number specified.
194 --      This error is trapped and reported using the message name
195 --      'HR_7155_OBJECT_INVALID'.
196 --
197 -- Developer Implementation Notes:
198 --   For each primary key and the object version number arguments add a
199 --   call to hr_api.mandatory_arg_error procedure to ensure that these
200 --   argument values are not null.
201 --
202 -- Access Status:
203 --   Internal Development Use Only.
204 --
205 -- {End of comments}
206 -- ----------------------------------------------------------------------------
207 Procedure lck
208   (p_learning_path_id                     in     number
209   ,p_object_version_number                in     number
210   );
211 --
212 -- ----------------------------------------------------------------------------
213 -- |-----------------------------< convert_args >-----------------------------|
214 -- ----------------------------------------------------------------------------
215 -- {Start Of Comments}
216 --
217 -- Description:
218 --   This function is used to turn attribute parameters into the record
219 --   structure parameter g_rec_type.
220 --
221 -- Prerequisites:
222 --   This is a private function and can only be called from the ins or upd
223 --   attribute processes.
224 --
225 -- In Parameters:
226 --
227 -- Post Success:
228 --   A returning record structure will be returned.
229 --
230 -- Post Failure:
231 --   No direct error handling is required within this function.  Any possible
232 --   errors within this function will be a PL/SQL value error due to
233 --   conversion of datatypes or data lengths.
234 --
235 -- Developer Implementation Notes:
236 --   None.
237 --
238 -- Access Status:
239 --   Internal Row Handler Use Only.
240 --
241 -- {End Of Comments}
242 -- ----------------------------------------------------------------------------
243 Function convert_args
244   (p_learning_path_id               in number
245   ,p_business_group_id              in number
246   ,p_duration                       in number
247   ,p_duration_units                 in varchar2
248   ,p_start_date_active              in date
249   ,p_end_date_active                in date
250   ,p_object_version_number          in number
251   ,p_attribute_category             in varchar2
252   ,p_attribute1                     in varchar2
253   ,p_attribute2                     in varchar2
254   ,p_attribute3                     in varchar2
255   ,p_attribute4                     in varchar2
256   ,p_attribute5                     in varchar2
257   ,p_attribute6                     in varchar2
258   ,p_attribute7                     in varchar2
259   ,p_attribute8                     in varchar2
260   ,p_attribute9                     in varchar2
261   ,p_attribute10                    in varchar2
262   ,p_attribute11                    in varchar2
263   ,p_attribute12                    in varchar2
264   ,p_attribute13                    in varchar2
265   ,p_attribute14                    in varchar2
266   ,p_attribute15                    in varchar2
267   ,p_attribute16                    in varchar2
268   ,p_attribute17                    in varchar2
269   ,p_attribute18                    in varchar2
270   ,p_attribute19                    in varchar2
271   ,p_attribute20                    in varchar2
272   ,p_path_source_code                    in varchar2
273   ,p_source_function_code                in varchar2
274   ,p_assignment_id                  in number
275   ,p_source_id                      in number
276   ,p_notify_days_before_target      in number
277   ,p_person_id                      in number
278   ,p_contact_id                     in number
279   ,p_display_to_learner_flag        in varchar2
280   ,p_public_flag                    in varchar2
281   ,p_competency_update_level      in varchar2)
282   Return g_rec_type;
283 --
284 end ota_lps_shd;