DBA Data[Home] [Help]

PACKAGE: APPS.HR_QSN_BUS

Source


1 Package hr_qsn_bus as
2 /* $Header: hrqsnrhi.pkh 120.1.12010000.3 2008/11/05 10:22:27 rsykam ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |------------------------< set_security_group_id >-------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   Sets the security_group_id in CLIENT_INFO for the questionnaires business
11 --   group context.
12 --
13 -- Prerequisites:
14 --   None,
15 --
16 -- In Parameters:
17 --   Name                           Reqd Type     Description
18 --   p_questionnaire_template_id    Yes  Number   questionnaire to use for
19 --                                                deriving the security group
20 --                                                context.
21 --
22 -- Post Success:
23 --   The security_group_id will be set in CLIENT_INFO.
24 --
25 -- Post Failure:
26 --   An error is raised if the questionnaire does not exist.
27 --
28 -- Access Status:
29 --   Internal Development Use Only.
30 --
31 -- {End Of Comments}
32 --
33 procedure set_security_group_id
34   (p_questionnaire_template_id            in number
35   ,p_associated_column1                   in varchar2 default null
36   );
37 --
38 --
39 -- --------------------------------------------------------------------------
40 -- |------------------------< chk_name >------------------------------------|
41 -- --------------------------------------------------------------------------
42 --
43 -- Description:
44 --      Validates that name is not null, and that it is unique for the
45 --      given business group id.
46 --
47 -- Pre-requisites:
48 --      The business group id is valid.
49 --
50 -- IN Parameters:
51 --      p_name
52 --      p_business_group_id
53 --
54 -- Post Success:
55 --      Processing continues if the name is valid.
56 --
57 -- Post Failure:
58 --      An application error is raised and processing is terminated if the
59 --      name is invalid
60 --
61 -- Developer/Implementation Notes:
62 --      None.
63 --
64 -- Access Status:
65 --      Internal Development Use Only.
66 --
67 Procedure chk_name
68   (p_name               in      hr_questionnaires.name%TYPE
69   ,p_business_group_id  in      hr_questionnaires.name%TYPE
70   );
71 --
72 -- ---------------------------------------------------------------------------
73 -- |----------------------------< chk_text >---------------------------------|
74 -- ---------------------------------------------------------------------------
75 --
76 -- Description:
77 --   Validates that text is not null.
78 --
79 -- Pre-requisites:
80 --   None.
81 --
82 -- IN Parameters:
83 --   p_text
84 --
85 -- Post Success:
86 --   Processing continues if the text is valid.
87 --
88 -- Post Failure:
89 --   An application error is raised and processing is terminated if the text
90 --   is invalid.
91 --
92 -- Developer/Implementation Notes:
93 --   None.
94 --
95 -- Access Status:
96 --   Internal Development Use Only.
97 --
98 Procedure chk_text
99   (p_text               in      hr_questionnaires.text%TYPE
100   );
101 --
102 -- ----------------------------------------------------------------------------
103 -- |--------------------------< chk_available_flag >--------------------------|
104 -- ----------------------------------------------------------------------------
105 --
106 -- Description:
107 --   On insert, this checks that the available flag is 'N'.
108 --
109 --   On update, this procedure checks the validity of the available_flag
110 --   column, against the HR_LOOKUPS table, where the lookup type is YES_NO.
111 --
112 -- Prerequisites:
113 --   None.
114 --
115 -- In Parameters:
116 --   p_available_flag
117 --   p_effective_date
118 --   p_questionnaire_template_id
119 --   p_object_version_number
120 --
121 -- Post Success:
122 --   Processing continues.
123 --
124 -- Post Failure:
125 --   An application error is raised and processing is terminated if the
126 --   available_flag is invalid.
127 --
128 -- Developer Implementation Notes:
129 --   This procedure should be available from a direct call.
130 --
131 -- Access Status:
132 --   Internal Development Use Only.
133 --
134 Procedure chk_available_flag
135   (p_available_flag  in hr_questionnaires.available_flag%TYPE
136   ,p_effective_date   in date
137   ,p_questionnaire_template_id in hr_questionnaires.questionnaire_template_id%TYPE
138   ,p_object_version_number in hr_questionnaires.object_version_number%TYPE
139   );
140 --
141 -- ----------------------------------------------------------------------------
142 -- |------------------------< chk_row_delete >--------------------------------|
143 -- ----------------------------------------------------------------------------
144 --
145 -- Description:
146 --   This procedure validates that a row can be deleted, by ensuring that
147 --   no child rows exist in HR_QUEST_FIELDS.
148 --
149 -- Pre-requisites:
150 --   None.
151 --
152 -- IN Parameters:
153 --   p_questionnaire_template_id
154 --
155 -- Post Success:
156 --   Processing continues, and the row is deleted.
157 --
158 -- Post Failure:
159 --   An application error is raised, and processing terminated if a child row
160 --   exists, and the row may not be deleted.
161 --
162 -- Developer/Implementation Notes:
163 --   None.
164 --
165 -- Access Status:
166 --   Internal Development Use Only.
167 --
168 -- ----------------------------------------------------------------------------
169 procedure chk_row_delete
170   (p_questionnaire_template_id in hr_questionnaires.questionnaire_template_id%TYPE);
171 --
172 
173 --
174 -- ----------------------------------------------------------------------------
175 -- |---------------------------< insert_validate >----------------------------|
176 -- ----------------------------------------------------------------------------
177 -- {Start Of Comments}
178 --
179 -- Description:
180 --   This procedure controls the execution of all insert business rules
181 --   validation.
182 --
183 -- Prerequisites:
184 --   This private procedure is called from ins procedure.
185 --
186 -- In Parameters:
187 --   A Pl/Sql record structre.
188 --
189 -- Post Success:
190 --   Processing continues.
191 --
192 -- Post Failure:
193 --   If a business rule fails the error will not be handled by this procedure
194 --   unless explicity coded.
195 --
196 -- Developer Implementation Notes:
197 --   For insert, your business rules should be executed from this procedure and
198 --   should ideally (unless really necessary) just be straight procedure or
199 --   function calls. Try and avoid using conditional branching logic.
200 --
201 -- Access Status:
202 --   Internal Row Handler Use Only.
203 --
204 -- {End Of Comments}
205 -- ----------------------------------------------------------------------------
206 Procedure insert_validate(p_rec in hr_qsn_shd.g_rec_type
207        ,p_effective_date in date
208        );
209 --
210 -- ----------------------------------------------------------------------------
211 -- |---------------------------< update_validate >----------------------------|
212 -- ----------------------------------------------------------------------------
213 -- {Start Of Comments}
214 --
215 -- Description:
216 --   This procedure controls the execution of all update business rules
217 --   validation.
218 --
219 -- Prerequisites:
220 --   This private procedure is called from upd procedure.
221 --
222 -- In Parameters:
223 --   A Pl/Sql record structre.
224 --
225 -- Post Success:
226 --   Processing continues.
227 --
228 -- Post Failure:
229 --   If a business rules fails the error will not be handled by this procedure
230 --   unless explicity coded.
231 --
232 -- Developer Implementation Notes:
233 --   For update, your business rules should be executed from this procedure and
234 --   should ideally (unless really necessary) just be straight procedure or
235 --   function calls. Try and avoid using conditional branching logic.
236 --
237 -- Access Status:
238 --   Internal Row Handler Use Only.
239 --
240 -- {End Of Comments}
241 -- ----------------------------------------------------------------------------
242 Procedure update_validate(p_rec in hr_qsn_shd.g_rec_type
243        ,p_effective_date in date
244        );
245 --
246 -- ----------------------------------------------------------------------------
247 -- |---------------------------< delete_validate >----------------------------|
248 -- ----------------------------------------------------------------------------
249 -- {Start Of Comments}
250 --
251 -- Description:
252 --   This procedure controls the execution of all delete business rules
253 --   validation.
254 --
255 -- Prerequisites:
256 --   This private procedure is called from del procedure.
257 --
258 -- In Parameters:
259 --   A Pl/Sql record structre.
260 --
261 -- Post Success:
262 --   Processing continues.
263 --
264 -- Post Failure:
265 --   If a business rules fails the error will not be handled by this procedure
266 --   unless explicity coded.
267 --
268 -- Developer Implementation Notes:
269 --   For delete, your business rules should be executed from this procedure and
270 --   should ideally (unless really necessary) just be straight procedure or
271 --   function calls. Try and avoid using conditional branching logic.
272 --
273 -- Access Status:
274 --   Internal Row Handler Use Only.
275 --
276 -- {End Of Comments}
277 -- ----------------------------------------------------------------------------
278 Procedure delete_validate(p_rec in hr_qsn_shd.g_rec_type);
279 --
280 --
281 -- ----------------------------------------------------------------------------
282 -- |-----------------< return_legislation_code >------------------------------|
283 -- ----------------------------------------------------------------------------
284 --
285 Function return_legislation_code
286    (p_questionnaire_template_id in hr_questionnaires.questionnaire_template_id%TYPE
287    ) return varchar2;
288 --
289 end hr_qsn_bus;