DBA Data[Home] [Help]

PACKAGE: APPS.PAY_GRR_UPD

Source


1 Package pay_grr_upd AUTHID CURRENT_USER as
2 /* $Header: pygrrrhi.pkh 115.3 2002/12/10 09:48:11 pkakar ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------------< upd >----------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   This procedure is the record interface for the update business
11 --   process for the specified entity. The role of this process is
12 --   to perform the datetrack update mode, fully validating the row
13 --   for the HR schema passing back to the calling process, any system
14 --   generated values (e.g. object version number attribute). This process
15 --   is the main backbone of the upd business process. The processing of
16 --   this procedure is as follows:
17 --   1) Ensure that the datetrack update mode is valid.
18 --   2) If the p_validate argument has been set to true then a savepoint
19 --      is issued.
20 --   3) The row to be updated is then locked and selected into the record
21 --      structure g_old_rec.
22 --   4) Because on update arguments 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 arguments to their corresponding
25 --      value.
26 --   5) The controlling validation process update_validate is then executed
27 --      which will execute all private and public validation business rule
28 --      processes.
29 --   6) The pre_update business process is then executed which enables any
30 --      logic to be processed before the update dml process is executed.
31 --   7) The update_dml process will physical perform the update dml into the
32 --      specified entity.
33 --   8) The post_update business process is then executed which enables any
34 --      logic to be processed after the update dml process.
35 --   9) If the p_validate argument 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 arguments to the business process have to be in the record
41 --   format. The following attributes in p_rec are mandatory:
42 --   business_group_id, grade_or_spinal_point_id, rate_id and rate_type.
43 --
44 -- In Arguments:
45 --   p_effective_date
46 --     Specifies the date of the datetrack update operation.
47 --   p_datetrack_mode
48 --     Determines the datetrack update mode.
49 --   p_validate
50 --     Determines if the business process is to be validated. Setting this
51 --     boolean value to true will invoke the process to be validated. The
52 --     default is false. The validation is controlled by a savepoint and
53 --     rollback mechanism. The savepoint is issued at the beginning of the
54 --     business process and is rollbacked at the end of the business process
55 --     when all the processing has been completed. The rollback is controlled
56 --     by raising and handling the exception hr_api.validate_enabled. We use
57 --     the exception because, by raising the exception with the business
58 --     process, we can exit successfully without having any of the 'OUT'
59 --     arguments being set.
60 --
61 -- Post Success:
62 --   The specified row will be fully validated and datetracked updated for
63 --   the specified entity without being committed for the datetrack mode. If
64 --   the p_validate argument has been set to true then all the work will be
65 --   rolled back.
66 --   p_rec.object_version_number will be set with the new object_version_number
67 --   for the grade rule record.
68 --
69 -- Post Failure:
70 --   If an error has occurred, an error message will be supplied with the work
71 --   rolled back. A failure will occur if any of the following business rules/
72 --   conditions are found:
73 --     1) The mandatory arguments have not been set.
74 --     2) The p_rec.maximum value is less than the p_rec.minimum value.
75 --     3) The p_rec.maximum value is less than the p_rec.minimum value.
76 --     4) The p_rec.mid_value value is less than the p_rec.minimum value.
77 --     5) The p_rec.mid_value value is greater than the p_rec.maximum value.
78 --     6) The p_rec.minimum value is greater than the p_rec.value value.
79 --     7) The p_rec.value value is greater than the p_rec.maximum value.
80 --     8) An attempt is made to update on of the following attributes:
81 --        p_rec.grade_rule_id, p_rec.business_group_id,
82 --        p_rec.grade_or_spinal_point_id, p_rec.rate_id and p_rec.rate_type.
83 --
84 -- Access Status:
85 --   Internal Development Use Only.
86 --
87 -- {End Of Comments}
88 -- ----------------------------------------------------------------------------
89 Procedure upd
90   (
91   p_rec			in out nocopy 	pay_grr_shd.g_rec_type,
92   p_effective_date	in 	date,
93   p_datetrack_mode	in 	varchar2,
94   p_validate		in 	boolean default false
95   );
96 --
97 -- ----------------------------------------------------------------------------
98 -- |---------------------------------< upd >----------------------------------|
99 -- ----------------------------------------------------------------------------
100 -- {Start Of Comments}
101 --
102 -- Description:
103 --   This procedure is the attribute interface for the datetrack update
104 --   business process for the specified entity and is the outermost layer.
105 --   The role of this process is to update a fully validated row into the
106 --   HR schema passing back to the calling process, any system generated
107 --   values (e.g. object version number attributes).The processing of this
108 --   procedure is as follows:
109 --   1) The attributes are converted into a local record structure by
110 --      calling the convert_defs function.
111 --   2) After the conversion has taken place, the corresponding record upd
112 --      interface business process is executed.
113 --   3) OUT arguments are then set to their corresponding record arguments.
114 --
115 -- Pre Conditions:
116 --   Refer to the upd record interface for details.
117 --
118 -- In Arguments:
119 --   p_effective_date
120 --     Specifies the date of the datetrack update operation.
121 --   p_datetrack_mode
122 --     Determines the datetrack update mode.
123 --   p_validate
124 --     Determines if the business process is to be validated. Setting this
125 --     Boolean value to true will invoke the process to be validated.
126 --     The default is false.
127 --
128 -- Post Success:
129 --   A fully validated row will be updated for the specified entity
130 --   without being committed (or rollbacked depending on the p_validate
131 --   status).
132 --   p_object_version_number will be set with the new object_version_number
133 --   for the grade rule record.
134 --
135 -- Post Failure:
136 --   If an error has occurred, an error message will be supplied with the work
137 --   rolled back. Refer to the upd record interface for details of possible
138 --   failures.
139 --
140 -- Developer Implementation Notes:
141 --   None.
142 --
143 -- Access Status:
144 --   Internal Development Use Only.
145 --
146 -- {End Of Comments}
147 -- ----------------------------------------------------------------------------
148 Procedure upd
149   (
150   p_grade_rule_id                in number,
151   p_effective_start_date         out nocopy date,
152   p_effective_end_date           out nocopy date,
153   p_maximum                      in varchar2         default hr_api.g_varchar2,
154   p_mid_value                    in varchar2         default hr_api.g_varchar2,
155   p_minimum                      in varchar2         default hr_api.g_varchar2,
156   p_value                        in varchar2         default hr_api.g_varchar2,
157   p_request_id                   in number           default hr_api.g_number,
158   p_program_application_id       in number           default hr_api.g_number,
159   p_program_id                   in number           default hr_api.g_number,
160   p_program_update_date          in date             default hr_api.g_date,
161   p_object_version_number        in out nocopy number,
162   p_effective_date		 in date,
163   p_datetrack_mode		 in varchar2,
164   p_validate			 in boolean      default false,
165   p_currency_code                in varchar2     default hr_api.g_varchar2
166   );
167 --
168 end pay_grr_upd;