DBA Data[Home] [Help]

PACKAGE: APPS.OTA_LPM_SHD

Source


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