1 Package HR_CALENDAR_ENTRY_API AUTHID CURRENT_USER as
2 /* $Header: peentapi.pkh 120.0 2005/05/31 08:08:15 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |-----------------------< create_calendar_entry >---------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- This API creates a calendar entry.
11 --
12 --
13 -- Prerequisites:
14 --
15 -- In Parameters:
16 -- Name Reqd Type Description
17 -- p_validate boolean If true, the database
18 -- remains unchanged. If false,
19 -- the calendar entry is created.
20 -- p_effective_date Yes date Application effective date.
21 -- p_name Yes varchar2 The name of the calendar entry.
22 -- p_type Yes varchar2 The type of the calendar entry.
23 -- p_start_date Yes date The start date (time component will be truncated)
24 -- of the calendar entry.
25 -- p_start_hour varchar2 The lookup_code of the hour that the entry starts.
26 -- p_start_min varchar2 The lookup_code of the minute (to nearest 5 minute)
27 -- that the entry starts
28 -- p_end_date Yes date The end date (time component will be truncated)
29 -- of the calendar entry.
30 -- p_end_hour varchar2 The lookup_code of the hour that the entry ends.
31 -- p_end_min varchar2 The lookup_code of the minute (to nearest 5 minute)
32 -- that the entry ends.
33 -- p_business_group_id number The id of the business group.
34 -- p_description varchar2 Description of the calendar entry.
35 -- p_hierarchy_id number ID of the generic hierarchy (per_gen_hierarchy)
36 -- that will be used when creating entry values
37 -- for the entry (as opposed to stand-alone entry values).
38 -- p_value_set_id number ID of the value set that will be used when creating
39 -- stand-alone (non-hierarchy) entry values.
40 -- p_organization_structure_id number ID of the Organization Structure (hierarchy) that will be
41 -- used when creating entry values.
42 -- p_org_structure_version_id number ID of the specific Organization Structure Version
43 -- for the Organization Structure.
44 -- p_legislation_code varchar2 Seed data legislative owner code - Internal Development Use only.
45 -- p_identifier_key varchar2 Seed data loader developer key - Internal Development Use only.
46 --
47 -- Post Success:
48 -- The calendar entry record is created and the API sets the following out
49 -- parameters.
50 --
54 -- If p_validate is true, set to
51 -- Name Type Description
52 -- p_calendar_entry_id number If p_validate is false, uniquely
53 -- identifies the calendar entry created.
55 -- null.
56 -- p_object_version_number number If p_validate is false, set to
57 -- the version number of this
58 -- calendar entry.
59 -- If p_validate is true, set to
60 -- null.
61 --
62 -- Post Failure:
63 -- The API does not create the calendar entry record and raises an error.
64 --
65 -- Access Status:
66 -- Public.
67 --
68 -- {End Of Comments}
69 --
70
71 procedure create_calendar_entry
72 (p_validate in boolean default false
73 ,p_effective_date in date
74 ,p_name in varchar2
75 ,p_type in varchar2
76 ,p_start_date in date
77 ,p_start_hour in varchar2 default null
78 ,p_start_min in varchar2 default null
79 ,p_end_date in date
80 ,p_end_hour in varchar2 default null
81 ,p_end_min in varchar2 default null
82 ,p_business_group_id in number default null
83 ,p_description in varchar2 default null
84 ,p_hierarchy_id in number default null
85 ,p_value_set_id in number default null
86 ,p_organization_structure_id in number default null
87 ,p_org_structure_version_id in number default null
88 ,p_legislation_code in varchar2 default null
89 ,p_identifier_key in varchar2 default null
90 ,p_calendar_entry_id out nocopy number
91 ,p_object_version_number out nocopy number
92 );
93
94 --
95 -- ----------------------------------------------------------------------------
96 -- |------------------------< update_calendar_entry >-------------------------|
97 -- ----------------------------------------------------------------------------
98 -- {Start Of Comments}
99 --
100 -- Description:
101 -- This API updates a calendar entry as identified by p_calendar_entry_id.
102 --
103 -- Prerequisites:
104 -- The calendar entry record identified by p_calendar_entry_id and
105 -- p_object_version_number must exist.
106 --
107 -- In Parameters:
108 -- Name Reqd Type Description
109 -- p_validate boolean If true, the database
110 -- remains unchanged. If false,
111 -- the calendar entry is updated.
112 -- p_effective_date Yes date Application effective date.
113 -- p_calendar_entry_id Yes number Surrogate id of the calendar entry
114 -- p_object_version_number Yes number Version number of the calendar entry record.
115 -- p_name varchar2 The type of the calendar entry.
116 -- p_type varchar2 The type of calendar entry.
117 -- p_start_date date The start date (inc. time component)
118 -- of the calendar entry.
119 -- p_start_hour varchar2 The lookup_code of the hour that the entry starts.
120 -- p_start_min varchar2 The lookup_code of the minute (to nearest 5 minute)
121 -- that the entry starts
122 -- p_end_date date The end date (inc. time component)
123 -- of the calendar entry.
124 -- p_end_hour varchar2 The lookup_code of the hour that the entry ends.
125 -- p_end_min varchar2 The lookup_code of the minute (to nearest 5 minute)
126 -- that the entry ends.
127 -- p_description varchar2 Description of the calendar entry.
128 -- p_hierarchy_id number ID of the generic hierarchy (per_gen_hierarchy)
129 -- that will be used when creating entry values
130 -- for the entry (as opposed to stand-alone entry values).
131 -- p_value_set_id number ID of the value set that will be used when creating
132 -- stand-alone (non-hierarchy) entry values
133 -- p_organization_structure_id number ID of the Organization Structure (hierarchy) that will be
134 -- used when creating entry values.
135 -- p_org_structure_version_id number ID of the specific Organization Structure Version
136 -- for the Organization Structure.
137 -- Post Success:
138 -- The calendar entry record is updated and the API sets the following out
139 -- parameters.
140 --
141 -- Name Type Description
142 -- p_object_version_number number If p_validate is false, set to
143 -- the new version number of this
144 -- calendar entry.
145 -- If p_validate is true, set to
146 -- null same value passed in.
147 --
148 -- Post Failure:
149 -- The API does not update the calendar entry and raises an error.
150 --
151 -- Access Status:
152 -- Public
153 --
154 -- {End Of Comments}
155 --
156 procedure update_calendar_entry
157 (p_validate in boolean default false
158 ,p_effective_date in date
159 ,p_calendar_entry_id in number
160 ,p_object_version_number in out nocopy number
161 ,p_name in varchar2 default hr_api.g_varchar2
162 ,p_type in varchar2 default hr_api.g_varchar2
163 ,p_start_date in date
164 ,p_start_hour in varchar2 default hr_api.g_varchar2
165 ,p_start_min in varchar2 default hr_api.g_varchar2
166 ,p_end_date in date
167 ,p_end_hour in varchar2 default hr_api.g_varchar2
168 ,p_end_min in varchar2 default hr_api.g_varchar2
169 ,p_description in varchar2 default hr_api.g_varchar2
170 ,p_hierarchy_id in number default hr_api.g_number
171 ,p_value_set_id in number default hr_api.g_number
172 ,p_organization_structure_id in number default hr_api.g_number
173 ,p_org_structure_version_id in number default hr_api.g_number
174 ,p_business_group_id in number default null
175 );
176
177 -- ----------------------------------------------------------------------------
178 -- |-------------------------< delete_calendar_entry >------------------------|
179 -- ----------------------------------------------------------------------------
180 -- {Start Of Comments}
181 --
182 -- Description:
183 -- This API deletes a calendar entry record as identified by the in parameter
184 -- p_calendar_entry_id and p_object_version_number after first deleting any
185 -- existing per_cal_entry_values records for the calendar entry.
186 --
187 -- Prerequisites:
188 -- The calendar entry as identified by the in parameter p_calendar_entry_id and the
189 -- in parameter p_object_version_number must already exist.
190 --
191 -- In Parameters:
192 -- Name Reqd Type Description
193 -- p_validate boolean If true, the database
194 -- remains unchanged. If false,
195 -- the calendar entry is deleted.
196 -- p_calendar_entry_id Yes number Primary key of the calendar entry.
197 -- p_object_version_number Yes number Current version of the
198 -- calendar entry
199 --
200 -- Post Success:
201 -- The calendar entry is deleted.
202 --
203 -- Post Failure:
204 -- The API does not delete the calendar entry and raises an error.
205 --
206 -- Access Status:
207 -- Public
208 --
209 -- {End Of Comments}
210 --
211 procedure delete_calendar_entry
212 (p_validate in boolean default false
213 ,p_calendar_entry_id in number
214 ,p_object_version_number in number
215 );
216 --
217 --
218 end HR_CALENDAR_ENTRY_API;