DBA Data[Home] [Help]

PACKAGE: APPS.PER_PHN_UPD

Source


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