DBA Data[Home] [Help]

PACKAGE: APPS.OTA_TPM_SHD

Source


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