1 Package ben_cso_bus AUTHID CURRENT_USER as
2 /* $Header: becsorhi.pkh 120.0 2005/05/28 01:24:01 appldev noship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |----------------------< set_security_group_id >--------------------------|
6 -- ---------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- Sets the security_group_id in CLIENT_INFO for the appropriate business
11 -- group context.
12 -- It is only valid to call this procedure when the primary key
13 -- is within a buisiness group context.
14 --
15 -- Prerequisites:
16 -- The primary key identified by p_cwb_stock_optn_dtls_id
17 -- already exists.
18 --
19 -- In Arguments:
20 -- p_cwb_stock_optn_dtls_id
21 --
22 --
23 -- Post Success:
24 -- The security_group_id will be set in CLIENT_INFO.
25 --
26 -- Post Failure:
27 -- An error is raised if the value does not exist.
28 -- An error is also raised when the primary key data is outside
29 -- of a buisiness group context.
30 --
31 -- Access Status:
32 -- Internal Development Use Only.
33 --
34 -- {End Of Comments}
35 -- ---------------------------------------------------------------------------
36 procedure set_security_group_id
37 (p_cwb_stock_optn_dtls_id in number
38 ,p_associated_column1 in varchar2 default null
39 );
40 --
41 --
42 -- ---------------------------------------------------------------------------
43 -- |---------------------< return_legislation_code >-------------------------|
44 -- ---------------------------------------------------------------------------
45 -- {Start Of Comments}
46 --
47 -- Description:
48 -- Return the legislation code for a specific primary key value
49 --
50 -- Prerequisites:
51 -- The primary key identified by p_cwb_stock_optn_dtls_id
52 -- already exists.
53 --
54 -- In Arguments:
55 -- p_cwb_stock_optn_dtls_id
56 --
57 --
58 -- Post Success:
59 -- The business group's legislation code will be returned.
60 --
61 -- Post Failure:
62 -- An error is raised if the value does not exist.
63 --
64 -- Access Status:
65 -- Internal Development Use Only.
66 --
67 -- {End Of Comments}
68 -- ---------------------------------------------------------------------------
69 FUNCTION return_legislation_code
70 (p_cwb_stock_optn_dtls_id in number
71 ) RETURN varchar2;
72 --
73 -- ----------------------------------------------------------------------------
74 -- |-----------------------< chk_valid_entry >--------------------------------|
75 -- ----------------------------------------------------------------------------
76 -- {Start Of Comments}
77 --
78 -- Description:
79 -- This procedure is used to ensure that either person_id OR
80 -- (Business_group_id and employee_number) is present
81 -- i.e. if person_id is not present then a business_group_id and
82 -- employee_number must be present.
83 -- If person_id is present then business_group_id and employee_number are
84 -- both optional. If Person_id is present, then business_group_id and
85 -- employee_number (if present) are valid in person table.
86 -- If any of these conditions is violated, an error is generated.
87 --
88 -- Pre Conditions:
89 -- g_old_rec has been populated with details of the values currently in
90 -- the database.
91 --
92 -- In Arguments:
93 -- p_employee_number
94 -- p_person_id
95 -- p_business_group_id
96 -- p_effective_date
97 --
98 -- Post Success:
99 -- Processing continues if all the conditions are satisfied
100 --
101 -- Post Failure:
102 -- An application error is raised if any of the conditions are not satisfied.
103
104 --
105 -- {End Of Comments}
106 -- ----------------------------------------------------------------------------
107 Procedure chk_valid_entry
108 (p_employee_number in varchar2
109 ,p_person_id in number
110 ,p_business_group_id in number
111 ,p_effective_date in date
112 ) ;
113 --
114 --
115 --
116 -- ----------------------------------------------------------------------------
117 -- |---------------------------< insert_validate >----------------------------|
118 -- ----------------------------------------------------------------------------
119 -- {Start of comments}
120 --
121 -- Description:
122 -- This procedure controls the execution of all insert business rules
123 -- validation.
124 --
125 -- Prerequisites:
126 -- This private procedure is called from ins procedure.
127 --
128 -- In Parameters:
129 -- A Pl/Sql record structure.
130 --
131 -- Post Success:
132 -- Processing continues.
133 --
134 -- Post Failure:
135 -- If a business rules fails the error will not be handled by this procedure
136 -- unless explicity coded.
137 --
138 -- Developer Implementation Notes:
139 -- For insert, your business rules should be executed from this procedure
140 -- and should ideally (unless really necessary) just be straight procedure
141 -- or function calls. Try and avoid using conditional branching logic.
142 --
143 -- Access Status:
144 -- Internal Row Handler Use Only.
145 --
146 -- {End of comments}
147 -- ----------------------------------------------------------------------------
148 Procedure insert_validate
149 (p_effective_date in date
150 ,p_rec in ben_cso_shd.g_rec_type
151 );
152 --
153 -- ----------------------------------------------------------------------------
154 -- |---------------------------< update_validate >----------------------------|
155 -- ----------------------------------------------------------------------------
156 -- {Start Of Comments}
157 --
158 -- Description:
159 -- This procedure controls the execution of all update business rules
160 -- validation.
161 --
162 -- Prerequisites:
163 -- This private procedure is called from upd procedure.
164 --
165 -- In Parameters:
166 -- A Pl/Sql record structure.
167 --
168 -- Post Success:
169 -- Processing continues.
170 --
171 -- Post Failure:
172 -- If a business rules fails the error will not be handled by this procedure
173 -- unless explicity coded.
174 --
175 -- Access Status:
176 -- Internal Row Handler Use Only.
177 --
178 -- {End Of Comments}
179 -- ----------------------------------------------------------------------------
180 Procedure update_validate
181 (p_effective_date in date
182 ,p_rec in ben_cso_shd.g_rec_type
183 );
184 --
185 -- ----------------------------------------------------------------------------
186 -- |---------------------------< delete_validate >----------------------------|
187 -- ----------------------------------------------------------------------------
188 -- {Start Of Comments}
189 --
190 -- Description:
191 -- This procedure controls the execution of all delete business rules
192 -- validation.
193 --
194 -- Prerequisites:
195 -- This private procedure is called from del procedure.
196 --
197 -- In Parameters:
198 -- A Pl/Sql record structure.
199 --
200 -- Post Success:
201 -- Processing continues.
202 --
203 -- Post Failure:
204 -- If a business rules fails the error will not be handled by this procedure
205 -- unless explicity coded.
206 --
207 -- Developer Implementation Notes:
208 -- For delete, your business rules should be executed from this procedure
209 -- and should ideally (unless really necessary) just be straight procedure
210 -- or function calls. Try and avoid using conditional branching logic.
211 --
212 -- Access Status:
213 -- Internal Row Handler Use Only.
214 --
215 -- {End Of Comments}
216 -- ----------------------------------------------------------------------------
217 Procedure delete_validate
218 (p_rec in ben_cso_shd.g_rec_type
219 );
220 --
221 end ben_cso_bus;