DBA Data[Home] [Help]

PACKAGE: APPS.PER_CNI_SHD

Source


1 Package per_cni_shd AUTHID CURRENT_USER as
2 /* $Header: pecnirhi.pkh 120.0 2005/05/31 06:49:33 appldev noship $ */
3  --
4  -- ----------------------------------------------------------------------------
5  -- |                    Global Record Type Specification                      |
6  -- ----------------------------------------------------------------------------
7  --
8  Type g_rec_type Is Record
9    (configuration_code              varchar2(60)
10    ,config_information_category     varchar2(120)
11    ,config_information1             varchar2(240)
12    ,config_information2             varchar2(240)
13    ,config_information3             varchar2(240)
14    ,config_information4             varchar2(240)
15    ,config_information5             varchar2(240)
16    ,config_information6             varchar2(240)
17    ,config_information7             varchar2(240)
18    ,config_information8             varchar2(240)
19    ,config_information9             varchar2(240)
20    ,config_information10            varchar2(240)
21    ,config_information11            varchar2(240)
22    ,config_information12            varchar2(240)
23    ,config_information13            varchar2(240)
24    ,config_information14            varchar2(240)
25    ,config_information15            varchar2(240)
26    ,config_information16            varchar2(240)
27    ,config_information17            varchar2(240)
28    ,config_information18            varchar2(240)
29    ,config_information19            varchar2(240)
30    ,config_information20            varchar2(240)
31    ,config_information21            varchar2(240)
32    ,config_information22            varchar2(240)
33    ,config_information23            varchar2(240)
34    ,config_information24            varchar2(240)
35    ,config_information25            varchar2(240)
36    ,config_information26            varchar2(240)
37    ,config_information27            varchar2(240)
38    ,config_information28            varchar2(240)
39    ,config_information29            varchar2(240)
40    ,config_information30            varchar2(240)
41    ,config_information_id           number(15)
42    ,config_sequence                 number(9)
43    ,object_version_number           Number(9)
44    );
45  --
46  -- ----------------------------------------------------------------------------
47  -- |           Global Definitions - Internal Development Use Only             |
48  -- ----------------------------------------------------------------------------
49  --
50  g_old_rec  g_rec_type;                            -- Global record definition
51  -- Global table name
52  g_tab_nam  constant varchar2(30) := 'PER_RI_CONFIG_INFORMATION';
53  --
54  -- ----------------------------------------------------------------------------
55  -- |---------------------------< constraint_error >---------------------------|
56  -- ----------------------------------------------------------------------------
57  -- {Start Of Comments}
58  --
59  -- Description:
60  --   This procedure is called when a constraint has been violated (i.e.
61  --   The exception hr_api.check_integrity_violated,
62  --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
63  --   hr_api.unique_integrity_violated has been raised).
64  --   The exceptions can only be raised as follows:
65  --   1) A check constraint can only be violated during an INSERT or UPDATE
66  --      dml operation.
67  --   2) A parent integrity constraint can only be violated during an
68  --      INSERT or UPDATE dml operation.
69  --   3) A child integrity constraint can only be violated during an
70  --      DELETE dml operation.
71  --   4) A unique integrity constraint can only be violated during INSERT or
72  --      UPDATE dml operation.
73  --
74  -- Prerequisites:
75  --   1) Either hr_api.check_integrity_violated,
76  --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
77  --      hr_api.unique_integrity_violated has been raised with the subsequent
78  --      stripping of the constraint name from the generated error message
79  --      text.
80  --   2) Standalone validation test which corresponds with a constraint error.
81  --
82  -- In Parameter:
83  --   p_constraint_name is in upper format and is just the constraint name
84  --   (e.g. not prefixed by brackets, schema owner etc).
85  --
86  -- Post Success:
87  --   Development dependant.
88  --
89  -- Post Failure:
90  --   Developement dependant.
91  --
92  -- Developer Implementation Notes:
93  --   For each constraint being checked the hr system package failure message
94  --   has been generated as a template only. These system error messages should
95  --   be modified as required (i.e. change the system failure message to a user
96  --   friendly defined error message).
97  --
98  -- Access Status:
99  --   Internal Development Use Only.
100  --
101  -- {End Of Comments}
102  -- ----------------------------------------------------------------------------
103  Procedure constraint_error
104    (p_constraint_name in all_constraints.constraint_name%TYPE);
105  --
106  -- ----------------------------------------------------------------------------
107  -- |-----------------------------< api_updating >-----------------------------|
108  -- ----------------------------------------------------------------------------
109  --  {Start Of Comments}
110  --
111  -- Description:
112  --   This function is used to populate the g_old_rec record with the
113  --   current row from the database for the specified primary key
114  --   provided that the primary key exists and is valid and does not
115  --   already match the current g_old_rec. The function will always return
116  --   a TRUE value if the g_old_rec is populated with the current row.
117  --   A FALSE value will be returned if all of the primary key arguments
118  --   are null.
119  --
120  -- Prerequisites:
121  --   None.
122  --
123  -- In Parameters:
124  --
125  -- Post Success:
126  --   A value of TRUE will be returned indiciating that the g_old_rec
127  --   is current.
128  --   A value of FALSE will be returned if all of the primary key arguments
129  --   have a null value (this indicates that the row has not be inserted into
130  --   the Schema), and therefore could never have a corresponding row.
131  --
132  -- Post Failure:
133  --   A failure can only occur under two circumstances:
134  --   1) The primary key is invalid (i.e. a row does not exist for the
135  --      specified primary key values).
136  --   2) If an object_version_number exists but is NOT the same as the current
137  --      g_old_rec value.
138  --
139  -- Developer Implementation Notes:
140  --   None.
141  --
142  -- Access Status:
143  --   Internal Development Use Only.
144  --
145  -- {End Of Comments}
146  -- ----------------------------------------------------------------------------
147  Function api_updating
148    (p_config_information_id                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_config_information_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_configuration_code             in varchar2
237    ,p_config_information_category    in varchar2
238    ,p_config_information1            in varchar2
239    ,p_config_information2            in varchar2
240    ,p_config_information3            in varchar2
241    ,p_config_information4            in varchar2
242    ,p_config_information5            in varchar2
243    ,p_config_information6            in varchar2
244    ,p_config_information7            in varchar2
245    ,p_config_information8            in varchar2
246    ,p_config_information9            in varchar2
247    ,p_config_information10           in varchar2
248    ,p_config_information11           in varchar2
249    ,p_config_information12           in varchar2
250    ,p_config_information13           in varchar2
251    ,p_config_information14           in varchar2
252    ,p_config_information15           in varchar2
253    ,p_config_information16           in varchar2
254    ,p_config_information17           in varchar2
255    ,p_config_information18           in varchar2
256    ,p_config_information19           in varchar2
257    ,p_config_information20           in varchar2
258    ,p_config_information21           in varchar2
259    ,p_config_information22           in varchar2
260    ,p_config_information23           in varchar2
261    ,p_config_information24           in varchar2
262    ,p_config_information25           in varchar2
263    ,p_config_information26           in varchar2
264    ,p_config_information27           in varchar2
265    ,p_config_information28           in varchar2
266    ,p_config_information29           in varchar2
267    ,p_config_information30           in varchar2
268    ,p_config_information_id          in number
269    ,p_config_sequence                in number
270    ,p_object_version_number          In Number
271    )
272    Return g_rec_type;
273  --
274  end per_cni_shd;