DBA Data[Home] [Help]

PACKAGE BODY: APPS.AME_ATL_BUS

Source


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