DBA Data[Home] [Help]

PACKAGE: APPS.PAY_RAN_SHD

Source


1 Package pay_ran_shd as
2 /* $Header: pyranrhi.pkh 120.1 2007/02/10 09:21:22 vetsrini noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (range_id                        number(10)
10   ,range_table_id                  number(10)
11   ,low_band                        number(9)         -- Increased length
12   ,high_band                       number(9)         -- Increased length
13   ,amount1                         number(9)         -- Increased length
14   ,amount2                         number(9)         -- Increased length
15   ,amount3                         number(9)         -- Increased length
16   ,amount4                         number(9)         -- Increased length
17   ,amount5                         number(9)         -- Increased length
18   ,amount6                         number(9)         -- Increased length
19   ,amount7                         number(9)         -- Increased length
20   ,amount8                         number(9)         -- Increased length
21   ,effective_start_date            date
22   ,effective_end_date              date
23   ,object_version_number           number(9)
24   );
25 --
26 -- ----------------------------------------------------------------------------
27 -- |           Global Definitions - Internal Development Use Only             |
28 -- ----------------------------------------------------------------------------
29 --
30 g_old_rec  g_rec_type;                            -- Global record definition
31 -- Global table name
32 g_tab_nam  constant varchar2(30) := 'PAY_RANGES_F';
33 --
34 -- ----------------------------------------------------------------------------
35 -- |---------------------------< constraint_error >---------------------------|
36 -- ----------------------------------------------------------------------------
37 -- {Start Of Comments}
38 --
39 -- Description:
40 --   This procedure is called when a constraint has been violated (i.e.
41 --   The exception hr_api.check_integrity_violated,
42 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
43 --   hr_api.unique_integrity_violated has been raised).
44 --   The exceptions can only be raised as follows:
45 --   1) A check constraint can only be violated during an INSERT or UPDATE
46 --      dml operation.
47 --   2) A parent integrity constraint can only be violated during an
48 --      INSERT or UPDATE dml operation.
49 --   3) A child integrity constraint can only be violated during an
50 --      DELETE dml operation.
51 --   4) A unique integrity constraint can only be violated during INSERT or
52 --      UPDATE dml operation.
53 --
54 -- Prerequisites:
55 --   1) Either hr_api.check_integrity_violated,
56 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
57 --      hr_api.unique_integrity_violated has been raised with the subsequent
58 --      stripping of the constraint name from the generated error message
59 --      text.
60 --   2) Standalone validation test which corresponds with a constraint error.
61 --
62 -- In Parameter:
63 --   p_constraint_name is in upper format and is just the constraint name
64 --   (e.g. not prefixed by brackets, schema owner etc).
65 --
66 -- Post Success:
67 --   Development dependant.
68 --
69 -- Post Failure:
70 --   Developement dependant.
71 --
72 -- Developer Implementation Notes:
73 --   For each constraint being checked the hr system package failure message
74 --   has been generated as a template only. These system error messages should
75 --   be modified as required (i.e. change the system failure message to a user
76 --   friendly defined error message).
77 --
78 -- Access Status:
79 --   Internal Development Use Only.
80 --
81 -- {End Of Comments}
82 -- ----------------------------------------------------------------------------
83 Procedure constraint_error
84   (p_constraint_name in all_constraints.constraint_name%TYPE);
85 --
86 -- ----------------------------------------------------------------------------
87 -- |-----------------------------< api_updating >-----------------------------|
88 -- ----------------------------------------------------------------------------
89 --  {Start Of Comments}
90 --
91 -- Description:
92 --   This function is used to populate the g_old_rec record with the
93 --   current row from the database for the specified primary key
94 --   provided that the primary key exists and is valid and does not
95 --   already match the current g_old_rec. The function will always return
96 --   a TRUE value if the g_old_rec is populated with the current row.
97 --   A FALSE value will be returned if all of the primary key arguments
98 --   are null.
99 --
100 -- Prerequisites:
101 --   None.
102 --
103 -- In Parameters:
104 --
105 -- Post Success:
106 --   A value of TRUE will be returned indiciating that the g_old_rec
107 --   is current.
108 --   A value of FALSE will be returned if all of the primary key arguments
109 --   have a null value (this indicates that the row has not be inserted into
110 --   the Schema), and therefore could never have a corresponding row.
111 --
112 -- Post Failure:
113 --   A failure can only occur under two circumstances:
114 --   1) The primary key is invalid (i.e. a row does not exist for the
115 --      specified primary key values).
116 --   2) If an object_version_number exists but is NOT the same as the current
117 --      g_old_rec value.
118 --
119 -- Developer Implementation Notes:
120 --   None.
121 --
122 -- Access Status:
123 --   Internal Development Use Only.
124 --
125 -- {End Of Comments}
126 -- ----------------------------------------------------------------------------
127 Function api_updating
128   (p_range_id                             in     number
129   ,p_object_version_number                in     number
130   )      Return Boolean;
131 --
132 -- ----------------------------------------------------------------------------
133 -- |---------------------------------< lck >----------------------------------|
134 -- ----------------------------------------------------------------------------
135 -- {Start of comments}
136 --
137 -- Description:
138 --   The Lck process has two main functions to perform. Firstly, the row to be
139 --   updated or deleted must be locked. The locking of the row will only be
140 --   successful if the row is not currently locked by another user.
141 --   Secondly, during the locking of the row, the row is selected into
142 --   the g_old_rec data structure which enables the current row values from
143 --   the server to be available to the api.
144 --
145 -- Prerequisites:
146 --   When attempting to call the lock the object version number (if defined)
147 --   is mandatory.
148 --
149 -- In Parameters:
150 --   The arguments to the Lck process are the primary key(s) which uniquely
151 --   identify the row and the object version number of row.
152 --
153 -- Post Success:
154 --   On successful completion of the Lck process the row to be updated or
155 --   deleted will be locked and selected into the global data structure
156 --   g_old_rec.
157 --
158 -- Post Failure:
159 --   The Lck process can fail for three reasons:
160 --   1) When attempting to lock the row the row could already be locked by
161 --      another user. This will raise the HR_Api.Object_Locked exception.
162 --   2) The row which is required to be locked doesn't exist in the HR Schema.
163 --      This error is trapped and reported using the message name
164 --      'HR_7220_INVALID_PRIMARY_KEY'.
165 --   3) The row although existing in the HR Schema has a different object
166 --      version number than the object version number specified.
167 --      This error is trapped and reported using the message name
168 --      'HR_7155_OBJECT_INVALID'.
169 --
170 -- Developer Implementation Notes:
171 --   For each primary key and the object version number arguments add a
172 --   call to hr_api.mandatory_arg_error procedure to ensure that these
173 --   argument values are not null.
174 --
175 -- Access Status:
176 --   Internal Development Use Only.
177 --
178 -- {End of comments}
179 -- ----------------------------------------------------------------------------
180 Procedure lck
181   (p_range_id                             in     number
182   ,p_object_version_number                in     number
183   );
184 --
185 -- ----------------------------------------------------------------------------
186 -- |-----------------------------< convert_args >-----------------------------|
187 -- ----------------------------------------------------------------------------
188 -- {Start Of Comments}
189 --
190 -- Description:
191 --   This function is used to turn attribute parameters into the record
192 --   structure parameter g_rec_type.
193 --
194 -- Prerequisites:
195 --   This is a private function and can only be called from the ins or upd
196 --   attribute processes.
197 --
198 -- In Parameters:
199 --
200 -- Post Success:
201 --   A returning record structure will be returned.
202 --
203 -- Post Failure:
204 --   No direct error handling is required within this function.  Any possible
205 --   errors within this function will be a PL/SQL value error due to
206 --   conversion of datatypes or data lengths.
207 --
208 -- Developer Implementation Notes:
209 --   None.
210 --
211 -- Access Status:
212 --   Internal Row Handler Use Only.
213 --
214 -- {End Of Comments}
215 -- ----------------------------------------------------------------------------
216 Function convert_args
217   (p_range_id                       in number
218   ,p_range_table_id                 in number
219   ,p_low_band                       in number
220   ,p_high_band                      in number
221   ,p_amount1                        in number
222   ,p_amount2                        in number
223   ,p_amount3                        in number
224   ,p_amount4                        in number
225   ,p_amount5                        in number
226   ,p_amount6                        in number
227   ,p_amount7                        in number
228   ,p_amount8                        in number
229   ,p_effective_start_date           in date
230   ,p_effective_end_date             in date
231   ,p_object_version_number          in number
232   )
233   Return g_rec_type;
234 --
235 end pay_ran_shd;