DBA Data[Home] [Help]

PACKAGE: APPS.OTA_CME_SHD

Source


1 Package ota_cme_shd as
2 /* $Header: otcmerhi.pkh 120.0 2005/06/03 08:32 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (cert_mbr_enrollment_id          number(9)
10   ,cert_prd_enrollment_id          number(9)
11   ,cert_member_id                  number(9)
12   ,member_status_code              varchar2(30)
13   ,completion_date                 date
14   ,business_group_id               number(15)
15   ,object_version_number           number(9)
16   ,attribute_category              varchar2(30)
17   ,attribute1                      varchar2(150)
18   ,attribute2                      varchar2(150)
19   ,attribute3                      varchar2(150)
20   ,attribute4                      varchar2(150)
21   ,attribute5                      varchar2(150)
22   ,attribute6                      varchar2(150)
23   ,attribute7                      varchar2(150)
24   ,attribute8                      varchar2(150)
25   ,attribute9                      varchar2(150)
26   ,attribute10                     varchar2(150)
27   ,attribute11                     varchar2(150)
28   ,attribute12                     varchar2(150)
29   ,attribute13                     varchar2(150)
30   ,attribute14                     varchar2(150)
31   ,attribute15                     varchar2(150)
32   ,attribute16                     varchar2(150)
33   ,attribute17                     varchar2(150)
34   ,attribute18                     varchar2(150)
35   ,attribute19                     varchar2(150)
36   ,attribute20                     varchar2(150)
37   );
38 --
39 -- ----------------------------------------------------------------------------
40 -- |           Global Definitions - Internal Development Use Only             |
41 -- ----------------------------------------------------------------------------
42 --
43 g_old_rec  g_rec_type;                            -- Global record definition
44 -- Global table name
45 g_tab_nam  constant varchar2(30) := 'OTA_CERT_MBR_ENROLLMENTS';
46 --
47 -- ----------------------------------------------------------------------------
48 -- |---------------------------< constraint_error >---------------------------|
49 -- ----------------------------------------------------------------------------
50 -- {Start Of Comments}
51 --
52 -- Description:
53 --   This procedure is called when a constraint has been violated (i.e.
54 --   The exception hr_api.check_integrity_violated,
55 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
56 --   hr_api.unique_integrity_violated has been raised).
57 --   The exceptions can only be raised as follows:
58 --   1) A check constraint can only be violated during an INSERT or UPDATE
59 --      dml operation.
60 --   2) A parent integrity constraint can only be violated during an
61 --      INSERT or UPDATE dml operation.
62 --   3) A child integrity constraint can only be violated during an
63 --      DELETE dml operation.
64 --   4) A unique integrity constraint can only be violated during INSERT or
65 --      UPDATE dml operation.
66 --
67 -- Prerequisites:
68 --   1) Either hr_api.check_integrity_violated,
69 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
70 --      hr_api.unique_integrity_violated has been raised with the subsequent
71 --      stripping of the constraint name from the generated error message
72 --      text.
73 --   2) Standalone validation test which corresponds with a constraint error.
74 --
75 -- In Parameter:
76 --   p_constraint_name is in upper format and is just the constraint name
77 --   (e.g. not prefixed by brackets, schema owner etc).
78 --
79 -- Post Success:
80 --   Development dependant.
81 --
82 -- Post Failure:
83 --   Developement dependant.
84 --
85 -- Developer Implementation Notes:
86 --   For each constraint being checked the hr system package failure message
87 --   has been generated as a template only. These system error messages should
88 --   be modified as required (i.e. change the system failure message to a user
89 --   friendly defined error message).
90 --
91 -- Access Status:
92 --   Internal Development Use Only.
93 --
94 -- {End Of Comments}
95 -- ----------------------------------------------------------------------------
96 Procedure constraint_error
97   (p_constraint_name in all_constraints.constraint_name%TYPE);
98 --
99 -- ----------------------------------------------------------------------------
100 -- |-----------------------------< api_updating >-----------------------------|
101 -- ----------------------------------------------------------------------------
102 --  {Start Of Comments}
103 --
104 -- Description:
105 --   This function is used to populate the g_old_rec record with the
106 --   current row from the database for the specified primary key
107 --   provided that the primary key exists and is valid and does not
108 --   already match the current g_old_rec. The function will always return
109 --   a TRUE value if the g_old_rec is populated with the current row.
110 --   A FALSE value will be returned if all of the primary key arguments
111 --   are null.
112 --
113 -- Prerequisites:
114 --   None.
115 --
116 -- In Parameters:
117 --
118 -- Post Success:
119 --   A value of TRUE will be returned indiciating that the g_old_rec
120 --   is current.
121 --   A value of FALSE will be returned if all of the primary key arguments
122 --   have a null value (this indicates that the row has not be inserted into
123 --   the Schema), and therefore could never have a corresponding row.
124 --
125 -- Post Failure:
126 --   A failure can only occur under two circumstances:
127 --   1) The primary key is invalid (i.e. a row does not exist for the
128 --      specified primary key values).
129 --   2) If an object_version_number exists but is NOT the same as the current
130 --      g_old_rec value.
131 --
132 -- Developer Implementation Notes:
133 --   None.
134 --
135 -- Access Status:
136 --   Internal Development Use Only.
137 --
138 -- {End Of Comments}
139 -- ----------------------------------------------------------------------------
140 Function api_updating
141   (p_cert_mbr_enrollment_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_cert_mbr_enrollment_id               in     number
195   ,p_object_version_number                in     number
196   );
197 --
198 -- ----------------------------------------------------------------------------
199 -- |-----------------------------< convert_args >-----------------------------|
200 -- ----------------------------------------------------------------------------
201 -- {Start Of Comments}
202 --
203 -- Description:
204 --   This function is used to turn attribute parameters into the record
205 --   structure parameter g_rec_type.
206 --
207 -- Prerequisites:
208 --   This is a private function and can only be called from the ins or upd
209 --   attribute processes.
210 --
211 -- In Parameters:
212 --
213 -- Post Success:
214 --   A returning record structure will be returned.
215 --
216 -- Post Failure:
217 --   No direct error handling is required within this function.  Any possible
218 --   errors within this function will be a PL/SQL value error due to
219 --   conversion of datatypes or data lengths.
220 --
221 -- Developer Implementation Notes:
222 --   None.
223 --
224 -- Access Status:
225 --   Internal Row Handler Use Only.
226 --
227 -- {End Of Comments}
228 -- ----------------------------------------------------------------------------
229 Function convert_args
230   (p_cert_mbr_enrollment_id         in number
231   ,p_cert_prd_enrollment_id         in number
232   ,p_cert_member_id                 in number
233   ,p_member_status_code             in varchar2
234   ,p_completion_date                in date
235   ,p_business_group_id              in number
236   ,p_object_version_number          in number
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_cme_shd;