1 Package Body irc_apa_bus as
2 /* $Header: iraparhi.pkb 120.0.12000000.1 2007/03/23 12:12:46 vboggava noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' irc_apa_bus.'; -- Global package name
9 --
10 -- The following two global variables are only to be
11 -- used by the return_legislation_code function.
12 --
13 g_legislation_code varchar2(150) default null;
14 g_apl_profile_access_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 -- Removed as per the code review comments
21 --
22 -- ---------------------------------------------------------------------------
23 -- |---------------------< return_legislation_code >-------------------------|
24 -- ---------------------------------------------------------------------------
25 --
26 -- Removed as per the code review comments
27 --
28 -- ----------------------------------------------------------------------------
29 -- |-----------------------< chk_non_updateable_args >------------------------|
30 -- ----------------------------------------------------------------------------
31 -- {Start Of Comments}
32 --
33 -- Description:
34 -- This procedure is used to ensure that non updateable attributes have
35 -- not been updated. If an attribute has been updated an error is generated.
36 --
37 -- Pre Conditions:
38 -- g_old_rec has been populated with details of the values currently in
39 -- the database.
40 --
41 -- In Arguments:
42 -- p_rec has been populated with the updated values the user would like the
43 -- record set to.
44 --
45 -- Post Success:
46 -- Processing continues if all the non updateable attributes have not
47 -- changed.
48 --
49 -- Post Failure:
50 -- An application error is raised if any of the non updatable attributes
51 -- have been altered.
52 --
53 -- {End Of Comments}
54 -- ----------------------------------------------------------------------------
55 Procedure chk_non_updateable_args
56 (p_rec in irc_apa_shd.g_rec_type
57 ) IS
58 --
59 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
60 --
61 Begin
62 --
63 -- Only proceed with the validation if a row exists for the current
64 -- record in the HR Schema.
65 --
66 IF NOT irc_apa_shd.api_updating
67 (p_apl_profile_access_id => p_rec.apl_profile_access_id
68 ,p_object_version_number => p_rec.object_version_number
69 ) THEN
70 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
71 fnd_message.set_token('PROCEDURE ', l_proc);
72 fnd_message.set_token('STEP ', '5');
73 fnd_message.raise_error;
74 END IF;
75 --
76 -- EDIT_HERE: Add checks to ensure non-updateable args have
77 -- not been updated.
78 --
79 End chk_non_updateable_args;
80 --
81 -- ----------------------------------------------------------------------------
82 -- |---------------------------< insert_validate >----------------------------|
83 -- ----------------------------------------------------------------------------
84 Procedure insert_validate
85 (p_rec in irc_apa_shd.g_rec_type
86 ) is
87 --
88 l_proc varchar2(72) := g_package||'insert_validate';
89 --
90 Begin
91 hr_utility.set_location('Entering:'||l_proc, 5);
92 --
93 -- Call all supporting business operations
94 --
95 --
96 -- EDIT_HERE: As this table does not have a mandatory business_group_id
97 -- column, ensure client_info is populated by calling a suitable
98 -- ???_???_bus.set_security_group_id procedure, or add one of the following
99 -- comments:
100 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
101 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
102 --
103 -- Validate Dependent Attributes
104 --
105 --
106 hr_utility.set_location(' Leaving:'||l_proc, 10);
107 End insert_validate;
108 --
109 -- ----------------------------------------------------------------------------
110 -- |---------------------------< update_validate >----------------------------|
111 -- ----------------------------------------------------------------------------
112 Procedure update_validate
113 (p_rec in irc_apa_shd.g_rec_type
114 ) is
115 --
116 l_proc varchar2(72) := g_package||'update_validate';
117 --
118 Begin
119 hr_utility.set_location('Entering:'||l_proc, 5);
120 --
121 -- Call all supporting business operations
122 --
123 --
124 -- EDIT_HERE: As this table does not have a mandatory business_group_id
125 -- column, ensure client_info is populated by calling a suitable
126 -- ???_???_bus.set_security_group_id procedure, or add one of the following
127 -- comments:
128 -- "-- No business group context. HR_STANDARD_LOOKUPS used for validation."
129 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
130 --
131 -- Validate Dependent Attributes
132 --
133 chk_non_updateable_args
134 (p_rec => p_rec
135 );
136 --
137 --
138 hr_utility.set_location(' Leaving:'||l_proc, 10);
139 End update_validate;
140 --
141 -- ----------------------------------------------------------------------------
142 -- |---------------------------< delete_validate >----------------------------|
143 -- ----------------------------------------------------------------------------
144 Procedure delete_validate
145 (p_rec in irc_apa_shd.g_rec_type
146 ) is
147 --
148 l_proc varchar2(72) := g_package||'delete_validate';
149 --
150 Begin
151 hr_utility.set_location('Entering:'||l_proc, 5);
152 --
153 -- Call all supporting business operations
154 --
155 hr_utility.set_location(' Leaving:'||l_proc, 10);
156 End delete_validate;
157 --
158 end irc_apa_bus;