DBA Data[Home] [Help]

PACKAGE: APPS.HR_QSV_BUS

Source


1 Package hr_qsv_bus as
2 /* $Header: hrqsvrhi.pkh 120.0 2005/05/31 02:31:14 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |-------------------< chk_questionnaire_answer_id >------------------------|
6 -- ----------------------------------------------------------------------------
7 --
8 -- Description:
9 --  This procedure validates that questionnaire_answer_id is not null, and
10 --  that it exists in HR_QUEST_ANSWERS.
11 --
12 -- Pre-requisites:
13 --  None.
14 --
15 -- IN Parameters:
16 --  p_questionnaire_answer_id
17 --
18 -- Post Success:
19 --  Processing cntinues if the questionnaire_answer_id is valid.
20 --
21 -- Post Failure:
22 --  An application error is raised, and processing is terminated if the
23 --  questionnaire_answer_id is invalid.
24 --
25 -- Developer/Implementation Notes:
26 --  This procedure also populates g_questionnaire_template_id, which is
27 --  used in a later chk procedure to ensure the field is part of the
28 --  questionnaire being answered.
29 --
30 -- Access Status:
31 --  Internal Development Use Only
32 -- ----------------------------------------------------------------------------
33 procedure chk_questionnaire_answer_id
34   (p_questionnaire_answer_id
35      in hr_quest_answer_values.questionnaire_answer_id%TYPE
36   );
37 --
38 -- ----------------------------------------------------------------------------
39 -- |----------------------------< chk_field_id >------------------------------|
40 -- ----------------------------------------------------------------------------
41 --
42 -- Description:
43 --  This procedure validates the field_id, by ensuring that the field_id exists
44 --  in HR_QUEST_FIELDS.  Also checks that it is unique for the given
45 --  questionnaire_answer_id, and that the field is part of the questionnaire
46 --  being answered.
47 --
48 -- Pre-requisites:
49 --  chk_questionnaire_answer_id has been called.
50 --
51 -- IN Parameters:
52 --   p_field_id
53 --   p_questionnaire_answer_id
54 --
55 -- Post Success:
56 --  Processing continues if the field_id is valid.
57 --
58 -- Post Failure:
59 --  An application error is raised, and processing is terminated if the
60 --  field_id is invalid.
61 --
62 -- Developer/Implementation Notes:
63 --  Uses the value in g_questionnaire_template_id to determine if the field
64 --  is part of the questionnaire being answered.  This is populated in the
65 --  chk_questionnaire_answer_id procedure.
66 --
67 -- Access Status:
68 --  Internal Development Use Only.
69 --
70 -- ----------------------------------------------------------------------------
71 procedure chk_field_id
72   (p_field_id   in      hr_quest_answer_values.field_id%TYPE
73   ,p_questionnaire_answer_id
74     in      hr_quest_answer_values.questionnaire_answer_id%TYPE
75   );
76 --
77 -- ----------------------------------------------------------------------------
78 -- |-----------------------< chk_delete_allowed >-----------------------------|
79 -- ----------------------------------------------------------------------------
80 --
81 -- Description:
82 --  Validates that the row for the given quest_answer_val_id can be deleted,
83 --  by ensuring that a null value exists for the value field.
84 --
85 -- Pre-requisites:
86 --  None.
87 --
88 -- IN Parameters:
89 --  p_value
90 --
91 -- Post Success:
92 --  Processing continues, and the row is deleted if it is valid to do so.
93 --
94 -- Post Failure:
95 --  An application error is raised, and processing is terminated if it is not
96 --  appropriate to delete the row.
97 --
98 -- Developer/Implementation Notes:
99 --  p_value is obtained from g_old_rec
100 --
101 -- Access Status:
102 --  Internal Development Use Only.
103 --
104 -- ----------------------------------------------------------------------------
105 procedure chk_delete_allowed
106   (p_value in hr_quest_answer_values.value%TYPE
107   );
108 -- ----------------------------------------------------------------------------
109 -- |---------------------------< insert_validate >----------------------------|
110 -- ----------------------------------------------------------------------------
111 -- {Start Of Comments}
112 --
113 -- Description:
114 --   This procedure controls the execution of all insert business rules
115 --   validation.
116 --
117 -- Prerequisites:
118 --   This private procedure is called from ins procedure.
119 --
120 -- In Parameters:
121 --   A Pl/Sql record structre.
122 --
123 -- Post Success:
124 --   Processing continues.
125 --
126 -- Post Failure:
127 --   If a business rules fails the error will not be handled by this procedure
128 --   unless explicity coded.
129 --
130 -- Developer Implementation Notes:
131 --   For insert, your business rules should be executed from this procedure and
132 --   should ideally (unless really necessary) just be straight procedure or
133 --   function calls. Try and avoid using conditional branching logic.
134 --
135 -- Access Status:
136 --   Internal Row Handler Use Only.
137 --
138 -- {End Of Comments}
139 -- ----------------------------------------------------------------------------
140 Procedure insert_validate(p_rec in hr_qsv_shd.g_rec_type);
141 --
142 -- ----------------------------------------------------------------------------
143 -- |---------------------------< update_validate >----------------------------|
144 -- ----------------------------------------------------------------------------
145 -- {Start Of Comments}
146 --
147 -- Description:
148 --   This procedure controls the execution of all update business rules
149 --   validation.
150 --
151 -- Prerequisites:
152 --   This private procedure is called from upd procedure.
153 --
154 -- In Parameters:
155 --   A Pl/Sql record structre.
156 --
157 -- Post Success:
158 --   Processing continues.
159 --
160 -- Post Failure:
161 --   If a business rules fails the error will not be handled by this procedure
162 --   unless explicity coded.
163 --
164 -- Developer Implementation Notes:
165 --   For update, your business rules should be executed from this procedure and
166 --   should ideally (unless really necessary) just be straight procedure or
167 --   function calls. Try and avoid using conditional branching logic.
168 --
169 -- Access Status:
170 --   Internal Row Handler Use Only.
171 --
172 -- {End Of Comments}
173 -- ----------------------------------------------------------------------------
174 Procedure update_validate(p_rec in hr_qsv_shd.g_rec_type);
175 --
176 -- ----------------------------------------------------------------------------
177 -- |---------------------------< delete_validate >----------------------------|
178 -- ----------------------------------------------------------------------------
179 -- {Start Of Comments}
180 --
181 -- Description:
182 --   This procedure controls the execution of all delete business rules
183 --   validation.
184 --
185 -- Prerequisites:
186 --   This private procedure is called from del procedure.
187 --
188 -- In Parameters:
189 --   A Pl/Sql record structre.
190 --
191 -- Post Success:
192 --   Processing continues.
193 --
194 -- Post Failure:
195 --   If a business rules fails the error will not be handled by this procedure
196 --   unless explicity coded.
197 --
198 -- Developer Implementation Notes:
199 --   For delete, your business rules should be executed from this procedure and
200 --   should ideally (unless really necessary) just be straight procedure or
201 --   function calls. Try and avoid using conditional branching logic.
202 --
203 -- Access Status:
204 --   Internal Row Handler Use Only.
205 --
206 -- {End Of Comments}
207 -- ----------------------------------------------------------------------------
208 Procedure delete_validate(p_rec in hr_qsv_shd.g_rec_type);
209 --
210 --
211 -- ----------------------------------------------------------------------------
212 -- |-----------------< return_legislation_code >------------------------------|
213 -- ----------------------------------------------------------------------------
214 --
215 function return_legislation_code
216   (p_quest_answer_val_id in hr_quest_answer_values.quest_answer_val_id%TYPE
217   ) return varchar2;
218 end hr_qsv_bus;
219 --