1 Package hr_oru_bus AUTHID CURRENT_USER as
2 /* $Header: hrorurhi.pkh 120.1 2005/07/15 06:03:15 bshukla noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |-------------------------< chk_name >-------------------------------------|
6 -- ----------------------------------------------------------------------------
7 --
8 -- Description:
9 -- Validates that NAME of organization unit is UNIQUE within the
10 -- business group raising an error if not unique, and sets the output
11 -- parameter to true if the name is the
12 -- same as that of a business group or an organization with the same name
13 -- exists in a different business group and the Cross business group
14 -- parameter is set to 'Y'.
15 --
16 -- Pre-conditions:
17 -- None.
18 --
19 -- In Arguments:
20 -- p_name
21 -- p_effective_date
22 -- p_business_group_id
23 --
24 -- Post Success:
25 -- If the name attribute is UNIQUE then
26 -- normal processing continues
27 --
28 -- Post Failure:
29 -- If the name attribute is already present then an application
30 -- error will be raised and processing is terminated.
31 --
32 -- Developer/Implementation Notes:
33 -- Duplicate validation exists on form, so any changes made here
34 -- or on form must be dual-maintained.
35 --
36 -- Access Status:
37 -- Internal Development Use Only.
38 --
39 -- {End Of Comments}
40 PROCEDURE chk_name
41 ( p_name IN hr_all_organization_units.name%TYPE,
42 p_effective_date IN DATE default NULL,
43 p_business_group_id IN number,
44 p_organization_id IN number default null,
45 p_duplicate_org_warning OUT NOCOPY BOOLEAN
46 );
47
48 --
49 -- ---------------------------------------------------------------------------
50 -- |----------------------< set_security_group_id >--------------------------|
51 -- ---------------------------------------------------------------------------
52 -- {Start Of Comments}
53 --
54 -- Description:
55 -- Sets the security_group_id in CLIENT_INFO for the appropriate business
56 -- group context.
57 --
58 -- Prerequisites:
59 -- The primary key identified by p_organization_id
60 -- already exists.
61 --
62 -- In Arguments:
63 -- p_organization_id
64 --
65 --
66 -- Post Success:
67 -- The security_group_id will be set in CLIENT_INFO.
68 --
69 -- Post Failure:
70 -- An error is raised if the value does not exist.
71 --
72 -- Access Status:
73 -- Internal Development Use Only.
74 --
75 -- {End Of Comments}
76 -- ---------------------------------------------------------------------------
77 procedure set_security_group_id
78 (p_organization_id in number
79 );
80 --
81 --
82 -- ---------------------------------------------------------------------------
83 -- |---------------------< return_legislation_code >-------------------------|
84 -- ---------------------------------------------------------------------------
85 -- {Start Of Comments}
86 --
87 -- Description:
88 -- Return the legislation code for a specific primary key value
89 --
90 -- Prerequisites:
91 -- The primary key identified by p_organization_id
92 -- already exists.
93 --
94 -- In Arguments:
95 -- p_organization_id
96 --
97 --
98 -- Post Success:
99 -- The business group's legislation code will be returned.
100 --
101 -- Post Failure:
102 -- An error is raised if the value does not exist.
103 --
104 -- Access Status:
105 -- Internal Development Use Only.
106 --
107 -- {End Of Comments}
108 -- ---------------------------------------------------------------------------
109 FUNCTION return_legislation_code
110 (p_organization_id in number
111 ) RETURN varchar2;
112 --
113 --
114 -- ----------------------------------------------------------------------------
115 -- |---------------------------< insert_validate >----------------------------|
116 -- ----------------------------------------------------------------------------
117 -- {Start of comments}
118 --
119 -- Description:
120 -- This procedure controls the execution of all insert business rules
121 -- validation.
122 --
123 -- Prerequisites:
124 -- This private procedure is called from ins procedure.
125 --
126 -- In Parameters:
127 -- A Pl/Sql record structure.
128 --
129 -- Post Success:
130 -- Processing continues.
131 --
132 -- Post Failure:
133 -- If a business rules fails the error will not be handled by this procedure
134 -- unless explicity coded.
135 --
136 -- Developer Implementation Notes:
137 -- For insert, your business rules should be executed from this procedure and
138 -- should ideally (unless really necessary) just be straight procedure or
139 -- function calls. Try and avoid using conditional branching logic.
140 --
141 -- Access Status:
142 -- Internal Row Handler Use Only.
143 --
144 -- {End of comments}
145 -- ----------------------------------------------------------------------------
146 Procedure insert_validate
147 (p_effective_date in date
148 ,p_rec in hr_oru_shd.g_rec_type
149 ,p_duplicate_org_warning out nocopy boolean
150 );
151 --
152 -- ----------------------------------------------------------------------------
153 -- |---------------------------< update_validate >----------------------------|
154 -- ----------------------------------------------------------------------------
155 -- {Start Of Comments}
156 --
157 -- Description:
158 -- This procedure controls the execution of all update business rules
159 -- validation.
160 --
161 -- Prerequisites:
162 -- This private procedure is called from upd procedure.
163 --
164 -- In Parameters:
165 -- A Pl/Sql record structure.
166 --
167 -- Post Success:
168 -- Processing continues.
169 --
170 -- Post Failure:
171 -- If a business rules fails the error will not be handled by this procedure
172 -- unless explicity coded.
173 --
174 -- Developer Implementation Notes:
175 -- For update, your business rules should be executed from this procedure and
176 -- should ideally (unless really necessary) just be straight procedure or
177 -- function calls. Try and avoid using conditional branching logic.
178 --
179 -- Access Status:
180 -- Internal Row Handler Use Only.
181 --
182 -- {End Of Comments}
183 -- ----------------------------------------------------------------------------
184 Procedure update_validate
185 (p_effective_date in date
186 ,p_rec in hr_oru_shd.g_rec_type
187 ,p_duplicate_org_warning out nocopy boolean
188 );
189 --
190 -- ----------------------------------------------------------------------------
191 -- |---------------------------< delete_validate >----------------------------|
192 -- ----------------------------------------------------------------------------
193 -- {Start Of Comments}
194 --
195 -- Description:
196 -- This procedure controls the execution of all delete business rules
197 -- validation.
198 --
199 -- Prerequisites:
200 -- This private procedure is called from del procedure.
201 --
202 -- In Parameters:
203 -- A Pl/Sql record structure.
204 --
205 -- Post Success:
206 -- Processing continues.
207 --
208 -- Post Failure:
209 -- If a business rules fails the error will not be handled by this procedure
210 -- unless explicity coded.
211 --
212 -- Developer Implementation Notes:
213 -- For delete, your business rules should be executed from this procedure and
214 -- should ideally (unless really necessary) just be straight procedure or
215 -- function calls. Try and avoid using conditional branching logic.
216 --
217 -- Access Status:
218 -- Internal Row Handler Use Only.
219 --
220 -- {End Of Comments}
221 -- ----------------------------------------------------------------------------
222 Procedure delete_validate
223 (p_rec in hr_oru_shd.g_rec_type
224 );
225 --
226 end hr_oru_bus;