1 Package per_prt_bus as
2 /* $Header: peprtrhi.pkh 120.1 2006/02/13 14:11:14 vbala noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- cascade delete rquires objective record structure
6 -- ----------------------------------------------------------------------------
7 --
8 -- flemonni start of changes 10-Aug-98
9 -- modifications to implement cascade delete logic
10 --
11 TYPE r_objpr_rec
12 IS RECORD
13 ( performance_rating_id NUMBER
14 , object_version_number NUMBER
15 );
16 -- ----------------------------------------------------------------------------
17 -- ----------------------------------------------------------------------------
18 -- |---------------------------< Get_PR_Data >--------------------------------|
19 -- ----------------------------------------------------------------------------
20 -- {Start Of Comments}
21 --
22 -- Description:
23 -- Retrieves the performance rating and object version number of the
24 -- given objective_id
25 --
26 -- Pre Conditions:
27 -- This procedure is called from the per_objectives api
28 --
29 -- In Parameters:
30 -- An objective id
31 --
32 -- Post Success:
33 -- a performance rating and object version number are returned
34 --
35 -- Post Failure:
36 -- no values are returned
37 --
38 -- Developer Implementation Notes:
39 --
40 -- Access Status:
41 -- HR Development Use only
42 --
43 -- {End Of Comments}
44 -- ----------------------------------------------------------------------------
45 FUNCTION Get_PR_Data
46 ( p_objective_id IN per_objectives.objective_id%TYPE
47 )
48 RETURN r_objpr_rec;
49 -- ----------------------------------------------------------------------------
50 -- row handler chk_ procedures externalized and modified to ensure
51 -- correct behaviour (api_updating)
52 -- ----------------------------------------------------------------------------
53 -- ----------------------------------------------------------------------------
54 -- |---------------------------< chk_appraisal_id >---------------------------|
55 -- ----------------------------------------------------------------------------
56 -- {Start Of Comments}
57 -- comments in package body
58 --
59 -- Access Status:
60 -- HR Development Use Only
61 --
62 -- {End Of Comments}
63 -- ----------------------------------------------------------------------------
64 procedure chk_appraisal_id
65 ( p_appraisal_id in per_performance_ratings.appraisal_id%TYPE
66 , p_performance_rating_id in
67 per_performance_ratings.performance_rating_id%TYPE
68 ,p_object_version_number in
69 per_performance_ratings.object_version_number%TYPE
70 );
71 -- ----------------------------------------------------------------------------
72 -- |---------------------------< chk_objective_id >---------------------------|
73 -- ----------------------------------------------------------------------------
74 -- {Start Of Comments}
75 -- comments in package body
76 --
77 -- Access Status:
78 -- HR Development Use Only
79 --
80 -- {End Of Comments}
81 -- ----------------------------------------------------------------------------
82 procedure chk_objective_id
83 ( p_objective_id in per_performance_ratings.objective_id%TYPE
84 , p_appraisal_id in per_performance_ratings.appraisal_id%TYPE
85 , p_performance_rating_id in
86 per_performance_ratings.performance_rating_id%TYPE
87 ,p_object_version_number in
88 per_performance_ratings.object_version_number%TYPE
89 );
90 -- ----------------------------------------------------------------------------
91 -- |---------------------------< chk_performance_level_id >-------------------|
92 -- ----------------------------------------------------------------------------
93 -- {Start Of Comments}
94 -- comments in package body
95 --
96 -- Access Status:
97 -- HR Development Use Only
98 --
99 -- {End Of Comments}
100 -- ----------------------------------------------------------------------------
101 procedure chk_performance_level_id
102 ( p_performance_rating_id in
103 per_performance_ratings.performance_rating_id%TYPE
104 , p_performance_level_id in
105 per_performance_ratings.performance_level_id%TYPE
106 , p_appraisal_id in
107 per_performance_ratings.appraisal_id%TYPE
108 ,p_object_version_number in
109 per_performance_ratings.object_version_number%TYPE);
110 -- ----------------------------------------------------------------------------
111 -- |---------------------------< insert_validate >----------------------------|
112 -- ----------------------------------------------------------------------------
113 -- {Start Of Comments}
114 --
115 -- Description:
116 -- This procedure controls the execution of all insert business rules
117 -- validation.
118 --
119 -- Pre Conditions:
120 -- This private procedure is called from ins procedure.
121 --
122 -- In Parameters:
123 -- A Pl/Sql record structure.
124 -- The effective date.
125 --
126 -- Post Success:
127 -- Processing continues.
128 --
129 -- Post Failure:
130 -- If a business rules fails the error will not be handled by this procedure
131 -- unless explicity coded.
132 --
133 -- Developer Implementation Notes:
134 -- For insert, your business rules should be executed from this procedure and
135 -- should ideally (unless really necessary) just be straight procedure or
136 -- function calls. Try and avoid using conditional branching logic.
137 --
138 -- Access Status:
139 -- Internal Table Handler Use Only.
140 --
141 -- {End Of Comments}
142 -- ----------------------------------------------------------------------------
143 Procedure insert_validate(p_rec in per_prt_shd.g_rec_type, p_effective_date in date);
144 --
145 -- ----------------------------------------------------------------------------
146 -- |---------------------------< update_validate >----------------------------|
147 -- ----------------------------------------------------------------------------
148 -- {Start Of Comments}
149 --
150 -- Description:
151 -- This procedure controls the execution of all update business rules
152 -- validation.
153 --
154 -- Pre Conditions:
155 -- This private procedure is called from upd procedure.
156 --
157 -- In Parameters:
158 -- A Pl/Sql record structure.
159 -- The effective date.
160 --
161 -- Post Success:
162 -- Processing continues.
163 --
164 -- Post Failure:
165 -- If a business rules fails the error will not be handled by this procedure
166 -- unless explicity coded.
167 --
168 -- Developer Implementation Notes:
169 -- For update, your business rules should be executed from this procedure and
170 -- should ideally (unless really necessary) just be straight procedure or
171 -- function calls. Try and avoid using conditional branching logic.
172 --
173 -- Access Status:
174 -- Internal Table Handler Use Only.
175 --
176 -- {End Of Comments}
177 -- ----------------------------------------------------------------------------
178 Procedure update_validate(p_rec in per_prt_shd.g_rec_type, p_effective_date in date);
179 --
180 -- ----------------------------------------------------------------------------
181 -- |---------------------------< delete_validate >----------------------------|
182 -- ----------------------------------------------------------------------------
183 -- {Start Of Comments}
184 --
185 -- Description:
186 -- This procedure controls the execution of all delete business rules
187 -- validation.
188 --
189 -- Pre Conditions:
190 -- This private procedure is called from del procedure.
191 --
192 -- In Parameters:
193 -- A Pl/Sql record structre.
194 --
195 -- Post Success:
196 -- Processing continues.
197 --
198 -- Post Failure:
199 -- If a business rules fails the error will not be handled by this procedure
200 -- unless explicity coded.
201 --
202 -- Developer Implementation Notes:
203 -- For delete, your business rules should be executed from this procedure and
204 -- should ideally (unless really necessary) just be straight procedure or
205 -- function calls. Try and avoid using conditional branching logic.
206 --
207 -- Access Status:
208 -- Internal Table Handler Use Only.
209 --
210 -- {End Of Comments}
211 -- ----------------------------------------------------------------------------
212 Procedure delete_validate(p_rec in per_prt_shd.g_rec_type);
213 --
214 -- ----------------------------------------------------------------------------
215 -- |----------------------< return_legislation_code >--------------------------|
216 -- ----------------------------------------------------------------------------
217 -- {Start Of Comments}
218 --
219 -- Description:
220 -- This function gets the legislation code
221 --
222 -- Pre Conditions:
223 -- This private procedure will be called from the user hook procedures.
224 --
225 -- In Parameters:
226 -- the primary key of the table (per_performance_ratings)
227 --
228 -- Post Success:
229 -- Processing continues.
230 --
231 -- Post Failure:
232 -- If the legislation code is not found then it errors out
233 --
234 -- Developer Implementation Notes:
235 --
236 -- Access Status:
237 -- Internal Table Handler Use Only.
238 --
239 -- {End Of Comments}
240 --
241 Function return_legislation_code (
242 p_performance_rating_id in number)
243 return varchar2;
244 --
245 --
246 end per_prt_bus;