DBA Data[Home] [Help]

PACKAGE: APPS.GHR_PDH_SHD

Source


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