1 Package per_chk_upd as
2 /* $Header: pechkrhi.pkh 120.0 2005/05/31 06:41:48 appldev noship $ */
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_chk_shd.g_rec_type);
48 --
49 --
50 -- ----------------------------------------------------------------------------
51 -- |---------------------------------< upd >----------------------------------|
52 -- ----------------------------------------------------------------------------
53 -- {Start Of Comments}
54 --
55 -- Description:
56 -- This procedure is the record interface for the update
57 -- process for the specified entity. The role of this process is
58 -- to update a fully validated row for the HR schema passing back
59 -- to the calling process, any system generated values (e.g.
60 -- object version number attribute). This process is the main
61 -- backbone of the upd business process. The processing of this
62 -- procedure is as follows:
63 -- 1) The row to be updated is locked and selected into the record
64 -- structure g_old_rec.
65 -- 2) Because on update parameters which are not part of the update do not
66 -- have to be defaulted, we need to build up the updated row by
67 -- converting any system defaulted parameters to their corresponding
68 -- value.
69 -- 3) The controlling validation process update_validate is then executed
70 -- which will execute all private and public validation business rule
71 -- processes.
72 -- 4) The pre_update process is then executed which enables any
73 -- logic to be processed before the update dml process is executed.
74 -- 5) The update_dml process will physical perform the update dml into the
75 -- specified entity.
76 -- 6) The post_update process is then executed which enables any
77 -- logic to be processed after the update dml process.
78 --
79 -- Prerequisites:
80 -- The main parameters to the business process have to be in the record
81 -- format.
82 --
83 -- In Parameters:
84 --
85 -- Post Success:
86 -- The specified row will be fully validated and updated for the specified
87 -- entity without being committed.
88 --
89 -- Post Failure:
90 -- If an error has occurred, an error message will be supplied with the work
91 -- rolled back.
92 --
93 -- Developer Implementation Notes:
94 -- None.
95 --
96 -- Access Status:
97 -- Internal Development Use Only.
98 --
99 -- {End Of Comments}
100 -- ----------------------------------------------------------------------------
101 Procedure upd
102 (
103 p_effective_date in date,
104 p_rec in out nocopy per_chk_shd.g_rec_type
105 );
106 --
107 -- ----------------------------------------------------------------------------
108 -- |---------------------------------< upd >----------------------------------|
109 -- ----------------------------------------------------------------------------
110 -- {Start Of Comments}
111 --
112 -- Description:
113 -- This procedure is the attribute interface for the update
114 -- process for the specified entity and is the outermost layer. The role
115 -- of this process is to update a fully validated row into the HR schema
116 -- passing back to the calling process, any system generated values
117 -- (e.g. object version number attributes). The processing of this
118 -- procedure is as follows:
119 -- 1) The attributes are converted into a local record structure by
120 -- calling the convert_args function.
121 -- 2) After the conversion has taken place, the corresponding record upd
122 -- interface process is executed.
123 -- 3) OUT parameters are then set to their corresponding record attributes.
124 --
125 -- Prerequisites:
126 --
127 -- In Parameters:
128 --
129 -- Post Success:
130 -- A fully validated row will be updated for the specified entity
131 -- without being committed.
132 --
133 -- Post Failure:
134 -- If an error has occurred, an error message will be supplied with the work
135 -- rolled back.
136 --
137 -- Developer Implementation Notes:
138 -- None.
139 --
140 -- Access Status:
141 -- Internal Development Use Only.
142 --
143 -- {End Of Comments}
144 -- ----------------------------------------------------------------------------
145 Procedure upd
146 (
147 p_effective_date in date,
148 p_checklist_item_id in number,
149 p_person_id in number default hr_api.g_number,
150 p_item_code in varchar2 default hr_api.g_varchar2,
151 p_date_due in date default hr_api.g_date,
152 p_date_done in date default hr_api.g_date,
153 p_status in varchar2 default hr_api.g_varchar2,
154 p_notes in varchar2 default hr_api.g_varchar2,
155 p_object_version_number in out nocopy number,
156 p_attribute_category in varchar2 default hr_api.g_varchar2,
157 p_attribute1 in varchar2 default hr_api.g_varchar2,
158 p_attribute2 in varchar2 default hr_api.g_varchar2,
159 p_attribute3 in varchar2 default hr_api.g_varchar2,
160 p_attribute4 in varchar2 default hr_api.g_varchar2,
161 p_attribute5 in varchar2 default hr_api.g_varchar2,
162 p_attribute6 in varchar2 default hr_api.g_varchar2,
163 p_attribute7 in varchar2 default hr_api.g_varchar2,
164 p_attribute8 in varchar2 default hr_api.g_varchar2,
165 p_attribute9 in varchar2 default hr_api.g_varchar2,
166 p_attribute10 in varchar2 default hr_api.g_varchar2,
167 p_attribute11 in varchar2 default hr_api.g_varchar2,
168 p_attribute12 in varchar2 default hr_api.g_varchar2,
169 p_attribute13 in varchar2 default hr_api.g_varchar2,
170 p_attribute14 in varchar2 default hr_api.g_varchar2,
171 p_attribute15 in varchar2 default hr_api.g_varchar2,
172 p_attribute16 in varchar2 default hr_api.g_varchar2,
173 p_attribute17 in varchar2 default hr_api.g_varchar2,
174 p_attribute18 in varchar2 default hr_api.g_varchar2,
175 p_attribute19 in varchar2 default hr_api.g_varchar2,
176 p_attribute20 in varchar2 default hr_api.g_varchar2,
177 p_attribute21 in varchar2 default hr_api.g_varchar2,
178 p_attribute22 in varchar2 default hr_api.g_varchar2,
179 p_attribute23 in varchar2 default hr_api.g_varchar2,
180 p_attribute24 in varchar2 default hr_api.g_varchar2,
181 p_attribute25 in varchar2 default hr_api.g_varchar2,
182 p_attribute26 in varchar2 default hr_api.g_varchar2,
183 p_attribute27 in varchar2 default hr_api.g_varchar2,
184 p_attribute28 in varchar2 default hr_api.g_varchar2,
185 p_attribute29 in varchar2 default hr_api.g_varchar2,
186 p_attribute30 in varchar2 default hr_api.g_varchar2
187 );
188 --
189 end per_chk_upd;