DBA Data[Home] [Help]

PACKAGE: APPS.OTA_CMB_SHD

Source


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