1 Package ghr_prh_upd as
2 /* $Header: ghprhrhi.pkh 120.1.12000000.1 2007/01/18 14:09:34 appldev noship $ */
3
4 --
5 -- ----------------------------------------------------------------------------
6 -- |---------------------------------< upd >----------------------------------|
7 -- ----------------------------------------------------------------------------
8 -- {Start Of Comments}
9 --
10 -- Description:
11 -- This procedure is the record interface for the update
12 -- process for the specified entity. The role of this process is
13 -- to update a fully validated row for the HR schema passing back
14 -- to the calling process, any system generated values (e.g.
15 -- object version number attribute). This process is the main
16 -- backbone of the upd business process. The processing of this
17 -- procedure is as follows:
18 -- 1) If the p_validate parameter has been set to true then a savepoint
19 -- is issued.
20 -- 2) The row to be updated is then locked and selected into the record
21 -- structure g_old_rec.
22 -- 3) Because on update parameters which are not part of the update do not
23 -- have to be defaulted, we need to build up the updated row by
24 -- converting any system defaulted parameters to their corresponding
25 -- value.
26 -- 4) The controlling validation process update_validate is then executed
27 -- which will execute all private and public validation business rule
28 -- processes.
29 -- 5) The pre_update process is then executed which enables any
30 -- logic to be processed before the update dml process is executed.
31 -- 6) The update_dml process will physical perform the update dml into the
32 -- specified entity.
33 -- 7) The post_update process is then executed which enables any
34 -- logic to be processed after the update dml process.
35 -- 8) If the p_validate parameter has been set to true an exception is
36 -- raised which is handled and processed by performing a rollback to
37 -- the savepoint which was issued at the beginning of the upd process.
38 --
39 -- Pre Conditions:
40 -- The main parameters to the business process have to be in the record
41 -- format.
42 --
43 -- In Parameters:
44 -- p_validate
45 -- Determines if the process is to be validated. Setting this
46 -- boolean value to true will invoke the process to be validated. The
47 -- default is false. The validation is controlled by a savepoint and
48 -- rollback mechanism. The savepoint is issued at the beginning of the
49 -- process and is rollbacked at the end of the process
50 -- when all the processing has been completed. The rollback is controlled
51 -- by raising and handling the exception hr_api.validate_enabled. We use
52 -- the exception because, by raising the exception with the
53 -- process, we can exit successfully without having any of the 'OUT'
54 -- parameters being set.
55 --
56 -- Post Success:
57 -- The specified row will be fully validated and updated for the specified
58 -- entity without being committed. If the p_validate argument has been set
59 -- to true then all the work will be rolled back.
60 --
61 -- Post Failure:
62 -- If an error has occurred, an error message will be supplied with the work
63 -- rolled back.
64 --
65 -- Developer Implementation Notes:
66 -- None.
67 --
68 -- Access Status:
69 -- Internal Development Use Only.
70 --
71 -- {End Of Comments}
72 -- ----------------------------------------------------------------------------
73 Procedure upd
74 (
75 p_rec in out NOCOPY ghr_prh_shd.g_rec_type,
76 p_validate in boolean default false
77 );
78 --
79 -- ----------------------------------------------------------------------------
80 -- |---------------------------------< upd >----------------------------------|
81 -- ----------------------------------------------------------------------------
82 -- {Start Of Comments}
83 --
84 -- Description:
85 -- This procedure is the attribute interface for the update
86 -- process for the specified entity and is the outermost layer. The role
87 -- of this process is to update a fully validated row into the HR schema
88 -- passing back to the calling process, any system generated values
89 -- (e.g. object version number attributes). The processing of this
90 -- procedure is as follows:
91 -- 1) The attributes are converted into a local record structure by
92 -- calling the convert_defs function.
93 -- 2) After the conversion has taken place, the corresponding record upd
94 -- interface process is executed.
95 -- 3) OUT parameters are then set to their corresponding record attributes.
96 --
97 -- Pre Conditions:
98 --
99 -- In Parameters:
100 -- p_validate
101 -- Determines if the process is to be validated. Setting this
102 -- Boolean value to true will invoke the process to be validated.
103 -- The default is false.
104 --
105 -- Post Success:
106 -- A fully validated row will be updated for the specified entity
107 -- without being committed (or rollbacked depending on the p_validate
108 -- status).
109 --
110 -- Post Failure:
111 -- If an error has occurred, an error message will be supplied with the work
112 -- rolled back.
113 --
114 -- Developer Implementation Notes:
115 -- None.
116 --
117 -- Access Status:
118 -- Internal Development Use Only.
119 --
120 -- {End Of Comments}
121 -- ----------------------------------------------------------------------------
122 Procedure upd
123 (
124 p_pa_routing_history_id in number,
125 p_attachment_modified_flag in varchar2 default hr_api.g_varchar2,
126 p_initiator_flag in varchar2 default hr_api.g_varchar2,
127 p_approver_flag in varchar2 default hr_api.g_varchar2,
128 p_reviewer_flag in varchar2 default hr_api.g_varchar2,
129 p_requester_flag in varchar2 default hr_api.g_varchar2,
130 p_authorizer_flag in varchar2 default hr_api.g_varchar2,
131 p_personnelist_flag in varchar2 default hr_api.g_varchar2,
132 p_approved_flag in varchar2 default hr_api.g_varchar2,
133 p_user_name in varchar2 default hr_api.g_varchar2,
134 p_user_name_employee_id in number default hr_api.g_number,
135 p_user_name_emp_first_name in varchar2 default hr_api.g_varchar2,
136 p_user_name_emp_last_name in varchar2 default hr_api.g_varchar2,
137 p_user_name_emp_middle_names in varchar2 default hr_api.g_varchar2,
138 p_notepad in varchar2 default hr_api.g_varchar2,
139 p_action_taken in varchar2 default hr_api.g_varchar2,
140 p_groupbox_id in number default hr_api.g_number,
141 p_noa_family_code in varchar2 default hr_api.g_varchar2,
142 p_nature_of_action_id in number default hr_api.g_number,
143 p_second_nature_of_action_id in number default hr_api.g_number,
144 p_approval_status in varchar2 default hr_api.g_varchar2,
145 p_date_notification_sent in date default hr_api.g_date,
146 p_object_version_number in out NOCOPY number,
147 p_validate in boolean default false
148 );
149 --
150 end ghr_prh_upd;