1 Package Body hxc_tkgqc_bus as
2 /* $Header: hxctkgqcrhi.pkb 120.2 2005/09/23 05:26:07 rchennur noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hxc_tkgqc_bus.'; -- Global package name
9 g_debug boolean := hr_utility.debug_enabled;
10 --
11 -- The following two global variables are only to be
12 -- used by the return_legislation_code function.
13 --
14 g_legislation_code varchar2(150) default null;
15 g_tk_group_query_criteria_id number default null;
16 --
17 -- ----------------------------------------------------------------------------
18 -- |-----------------------< chk_non_updateable_args >------------------------|
19 -- ----------------------------------------------------------------------------
20 --
21 -- Description:
22 -- This procedure is used to ensure that non updateable attributes have
23 -- not been updated. If an attribute has been updated an error is generated.
24 --
25 -- Pre Conditions:
26 -- g_old_rec has been populated with details of the values currently in
27 -- the database.
28 --
29 -- In Arguments:
30 -- p_rec has been populated with the updated values the user would like the
31 -- record set to.
32 --
33 -- Post Success:
34 -- Processing continues if all the non updateable attributes have not
35 -- changed.
36 --
37 -- Post Failure:
38 -- An application error is raised if any of the non updatable attributes
39 -- have been altered.
40 --
41 -- ----------------------------------------------------------------------------
42 Procedure chk_non_updateable_args
43 (p_rec in hxc_tkgqc_shd.g_rec_type
44 ) IS
45 --
46 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
47 --
48 Begin
49
50 --
51 -- Only proceed with the validation if a row exists for the current
52 -- record in the HR Schema.
53 --
54 IF NOT hxc_tkgqc_shd.api_updating
55 (p_tk_group_query_criteria_id => p_rec.tk_group_query_criteria_id
56 ,p_object_version_number => p_rec.object_version_number
57 ) THEN
58 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
59 fnd_message.set_token('PROCEDURE ', l_proc);
60 fnd_message.set_token('STEP ', '5');
61 fnd_message.raise_error;
62 END IF;
63 --
64 End chk_non_updateable_args;
65 --
66 -- ----------------------------------------------------------------------------
67 -- |---------------------------< insert_validate >----------------------------|
68 -- ----------------------------------------------------------------------------
69 Procedure insert_validate
70 (p_rec in hxc_tkgqc_shd.g_rec_type
71 ) is
72 --
73 l_proc varchar2(72) ;
74 --
75 Begin
76 g_debug :=hr_utility.debug_enabled;
77 if g_debug then
78 l_proc := g_package||'insert_validate';
79 hr_utility.set_location('Entering:'||l_proc, 5);
80 end if;
81 --
82 -- Call all supporting business operations
83 --
84
85 null;
86
87 --
88 if g_debug then
89 hr_utility.set_location(' Leaving:'||l_proc, 10);
90 end if;
91 End insert_validate;
92 --
93 -- ----------------------------------------------------------------------------
94 -- |---------------------------< update_validate >----------------------------|
95 -- ----------------------------------------------------------------------------
96 Procedure update_validate
97 (p_rec in hxc_tkgqc_shd.g_rec_type
98 ) is
99 --
100 l_proc varchar2(72) ;
101 --
102 Begin
103 g_debug :=hr_utility.debug_enabled;
104 if g_debug then
105 l_proc := g_package||'update_validate';
106
107 hr_utility.set_location('Entering:'||l_proc, 5);
108 end if;
109 --
110 -- Call all supporting business operations
111 --
112
113 chk_non_updateable_args
114 (p_rec => p_rec
115 );
116 --
117 --
118 if g_debug then
119 hr_utility.set_location(' Leaving:'||l_proc, 10);
120 end if;
121 End update_validate;
122 --
123 -- ----------------------------------------------------------------------------
124 -- |---------------------------< delete_validate >----------------------------|
125 -- ----------------------------------------------------------------------------
126 Procedure delete_validate
127 (p_rec in hxc_tkgqc_shd.g_rec_type
128 ) is
129 --
130 l_proc varchar2(72) ;
131 --
132 Begin
133 g_debug :=hr_utility.debug_enabled;
134 if g_debug then
135 l_proc := g_package||'delete_validate';
136
137 hr_utility.set_location('Entering:'||l_proc, 5);
138 end if;
139 --
140 -- Call all supporting business operations
141 --
142 if g_debug then
143 hr_utility.set_location(' Leaving:'||l_proc, 10);
144 end if;
145 End delete_validate;
146 --
147 end hxc_tkgqc_bus;