DBA Data[Home] [Help]

PACKAGE: APPS.OTA_CRE_SHD

Source


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