DBA Data[Home] [Help]

PACKAGE: APPS.HXC_TK_GRP_QUERY_CRITERIA_API

Source


1 Package hxc_tk_grp_query_criteria_api as
2 /* $Header: hxctkgqcapi.pkh 120.0 2005/05/29 06:14:55 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |-------------------< create_tk_grp_query_criteria >-----------------------|
6 -- ----------------------------------------------------------------------------
7 --
8 --
9 -- Description:
10 --
11 -- This API creates a tk group query criteria row
12 --
13 -- Prerequisites:
14 --
15 -- None
16 --
17 -- In Parameters:
18 --   Name                           Reqd Type     Description
19 --
20 --   p_validate                     No   boolean  If TRUE then the database
21 --                                                remains unchanged. If FALSE
22 --                                                then a new tk group query
23 --                                                is created. Default is FALSE.
24 --   p_tk_group_query_criteria_id   No   number   Primary Key for tk group query criteria
25 --   p_tk_group_query_id            Yes  number   Foreign Key for tk group query
26 --   p_tk_group_id                  Yes  number   Foreign Key for tk group id - used to
27 --                                                maintain the tk group query entity
28 --   p_object_version_number        No   number   Object Version Number
29 --   p_criteria_type                Yes  varchar2 criteria type
30 --   p_criteria id                  Yes  number   id of the criteria specified by the type
31 --
32 -- Post Success:
33 --
34 -- when the tk_group_query_criteria has been created successfully the following
35 -- out parameters are set.
36 --
37 --   Name                           Type     Description
38 --
39 --   p_tk_group_query_criteria_id   Number   Primary Key for the new tk group query
40 --   p_object_version_number        Number   Object version number for the
41 --                                           new tk group
42 --
43 -- Post Failure:
44 --
45 -- The tk group query criteria will not be inserted and an application error raised
46 --
47 -- Access Status:
48 --   Public.
49 --
50 --
51 procedure create_tk_grp_query_criteria
52   (p_validate                       in  boolean   default false
53   ,p_tk_group_query_criteria_id     in  out nocopy number
54   ,p_tk_group_query_id              in  out nocopy number
55   ,p_object_version_number          in  out nocopy number
56   ,p_tk_group_id                    in  number
57   ,p_criteria_type                  in  varchar2
58   ,p_criteria_id                    in  number
59   );
60     --
61 -- ----------------------------------------------------------------------------
62 -- |------------------<update_tk_grp_query_criteria >-------------------------|
63 -- ----------------------------------------------------------------------------
64 --
65 --
66 -- Description:
67 --
68 -- This API updates an existing Tk_Group_Query_Criteria
69 --
70 -- Prerequisites:
71 --
72 -- None
73 --
74 -- In Parameters:
75 --   Name                           Reqd Type     Description
76 --
77 --   p_validate                     No   boolean  If TRUE then the database
78 --                                                remains unchanged. If FALSE
79 --                                                then the tk group query
80 --                                                is updated. Default is FALSE.
81 --   p_tk_group_query_criteria_id   Yes  number   Primary Key for tk group query criteria
82 --   p_tk_group_query_id            Yes  number   Foreign Key for tk group query
83 --   p_object_version_number        Yes  number   Object Version Number
84 --   p_criteria_type                Yes  varchar2 criteria type
85 --   p_criteria id                  Yes  number   id of the criteria specified by the type
86 --
87 -- Post Success:
88 --
89 -- when the tk group query criteria has been updated successfully the following
90 -- out parameters are set.
91 --
92 --   Name                           Type     Description
93 --
94 --   p_object_version_number        Number   Object version number for the
95 --                                           updated tk group query
96 --
97 -- Post Failure:
98 --
99 -- The tk_group_query_criteria will not be updated and an application error raised
100 --
101 -- Access Status:
102 --   Public.
103 --
104 --
105 procedure update_tk_grp_query_criteria
106   (p_validate                       in  boolean   default false
107   ,p_tk_group_query_criteria_id     in  number
108   ,p_tk_group_query_id              in  number
109   ,p_object_version_number          in  out nocopy number
110   ,p_criteria_type                  in  varchar2
111   ,p_criteria_id                    in  number
112   );
113 --
114 -- ----------------------------------------------------------------------------
115 -- |-----------------< delete_tk_grp_query_criteria >-------------------------|
116 -- ----------------------------------------------------------------------------
117 --
118 --
119 -- Description:
120 --
121 -- This API deletes an existing Tk_Group_Query_Criteria
122 --
123 -- Prerequisites:
124 --
125 -- None
126 --
127 -- In Parameters:
128 --   Name                           Reqd Type     Description
129 --
130 --   p_validate                     No   boolean  If TRUE then the database
131 --                                                remains unchanged. If FALSE
132 --                                                then the tk_group_query_criteria
133 --                                                is deleted. Default is FALSE.
134 --   p_tk_group_query_criteria_id   Yes  number   Primary Key for entity
135 --   p_object_version_number        Yes  number   Object Version Number
136 --
137 -- Post Success:
138 --
139 -- when the tk group query criteria has been deleted successfully the process
140 -- completes with success.
141 --
142 -- Post Failure:
143 --
144 -- The tk_group_query_criteria will not be deleted and an application error raised
145 --
146 -- Access Status:
147 --   Public.
148 --
149 --
150 procedure delete_tk_grp_query_criteria
151   (p_validate                       in  boolean  default false
152   ,p_tk_group_query_criteria_id     in  number
153   ,p_object_version_number          in  number
154   );
155 --
156 -- ----------------------------------------------------------------------------
157 -- |-----------------------< chk_criteria_type >------------------------------|
158 -- ----------------------------------------------------------------------------
159 --
160 -- Description:
161 --   This procedure insures a valid tk group query criteria type
162 --
163 -- Pre Conditions:
164 --   None
165 --
166 -- In Arguments:
167 --   criteria_type
168 --
169 -- Post Success:
170 --   Processing continues if the name business tk group querys have not been violated
171 --
172 -- Post Failure:
173 --   An application error is raised if the name is not valid
174 --
175 -- ----------------------------------------------------------------------------
176 Procedure chk_criteria_type
177   (
178    p_criteria_type in varchar2
179   );
180 --
181 -- ----------------------------------------------------------------------------
182 -- |-----------------------< chk_criteria_id >---------------------------------|
183 -- ----------------------------------------------------------------------------
184 --
185 -- Description:
186 --   This procedure insures a valid tk group query criteria id
187 --
188 -- Pre Conditions:
189 --   None
190 --
191 -- In Arguments:
192 --   criteria_type
193 --   criteria_id
194 --
195 -- Post Success:
196 --   Processing continues if the name business tk group querys have not been violated
197 --
198 -- Post Failure:
199 --   An application error is raised if the name is not valid
200 --
201 -- ----------------------------------------------------------------------------
202 Procedure chk_criteria_id
203   (
204    p_criteria_type in varchar2
205   ,p_criteria_id   in number
206   );
207 --
208 -- ----------------------------------------------------------------------------
209 -- |-----------------------< chk_tk_group_query_id >--------------------------|
210 -- ----------------------------------------------------------------------------
211 --
212 -- Description:
213 --   This procedure insures a valid timekeeper group query id
214 --
215 -- Pre Conditions:
216 --   None
217 --
218 -- In Arguments:
219 --   tk_group_query_id
220 --
221 -- Post Success:
222 --   Processing continues if the name business tk group querys have not been violated
223 --
224 -- Post Failure:
225 --   An application error is raised if the name is not valid
226 --
227 -- ----------------------------------------------------------------------------
228 Procedure chk_tk_group_query_id
229   (
230    p_tk_group_query_id in number
231   );
232 --
233 -- ----------------------------------------------------------------------------
234 -- |-----------------------< chk_delete >-------------------------------------|
235 -- ----------------------------------------------------------------------------
236 --
237 -- Description:
238 --   This procedure carries out delete time referential integrity checks
239 --   Currently there are none but include this now for minimum impact
240 --   in the future.
241 --
242 -- Pre Conditions:
243 --   None
244 --
245 -- In Arguments:
246 --   tk_group_query_criteria_id
247 --
248 -- Post Success:
249 --   Processing continues if the name is not being referenced
250 --
251 -- Post Failure:
252 --   An application error is raised if the tk group query is being used.
253 --
254 -- ----------------------------------------------------------------------------
255 Procedure chk_delete
256   (
257    p_tk_group_query_criteria_id in number
258   );
259 --
260 -- ----------------------------------------------------------------------------
261 -- |-------------------------< get_criteria >---------------------------------|
262 -- ----------------------------------------------------------------------------
263 --
264 -- Description:
265 --
266 --   This function retrieves the display values for a particular
267 --   criteria based on the criteria type
268 --
269 -- Pre Conditions:
270 --   None
271 --
272 -- In Arguments:
273 --   criteria_type
274 --   criteria_id
275 --
276 --  Usages:
277 --          used in the hxc_tk_group_query_criteria_v view
278 --
279 -- ----------------------------------------------------------------------------
280 FUNCTION get_criteria ( p_position number
281                       , p_criteria_type varchar2
282                       , p_criteria_id   number )
283 RETURN varchar2;
284 
285 -- ----------------------------------------------------------------------------
286 -- |-----------------------< chk_criteria_unique >----------------------------|
287 -- ----------------------------------------------------------------------------
288 --
289 -- Description:
290 --   This procedure check that the criteria id entered is not duplicated
291 --   within the group query
292 --
293 -- Pre Conditions:
294 --   None
295 --
296 -- In Arguments:
297 --   tk_group_query_criteria_id
298 --   tk_group_query_id
299 --   criteria_type
300 --   criteria_id
301 --
302 --  Usages:
303 --          Used in hxc_tk_grp_query criteria api
304 --
305 --
306 -- ----------------------------------------------------------------------------
307 
308 PROCEDURE chk_criteria_unique (
309                         p_tk_group_query_criteria_id in number
310                       , p_tk_group_query_id in number
311                       , p_criteria_type varchar2
312                       , p_criteria_id   number );
313 
314 
315 --
316 --
317 -- ----------------------------------------------------------------------------
318 -- |-------------------------< get_tc_period >--------------------------------|
319 -- ----------------------------------------------------------------------------
320 --
321 -- Description:
322 --
323 --   This function retrieves the timecard period based on the resource's pref.
324 --
325 -- Pre Conditions:
326 --   None
327 --
328 -- In Arguments:
329 --   resource_id
330 --
331 --  Usages:
332 --          used in the hxc_tk_group_query_criteria_v view
333 --          HXCTKGRP LOVs
334 --
335 -- ----------------------------------------------------------------------------
336 FUNCTION get_tc_period ( p_resource_id number )
337 RETURN varchar2 DETERMINISTIC;
338 
339 --
340 --
341 -- ----------------------------------------------------------------------------
342 -- |-------------------------< check_audit_enabled >--------------------------------|
343 -- ----------------------------------------------------------------------------
344 --
345 -- Description:
346 --
347 --   This function retrieves the audit enabled preference
348 --
349 -- Pre Conditions:
350 --   None
351 --
352 -- In Arguments:
353 --   resource_id
354 --
355 --  Usages:
356 --          used in the hxc_tk_group_query_criteria_v view
357 --
358 -- ----------------------------------------------------------------------------
359 
360 FUNCTION  check_audit_enabled ( p_resource_id number )
361 RETURN VARCHAR2;
362 
363 --
364 -- ----------------------------------------------------------------------------
365 -- |-------------------------< tc_period_ok >---------------------------------|
366 -- ----------------------------------------------------------------------------
367 --
368 -- Description:
369 --
370 --   This function returns TRUE if the period type and/or duration in days
371 --   is the same as the period type and/or duration in days for the resource
372 --
373 -- Pre Conditions:
374 --   None
375 --
376 -- In Arguments:
377 --   resource_id
378 --   period_type
379 --   dusration_in_days
380 --
381 --  Usages:
382 --          used in the hxc_tk_group_query_criteria_v view
383 --          HXCTKGRP LOVs and populate procedure
384 --
385 -- ----------------------------------------------------------------------------
386 FUNCTION tc_period_ok ( p_resource_id      number
387 		,	p_period_type      varchar2
388 		,	p_duration_in_days number )
389 RETURN BOOLEAN DETERMINISTIC;
390 
391 
392 END hxc_tk_grp_query_criteria_api;