1 Package per_ppc_upd AUTHID CURRENT_USER as
2 /* $Header: peppcrhi.pkh 120.1 2006/03/14 18:16:34 scnair noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------------< upd >----------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- This procedure is the record interface for the update
11 -- process for the specified entity. The role of this process is
12 -- to update a fully validated row for the HR schema passing back
13 -- to the calling process, any system generated values (e.g.
14 -- object version number attribute). This process is the main
15 -- backbone of the upd business process. The processing of this
16 -- procedure is as follows:
17 -- 1) If the p_validate parameter has been set to true then a savepoint
18 -- is issued.
19 -- 2) The row to be updated is then locked and selected into the record
20 -- structure g_old_rec.
21 -- 3) Because on update parameters which are not part of the update do not
22 -- have to be defaulted, we need to build up the updated row by
23 -- converting any system defaulted parameters to their corresponding
24 -- value.
25 -- 4) The controlling validation process update_validate is then executed
26 -- which will execute all private and public validation business rule
27 -- processes.
28 -- 5) The pre_update process is then executed which enables any
29 -- logic to be processed before the update dml process is executed.
30 -- 6) The update_dml process will physical perform the update dml into the
31 -- specified entity.
32 -- 7) The post_update process is then executed which enables any
33 -- logic to be processed after the update dml process.
34 -- 8) If the p_validate parameter has been set to true an exception is
35 -- raised which is handled and processed by performing a rollback to
36 -- the savepoint which was issued at the beginning of the upd process.
37 --
38 -- Pre Conditions:
39 -- The main parameters to the business process have to be in the record
40 -- format.
41 --
42 -- In Parameters:
43 -- p_validate
44 -- Determines if the process is to be validated. Setting this
45 -- boolean value to true will invoke the process to be validated. The
46 -- default is false. The validation is controlled by a savepoint and
47 -- rollback mechanism. The savepoint is issued at the beginning of the
48 -- process and is rollbacked at the end of the process
49 -- when all the processing has been completed. The rollback is controlled
50 -- by raising and handling the exception hr_api.validate_enabled. We use
51 -- the exception because, by raising the exception with the
52 -- process, we can exit successfully without having any of the 'OUT'
53 -- parameters being set.
54 -- p_validation_strength
55 -- Determines how strong the validation should be. Should always be set
56 -- to STRONG unless called from the update proposal api which is trying
57 -- to update the components of a proposal which is about to change.
58 -- In this case it should be set to WEAK and the conditions that you
59 -- cannot change the components of an approved proposal, or change
60 -- components of a proposal with multiple components set to
61 -- 'N' will be ignored.
62 --
63 --
64 -- Post Success:
65 -- The specified row will be fully validated and updated for the specified
66 -- entity without being committed. If the p_validate argument has been set
67 -- to true then all the work will be rolled back.
68 --
69 -- Post Failure:
70 -- If an error has occurred, an error message will be supplied with the work
71 -- rolled back.
72 --
73 -- Developer Implementation Notes:
74 -- None.
75 --
76 -- Access Status:
77 -- Internal Development Use Only.
78 --
79 -- {End Of Comments}
80 -- ----------------------------------------------------------------------------
81 Procedure upd
82 (
83 p_rec in out nocopy per_ppc_shd.g_rec_type,
84 p_validation_strength in varchar2 default 'STRONG',
85 p_validate in boolean default false
86 );
87 --
88 -- ----------------------------------------------------------------------------
89 -- |---------------------------------< upd >----------------------------------|
90 -- ----------------------------------------------------------------------------
91 -- {Start Of Comments}
92 --
93 -- Description:
94 -- This procedure is the attribute interface for the update
95 -- process for the specified entity and is the outermost layer. The role
96 -- of this process is to update a fully validated row into the HR schema
97 -- passing back to the calling process, any system generated values
98 -- (e.g. object version number attributes). The processing of this
99 -- procedure is as follows:
100 -- 1) The attributes are converted into a local record structure by
101 -- calling the convert_defs function.
102 -- 2) After the conversion has taken place, the corresponding record upd
103 -- interface process is executed.
104 -- 3) OUT parameters are then set to their corresponding record attributes.
105 --
106 -- Pre Conditions:
107 --
108 -- In Parameters:
109 -- p_validate
110 -- Determines if the process is to be validated. Setting this
111 -- Boolean value to true will invoke the process to be validated.
112 -- The default is false.
113 -- p_validation_strength
114 -- Determines how strong the validation should be. Should always be set
115 -- to STRONG unless called from the update proposal api which is trying
116 -- to update the components of a proposal which is about to change.
117 -- In this case it should be set to WEAK and the conditions that you
118 -- cannot change the components of an approved proposal, or change
119 -- components of a proposal with multiple components set to
120 -- 'N' will be ignored.
121 --
122 -- Post Success:
123 -- A fully validated row will be updated for the specified entity
124 -- without being committed (or rollbacked depending on the p_validate
125 -- status).
126 --
127 -- Post Failure:
128 -- If an error has occurred, an error message will be supplied with the work
129 -- rolled back.
130 --
131 -- Developer Implementation Notes:
132 -- None.
133 --
134 -- Access Status:
135 -- Internal Development Use Only.
136 --
137 -- {End Of Comments}
138 -- ----------------------------------------------------------------------------
139 Procedure upd
140 (
141 p_component_id in number,
142 p_approved in varchar2 default hr_api.g_varchar2,
143 p_component_reason in varchar2 default hr_api.g_varchar2,
144 p_change_amount_n in number default hr_api.g_number,
145 p_change_percentage in number default hr_api.g_number,
146 p_comments in varchar2 default hr_api.g_varchar2,
147 p_attribute_category in varchar2 default hr_api.g_varchar2,
148 p_attribute1 in varchar2 default hr_api.g_varchar2,
149 p_attribute2 in varchar2 default hr_api.g_varchar2,
150 p_attribute3 in varchar2 default hr_api.g_varchar2,
151 p_attribute4 in varchar2 default hr_api.g_varchar2,
152 p_attribute5 in varchar2 default hr_api.g_varchar2,
153 p_attribute6 in varchar2 default hr_api.g_varchar2,
154 p_attribute7 in varchar2 default hr_api.g_varchar2,
155 p_attribute8 in varchar2 default hr_api.g_varchar2,
156 p_attribute9 in varchar2 default hr_api.g_varchar2,
157 p_attribute10 in varchar2 default hr_api.g_varchar2,
158 p_attribute11 in varchar2 default hr_api.g_varchar2,
159 p_attribute12 in varchar2 default hr_api.g_varchar2,
160 p_attribute13 in varchar2 default hr_api.g_varchar2,
161 p_attribute14 in varchar2 default hr_api.g_varchar2,
162 p_attribute15 in varchar2 default hr_api.g_varchar2,
163 p_attribute16 in varchar2 default hr_api.g_varchar2,
164 p_attribute17 in varchar2 default hr_api.g_varchar2,
165 p_attribute18 in varchar2 default hr_api.g_varchar2,
166 p_attribute19 in varchar2 default hr_api.g_varchar2,
167 p_attribute20 in varchar2 default hr_api.g_varchar2,
168 p_object_version_number in out nocopy number,
169 p_validation_strength in varchar2 default 'STRONG',
170 p_validate in boolean default false
171 );
172 --
173 end per_ppc_upd;