DBA Data[Home] [Help]

PACKAGE: APPS.OTA_OCL_SHD

Source


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