DBA Data[Home] [Help]

PACKAGE: APPS.OTA_CCI_SHD

Source


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