1 Package pay_tdf_bus as
2 /* $Header: pytdfrhi.pkh 120.1 2005/06/14 14:08 tvankayl noship $ */
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 appropriate business
11 -- group context.
12 -- It is only valid to call this procedure when the primary key
13 -- is within a buisiness group context.
14 --
15 -- Prerequisites:
16 -- The primary key identified by p_time_definition_id
17 -- already exists.
18 --
19 -- In Arguments:
20 -- p_time_definition_id
21 --
22 --
23 -- Post Success:
24 -- The security_group_id will be set in CLIENT_INFO.
25 --
26 -- Post Failure:
27 -- An error is raised if the value does not exist.
28 -- An error is also raised when the primary key data is outside
29 -- of a buisiness group context.
30 --
31 -- Access Status:
32 -- Internal Development Use Only.
33 --
34 -- {End Of Comments}
35 -- ---------------------------------------------------------------------------
36 procedure set_security_group_id
37 (p_time_definition_id in number
38 ,p_associated_column1 in varchar2 default null
39 );
40 --
41 --
42 -- ---------------------------------------------------------------------------
43 -- |---------------------< return_legislation_code >-------------------------|
44 -- ---------------------------------------------------------------------------
45 -- {Start Of Comments}
46 --
47 -- Description:
48 -- Return the legislation code for a specific primary key value
49 --
50 -- Prerequisites:
51 -- The primary key identified by p_time_definition_id
52 -- already exists.
53 --
54 -- In Arguments:
55 -- p_time_definition_id
56 --
57 --
58 -- Post Success:
59 -- The business group's legislation code will be returned.
60 --
61 -- Post Failure:
62 -- An error is raised if the value does not exist.
63 --
64 -- Access Status:
65 -- Internal Development Use Only.
66 --
67 -- {End Of Comments}
68 -- ---------------------------------------------------------------------------
69 FUNCTION return_legislation_code
70 (p_time_definition_id in number
71 ) RETURN varchar2;
72 --
73 --
74 -- ---------------------------------------------------------------------------
75 -- |--------------------------< is_startup_data >----------------------------|
76 -- ---------------------------------------------------------------------------
77 -- {Start Of Comments}
78 --
79 -- Description:
80 -- Determines if the data being updated or deleted is startup data
81 --
82 -- Prerequisites:
83 -- None
84 --
85 --
86 -- In Arguments:
87 -- p_time_definition_id
88 -- p_business_group_id
89 -- p_legislation_code
90 --
91 --
92 -- Post Success:
93 -- Processing continues.
94 --
95 -- Post Failure:
96 -- An error is raised
97 --
98 -- Access Status:
99 -- Internal Development Use Only.
100 --
101 -- {End Of Comments}
102 -- ---------------------------------------------------------------------------
103 FUNCTION is_startup_data
104 ( p_time_definition_id in number
105 ,p_business_group_id in number
106 ,p_legislation_code in varchar2
107 ) RETURN number;
108 --
109 --
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 -- Prerequisites:
120 -- This private procedure is called from ins procedure.
121 --
122 -- In Parameters:
123 -- A Pl/Sql record structure.
124 --
125 -- Post Success:
126 -- Processing continues.
127 --
128 -- Post Failure:
129 -- If a business rules fails the error will not be handled by this procedure
130 -- unless explicity coded.
131 --
132 -- Developer Implementation Notes:
133 -- For insert, your business rules should be executed from this procedure
134 -- and should ideally (unless really necessary) just be straight procedure
135 -- or function calls. Try and avoid using conditional branching logic.
136 --
137 -- Access Status:
138 -- Internal Row Handler Use Only.
139 --
140 -- {End of comments}
141 -- ----------------------------------------------------------------------------
142 Procedure insert_validate
143 (p_effective_date in date
144 ,p_rec in pay_tdf_shd.g_rec_type
145 );
146 --
147 -- ----------------------------------------------------------------------------
148 -- |---------------------------< update_validate >----------------------------|
149 -- ----------------------------------------------------------------------------
150 -- {Start Of Comments}
151 --
152 -- Description:
153 -- This procedure controls the execution of all update business rules
154 -- validation.
155 --
156 -- Prerequisites:
157 -- This private procedure is called from upd procedure.
158 --
159 -- In Parameters:
160 -- A Pl/Sql record structure.
161 --
162 -- Post Success:
163 -- Processing continues.
164 --
165 -- Post Failure:
166 -- If a business rules fails the error will not be handled by this procedure
167 -- unless explicity coded.
168 --
169 -- Access Status:
170 -- Internal Row Handler Use Only.
171 --
172 -- {End Of Comments}
173 -- ----------------------------------------------------------------------------
174 Procedure update_validate
175 (p_effective_date in date
176 ,p_rec in pay_tdf_shd.g_rec_type
177 ,p_regenerate_periods out nocopy boolean
178 ,p_delete_periods out nocopy boolean
179 );
180 --
181 -- ----------------------------------------------------------------------------
182 -- |---------------------------< delete_validate >----------------------------|
183 -- ----------------------------------------------------------------------------
184 -- {Start Of Comments}
185 --
186 -- Description:
187 -- This procedure controls the execution of all delete business rules
188 -- validation.
189 --
190 -- Prerequisites:
191 -- This private procedure is called from del procedure.
192 --
193 -- In Parameters:
194 -- A Pl/Sql record structure.
195 --
196 -- Post Success:
197 -- Processing continues.
198 --
199 -- Post Failure:
200 -- If a business rules fails the error will not be handled by this procedure
201 -- unless explicity coded.
202 --
203 -- Developer Implementation Notes:
204 -- For delete, your business rules should be executed from this procedure
205 -- and should ideally (unless really necessary) just be straight procedure
206 -- or function calls. Try and avoid using conditional branching logic.
207 --
208 -- Access Status:
209 -- Internal Row Handler Use Only.
210 --
211 -- {End Of Comments}
212 -- ----------------------------------------------------------------------------
213 Procedure delete_validate
214 (p_rec in pay_tdf_shd.g_rec_type
215 );
216 --
217 -- ----------------------------------------------------------------------------
218 -- |---------------------------< chk_time_def_usage >-------------------------|
219 -- ----------------------------------------------------------------------------
220 -- {Start Of Comments}
221 --
222 -- Description:
223 -- This procedure checks whether the time definition is used or not.
224 --
225 -- Prerequisites:
226 -- None.
227 --
228 -- In Parameters:
229 -- p_time_definition_id
230 -- p_definition_type
231 --
232 -- Post Success:
233 -- Processing continues.
234 --
235 -- Post Failure:
236 -- An error message will be raised.
237 --
238 -- Developer Implementation Notes:
239 -- None
240 --
241 -- Access Status:
242 -- Internal Development Use Only.
243 --
244 -- {End Of Comments}
245 -- ----------------------------------------------------------------------------
246 Function chk_time_def_usage
247 ( p_time_definition_id IN number
248 ,p_definition_type IN varchar2
249 ) Return boolean;
250 --
251 end pay_tdf_bus;