DBA Data[Home] [Help]

PACKAGE: APPS.PQH_VER_SHD

Source


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