DBA Data[Home] [Help]

PACKAGE: APPS.HXC_TIMEKEEPER_GROUP_API

Source


1 Package hxc_timekeeper_group_api AUTHID CURRENT_USER as
2 /* $Header: hxctkgapi.pkh 120.0 2005/05/29 06:01:34 appldev noship $ */
3 
4 TYPE r_people IS RECORD ( person_id per_people_f.person_id%TYPE
5                         , full_name per_people_f.full_name%TYPE
6                         , employee_number per_people_f.employee_number%TYPE
7 			, tc_period_name  VARCHAR2(80)
8 			, person_type     VARCHAR2(2000) );
9 TYPE t_people IS TABLE OF r_people INDEX BY BINARY_INTEGER;
10 --
11 -- ----------------------------------------------------------------------------
12 -- |--------------------------< create_timekeeper_group >---------------------|
13 -- ----------------------------------------------------------------------------
14 --
15 --
16 -- Description:
17 --
18 -- This API creates a timekeeper group with a given name
19 --
20 -- Prerequisites:
21 --
22 -- None
23 --
24 -- In Parameters:
25 --   Name                           Reqd Type     Description
26 --
27 --   p_validate                     No   boolean  If TRUE then the database
28 --                                                remains unchanged. If FALSE
29 --                                                then a new data_approval_rule
30 --                                                is created. Default is FALSE.
31 --   p_tk_group_id                  No   number   Primary Key for timekeeper group group
32 --   p_object_version_number        No   number   Object Version Number
33 --   p_tk_Group_name                Yes  varchar2 tk group Name for the timekeeper_group
34 --   p_tk_resource_id                  Yes  number   Resource id for the person creating the
35 --                                                timekeeper group
36 --   p_business_group_id            Yes  number   business group id column
37 -- Post Success:
38 --
39 -- when the timekeeper_group has been created successfully the following
40 -- out parameters are set.
41 --
42 --   Name                           Type     Description
43 --
44 --   p_tk_group_id                  Number   Primary Key for the new rule
45 --   p_object_version_number        Number   Object version number for the
46 --                                           new tk group
47 --
48 -- Post Failure:
49 --
50 -- The timekeeper group will not be inserted and an application error raised
51 --
52 -- Access Status:
53 --   Public.
54 --
55 --
56 procedure create_timekeeper_group
57   (p_validate                       in  boolean   default false
58   ,p_tk_group_id                    in  out nocopy number
59   ,p_object_version_number          in  out nocopy number
60   ,p_tk_group_name                  in     varchar2
61   ,p_tk_resource_id                 in  number
62   ,p_business_group_id              in  number
63   );
64     --
65 -- ----------------------------------------------------------------------------
66 -- |-------------------------<update_timekeeper_group>------------------------|
67 -- ----------------------------------------------------------------------------
68 --
69 --
70 -- Description:
71 --
72 -- This API updates an existing Timekeeper_Group with a given name
73 --
74 -- Prerequisites:
75 --
76 -- None
77 --
78 -- In Parameters:
79 --   Name                           Reqd Type     Description
80 --
81 --   p_validate                     No   boolean  If TRUE then the database
82 --                                                remains unchanged. If FALSE
83 --                                                then the data_approval_rule
84 --                                                is updated. Default is FALSE.
85 --   p_tk_group_id                  Yes  number   Primary Key for entity
86 --   p_object_version_number        Yes  number   Object Version Number
87 --   p_tk_group_name                Yes  varchar2 tk group Name for the timekeeper group
88 --   p_tk_resource_id               Yes  number   resource id for the person
89 --   p_business_group_id            Yes  number   business group id column
90 -- Post Success:
91 --
92 -- when the timekeeper group has been updated successfully the following
93 -- out parameters are set.
94 --
95 --   Name                           Type     Description
96 --
97 --   p_object_version_number        Number   Object version number for the
98 --                                           updated rule
99 --
100 -- Post Failure:
101 --
102 -- The timekeeper_group will not be updated and an application error raised
103 --
104 -- Access Status:
105 --   Public.
106 --
107 --
108 procedure update_timekeeper_group
109   (p_validate                       in  boolean   default false
110   ,p_tk_group_id                    in  number
111   ,p_object_version_number          in  out nocopy number
112   ,p_tk_group_name                  in     varchar2
113   ,p_tk_resource_id                 in  number
114   ,p_business_group_id              in  number
115   );
116 --
117 -- ----------------------------------------------------------------------------
118 -- |----------------------< delete_timekeeper_group >-------------------------|
119 -- ----------------------------------------------------------------------------
120 --
121 --
122 -- Description:
123 --
124 -- This API deletes an existing Timekeeper_Group
125 --
126 -- Prerequisites:
127 --
128 -- None
129 --
130 -- In Parameters:
131 --   Name                           Reqd Type     Description
132 --
133 --   p_validate                     No   boolean  If TRUE then the database
134 --                                                remains unchanged. If FALSE
135 --                                                then the timekeeper_group
136 --                                                is deleted. Default is FALSE.
137 --   p_tk_group_id                  Yes  number   Primary Key for entity
138 --   p_object_version_number        Yes  number   Object Version Number
139 --
140 -- Post Success:
141 --
142 -- when the timekeeper group has been deleted successfully the process
143 -- completes with success.
144 --
145 -- Post Failure:
146 --
147 -- The timekeeper_group will not be deleted and an application error raised
148 --
149 -- Access Status:
150 --   Public.
151 --
152 --
153 procedure delete_timekeeper_group
154   (p_validate                       in  boolean  default false
155   ,p_tk_group_id                    in  number
156   ,p_object_version_number          in  number
157   );
158 --
159 -- ----------------------------------------------------------------------------
160 -- |-----------------------< chk_name >---------------------------------------|
161 -- ----------------------------------------------------------------------------
162 --
163 -- Description:
164 --   This procedure insures a valid timekeeper group name
165 --
166 -- Pre Conditions:
167 --   None
168 --
169 -- In Arguments:
170 --   tk_group_name
171 --   tk_group_id
172 --   tk_resource_id
173 --
174 -- Post Success:
175 --   Processing continues if the name business rules have not been violated
176 --
177 -- Post Failure:
178 --   An application error is raised if the name is not valid
179 --
180 -- ----------------------------------------------------------------------------
181 Procedure chk_name
182   (
183    p_tk_group_name   in varchar2
184   ,p_tk_group_id     in number
185   ,p_tk_resource_id     in number
186   ,p_business_group_id in number
187   );
188 --
189 -- ----------------------------------------------------------------------------
190 -- |-----------------------< chk_tk_resource_id>---------------------------------|
191 -- ----------------------------------------------------------------------------
192 --
193 -- Description:
194 --   This procedure insures a valid tk_resource_id
195 --
196 -- Pre Conditions:
197 --   None
198 --
199 -- In Arguments:
200 --   tk_resource_id
201 --
202 -- Post Success:
203 --   Processing continues if the name business rules have not been violated
204 --
205 -- Post Failure:
206 --   An application error is raised if the name is not valid
207 --
208 -- ----------------------------------------------------------------------------
209 Procedure chk_tk_resource_id
210   (
211    p_tk_resource_id     in number
212   );
213 --
214 -- ----------------------------------------------------------------------------
215 -- |-----------------------< chk_delete >-------------------------------------|
216 -- ----------------------------------------------------------------------------
217 --
218 -- Description:
219 --   This procedure carries out delete time referential integrity checks
220 --   Currently there are none but include this now for minimum impact
221 --   in the future.
222 --
223 -- Pre Conditions:
224 --   None
225 --
226 -- In Arguments:
227 --   tk_group_id
228 --
229 -- Post Success:
230 --   Processing continues if the name is not being referenced
231 --
232 -- Post Failure:
233 --   An application error is raised if the rule is being used.
234 --
235 -- ----------------------------------------------------------------------------
236 Procedure chk_delete
237   (
238    p_tk_group_id in number
239   );
240 
241 
242 -- ----------------------------------------------------------------------------
243 -- |------------------------< get_employee >----------------------------------|
244 -- ----------------------------------------------------------------------------
245 --
246 -- Description:
247 --   This procedures returns the person id and full name associated with the
248 --   FND USER_ID profile and the HXC HXC_TIMEKEEPER_OVERRIDE profile
249 --   This information is used in the Timekeeper Group form.
250 --
251 -- Pre Conditions:
252 --   None
253 --
254 -- In Arguments:
255 --   p_employee_id
256 --   p_full_name
257 --   p_employee_number
258 --   p_override
259 --
260 -- Post Success:
261 --   Processing continues if the profiles are found
262 --
263 -- Post Failure:
264 --   An application error is raised if the rule is being used.
265 
266 PROCEDURE get_employee ( p_employee_id     IN OUT NOCOPY NUMBER
267                        , p_full_name       IN OUT NOCOPY VARCHAR2
268                        , p_employee_number IN OUT NOCOPY varchar2
269                        , p_override        IN OUT NOCOPY VARCHAR2 );
270 
271 -- ----------------------------------------------------------------------------
272 -- |------------------------< get_assignments >-------------------------------|
273 -- ----------------------------------------------------------------------------
274 --
275 -- Description:
276 --   This function returns a table of assignments based on as assignment set
277 --
278 -- Pre Conditions:
279 --   None
280 --
281 -- In Arguments:
282 --   p_assignment_set_id
283 --
284 -- Post Success:
285 --   Processing continues if the assignments are found
286 --
287 -- Post Failure:
288 --   Processing continues;
289 
290 FUNCTION get_people ( p_populate_id NUMBER
291 	,             p_populate_type VARCHAR2
292 	,             p_person_type VARCHAR2
293 	) RETURN t_people;
294 
295 END hxc_timekeeper_group_api;