DBA Data[Home] [Help]

PACKAGE: APPS.PER_PYP_UPD

Source


1 Package per_pyp_upd AUTHID CURRENT_USER as
2 /* $Header: pepyprhi.pkh 120.8 2009/06/10 12:58:59 vkodedal ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |-----------------------------< convert_defs >-----------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   The Convert_Defs procedure has one very important function:
11 --   It must return the record structure for the row with all system defaulted
12 --   values converted into its corresponding parameter value for update. When
13 --   we attempt to update a row through the Upd process , certain
14 --   parameters can be defaulted which enables flexibility in the calling of
15 --   the upd process (e.g. only attributes which need to be updated need to be
16 --   specified). For the upd process to determine which attributes
17 --   have NOT been specified we need to check if the parameter has a reserved
18 --   system default value. Therefore, for all parameters which have a
19 --   corresponding reserved system default mechanism specified we need to
20 --   check if a system default is being used. If a system default is being
21 --   used then we convert the defaulted value into its corresponding attribute
22 --   value held in the g_old_rec data structure.
23 --
24 -- Prerequisites:
25 --   This private function can only be called from the upd process.
26 --
27 -- In Parameters:
28 --   A Pl/Sql record structre.
29 --
30 -- Post Success:
31 --   The record structure will be returned with all system defaulted parameter
32 --   values converted into its current row attribute value.
33 --
34 -- Post Failure:
35 --   No direct error handling is required within this function. Any possible
36 --   errors within this procedure will be a PL/SQL value error due to conversion
37 --   of datatypes or data lengths.
38 --
39 -- Developer Implementation Notes:
40 --   None.
41 --
42 -- Access Status:
43 --   Internal Row Handler Use Only.
44 --
45 -- {End Of Comments}
46 -- ----------------------------------------------------------------------------
47 Procedure convert_defs(p_rec in out nocopy per_pyp_shd.g_rec_type);
48 --
49 --
50 --
51 -- ----------------------------------------------------------------------------
52 -- |---------------------------------< upd >----------------------------------|
53 -- ----------------------------------------------------------------------------
54 -- {Start Of Comments}
55 --
56 -- Description:
57 --   This procedure is the record interface for the update
58 --   process for the specified entity. The role of this process is
59 --   to update a fully validated row for the HR schema passing back
60 --   to the calling process, any system generated values (e.g.
61 --   object version number attribute). This process is the main
62 --   backbone of the upd business process. The processing of this
63 --   procedure is as follows:
64 --   1) If the p_validate parameter has been set to true then a savepoint
65 --      is issued.
66 --   2) The row to be updated is then locked and selected into the record
67 --      structure g_old_rec.
68 --   3) Because on update parameters which are not part of the update do not
69 --      have to be defaulted, we need to build up the updated row by
70 --      converting any system defaulted parameters to their corresponding
71 --      value.
72 --   4) The controlling validation process update_validate is then executed
73 --      which will execute all private and public validation business rule
74 --      processes.
75 --   5) The pre_update process is then executed which enables any
76 --      logic to be processed before the update dml process is executed.
77 --   6) The update_dml process will physical perform the update dml into the
78 --      specified entity.
79 --   7) The post_update process is then executed which enables any
80 --      logic to be processed after the update dml process.
81 --   8) If the p_validate parameter has been set to true an exception is
82 --      raised which is handled and processed by performing a rollback to
83 --      the savepoint which was issued at the beginning of the upd process.
84 --
85 -- Pre Conditions:
86 --   The main parameters to the business process have to be in the record
87 --   format.
88 --
89 -- In Parameters:
90 --   p_validate
91 --     Determines if the process is to be validated. Setting this
92 --     boolean value to true will invoke the process to be validated. The
93 --     default is false. The validation is controlled by a savepoint and
94 --     rollback mechanism. The savepoint is issued at the beginning of the
95 --     process and is rollbacked at the end of the process
96 --     when all the processing has been completed. The rollback is controlled
97 --     by raising and handling the exception hr_api.validate_enabled. We use
98 --     the exception because, by raising the exception with the
99 --     process, we can exit successfully without having any of the 'OUT'
100 --     parameters being set.
101 --
102 -- Post Success:
103 --   The specified row will be fully validated and updated for the specified
104 --   entity without being committed. If the p_validate argument has been set
105 --   to true then all the work will be rolled back.
106 --
107 -- Post Failure:
108 --   If an error has occurred, an error message will be supplied with the work
109 --   rolled back.
110 --
111 -- Developer Implementation Notes:
112 --   None.
113 --
114 -- Access Status:
115 --   Internal Development Use Only.
116 --
117 -- {End Of Comments}
118 -- ----------------------------------------------------------------------------
119 Procedure upd
120   (
121   p_rec      			  in out nocopy per_pyp_shd.g_rec_type,
122   p_validate   			  in     boolean default false,
123   p_inv_next_sal_date_warning        out nocopy boolean,
124   p_proposed_salary_warning	     out nocopy boolean,
125   p_approved_warning                 out nocopy boolean,
126   p_payroll_warning                  out nocopy boolean
127   );
128 --
129 -- ----------------------------------------------------------------------------
130 -- |---------------------------------< upd >----------------------------------|
131 -- ----------------------------------------------------------------------------
132 -- {Start Of Comments}
133 --
134 -- Description:
135 --   This procedure is the attribute interface for the update
136 --   process for the specified entity and is the outermost layer. The role
137 --   of this process is to update a fully validated row into the HR schema
138 --   passing back to the calling process, any system generated values
139 --   (e.g. object version number attributes). The processing of this
140 --   procedure is as follows:
141 --   1) The attributes are converted into a local record structure by
142 --      calling the convert_defs function.
143 --   2) After the conversion has taken place, the corresponding record upd
144 --      interface process is executed.
145 --   3) OUT parameters are then set to their corresponding record attributes.
146 --
147 -- Pre Conditions:
148 --
149 -- In Parameters:
150 --   p_validate
151 --     Determines if the process is to be validated. Setting this
152 --     Boolean value to true will invoke the process to be validated.
153 --     The default is false.
154 --
155 -- Post Success:
156 --   A fully validated row will be updated for the specified entity
157 --   without being committed (or rollbacked depending on the p_validate
158 --   status).
159 --
160 -- Post Failure:
161 --   If an error has occurred, an error message will be supplied with the work
162 --   rolled back.
163 --
164 -- Developer Implementation Notes:
165 --   None.
166 --
167 -- Access Status:
168 --   Internal Development Use Only.
169 --
170 -- {End Of Comments}
171 -- ----------------------------------------------------------------------------
172 Procedure upd
173   (
174   p_pay_proposal_id              in number,
175   p_change_date                  in date             default hr_api.g_date,
176   p_comments                     in varchar2         default hr_api.g_varchar2,
177   p_next_sal_review_date         in date             default hr_api.g_date,
178   p_proposal_reason              in varchar2         default hr_api.g_varchar2,
179   p_proposed_salary_n            in number           default hr_api.g_number,
180   p_forced_ranking               in number           default hr_api.g_number,
181   p_date_to			 in date	     default hr_api.g_date,
182   p_performance_review_id        in number           default hr_api.g_number,
183   p_attribute_category           in varchar2         default hr_api.g_varchar2,
184   p_attribute1                   in varchar2         default hr_api.g_varchar2,
185   p_attribute2                   in varchar2         default hr_api.g_varchar2,
186   p_attribute3                   in varchar2         default hr_api.g_varchar2,
187   p_attribute4                   in varchar2         default hr_api.g_varchar2,
188   p_attribute5                   in varchar2         default hr_api.g_varchar2,
189   p_attribute6                   in varchar2         default hr_api.g_varchar2,
190   p_attribute7                   in varchar2         default hr_api.g_varchar2,
191   p_attribute8                   in varchar2         default hr_api.g_varchar2,
192   p_attribute9                   in varchar2         default hr_api.g_varchar2,
193   p_attribute10                  in varchar2         default hr_api.g_varchar2,
194   p_attribute11                  in varchar2         default hr_api.g_varchar2,
195   p_attribute12                  in varchar2         default hr_api.g_varchar2,
196   p_attribute13                  in varchar2         default hr_api.g_varchar2,
197   p_attribute14                  in varchar2         default hr_api.g_varchar2,
198   p_attribute15                  in varchar2         default hr_api.g_varchar2,
199   p_attribute16                  in varchar2         default hr_api.g_varchar2,
200   p_attribute17                  in varchar2         default hr_api.g_varchar2,
201   p_attribute18                  in varchar2         default hr_api.g_varchar2,
202   p_attribute19                  in varchar2         default hr_api.g_varchar2,
203   p_attribute20                  in varchar2         default hr_api.g_varchar2,
204   p_object_version_number        in out nocopy number,
205   p_multiple_components          in varchar2         default hr_api.g_varchar2,
206   p_approved                     in varchar2         default hr_api.g_varchar2,
207   p_validate                     in boolean          default false,
208   p_inv_next_sal_date_warning    out nocopy boolean,
209   p_proposed_salary_warning	 out nocopy boolean,
210   p_approved_warning             out nocopy boolean,
211   p_payroll_warning              out nocopy boolean
212   );
213 --
214 end per_pyp_upd;