DBA Data[Home] [Help]

PACKAGE: APPS.HXC_BLOCK_COLLECTION_UTILS

Source


1 PACKAGE hxc_block_collection_utils AS
2 /* $Header: hxcbkcout.pkh 120.1 2005/11/15 16:03:47 arundell noship $ */
3 
4 --
5 -- ----------------------------------------------------------------------------
6 -- |-------------------<     get_application_period     >---------------------|
7 -- ----------------------------------------------------------------------------
8 -- {Start Of Comments}
9 --
10 -- Description:
11 --   This function returns the application period  block and attribute table
12 --   structures based on the passed application period id.  This procedure is
13 --   the same as get_timecard, with the exception that the timecard scope
14 --   block is replaced with an application period.  All days within the
15 --   application period are returned as its children, as are the details
16 --   associted with the application period from HXC_AP_DETAIL_LINKS.  The
17 --   security attributes are not returned with this structure, for middle-tier
18 --   performance reasons.  This procedure connects a dummy APPROVAL attribute
19 --   to the application period scope record, which contains information
20 --   about the time recipient associated with this approval period, who
21 --   actioned the approval notification, if available, and the actual
22 --   approval status.
23 --
24 -- Prerequisites:
25 --   A valid application period id must be passed.
26 --
27 -- In Parameters:
28 --   Name                           Reqd Type     Description
29 --   p_app_period_id                   Y number   App Period Id to fetch
30 --
31 -- Out Parameters:
32 --   Name                           Reqd Type     Description
33 --   p_blocks                          Y BLOCKS   Timecard blocks.
34 --   p_attributes                      Y ATTRIBUTETimecard attributes.
35 --
36 -- Post Success:
37 --   The block and attribute structures are populated as expected.  Note:
38 --   if the application period  id does not exist, then the returned
39 --   structures are not initialized, i.e. (p_blocks=null) is true.
40 --
41 -- Post Failure:
42 --   This function does not fail.
43 --
44 -- Access Status:
45 --   Public.
46 --
47 -- {End Of Comments}
48 --
49    PROCEDURE get_application_period
50      (p_app_period_id  in            hxc_time_building_blocks.time_building_block_id%type,
51       p_blocks            out NOCOPY hxc_block_table_type,
52       p_attributes        out NOCOPY hxc_attribute_table_type
53      );
54 --
55 -- ----------------------------------------------------------------------------
56 -- |-------------------<     get_application_period     >---------------------|
57 -- ----------------------------------------------------------------------------
58 -- {Start Of Comments}
59 --
60 -- Description:
61 --   This function returns the application period  block and attribute table
62 --   structures based on the passed application period id.  This procedure is
63 --   the same as get_timecard, with the exception that the timecard scope
64 --   block is replaced with an application period.  All days within the
65 --   application period are returned as its children, as are the details
66 --   associted with the application period from HXC_AP_DETAIL_LINKS.  The
67 --   security attributes are not returned with this structure, for middle-tier
68 --   performance reasons.  This procedure connects a dummy APPROVAL attribute
69 --   to the application period scope record, which contains information
70 --   about the time recipient associated with this approval period, who
71 --   actioned the approval notification, if available, and the actual
72 --   approval status.
73 --
74 --   This overloaded version of the get_application_period procedure
75 --   obtains data associated with an application period that falls
76 --   between two dates.  This is useful, if for example, the application
77 --   period is longer than the timecard period.  The approval comments
78 --   page uses this version of the code rather than the other version to
79 --   account for longer or shorter application periods.
80 --
81 -- Prerequisites:
82 --   A valid application period id must be passed.
83 --
84 -- In Parameters:
85 --   Name                           Reqd Type     Description
86 --   p_app_period_id                   Y number   App Period Id to fetch
87 --   p_start_time                      N date     Start time of dates to fetch
88 --   p_stop_time                       N date     Stop time of dates to fetch
89 --
90 -- Out Parameters:
91 --   Name                           Reqd Type     Description
92 --   p_blocks                          Y BLOCKS   Timecard blocks.
93 --   p_attributes                      Y ATTRIBUTETimecard attributes.
94 --
95 -- Post Success:
96 --   The block and attribute structures are populated as expected.  Note:
97 --   if the application period  id does not exist, then the returned
98 --   structures are not initialized, i.e. (p_blocks=null) is true.
99 --
100 -- Post Failure:
101 --   This function does not fail.
102 --
103 -- Access Status:
104 --   Public.
105 --
106 -- {End Of Comments}
107 --
108    PROCEDURE get_application_period
109      (p_app_period_id  in            hxc_time_building_blocks.time_building_block_id%type,
110       p_start_time     in            date,
111       p_stop_time      in            date,
112       p_blocks            out NOCOPY hxc_block_table_type,
113       p_attributes        out NOCOPY hxc_attribute_table_type
114      );
115 --
116 -- ----------------------------------------------------------------------------
117 -- |------------------------<     get_timecard     >--------------------------|
118 -- ----------------------------------------------------------------------------
119 -- {Start Of Comments}
120 --
121 -- Description:
122 --   This function returns the timecard block and attribute table structures
123 --   based on the passed timecard id.  The structures are ordered, such that
124 --   the first block, with index 1, is the timecard, then the days appear
125 --   and finally the details.  This order is guaranteed.  The timecard
126 --   structures returned correspond to the timecard object for the latest
127 --   (active) timecard object version number.  Historical timecards can not
128 --   be obtained with this method.
129 --
130 -- Prerequisites:
131 --   A valid timecard id must be passed.
132 --
133 -- In Parameters:
134 --   Name                           Reqd Type     Description
135 --   p_timecard_id                     Y number   Timecard id to fetch
136 --
137 -- Out Parameters:
138 --   Name                           Reqd Type     Description
139 --   p_blocks                          Y BLOCKS   Timecard blocks.
140 --   p_attributes                      Y ATTRIBUTETimecard attributes.
141 --
142 -- Post Success:
143 --   The block and attribute structures are populated as expected.  Note:
144 --   if the timecard id does not exist, then the returned structures are
145 --   not initialized, i.e. (p_blocks=null) is true.
146 --
147 -- Post Failure:
148 --   This function does not fail.
149 --
150 -- Access Status:
151 --   Public.
152 --
153 -- {End Of Comments}
154 --
155    PROCEDURE get_timecard
156      (p_timecard_id    in            hxc_time_building_blocks.time_building_block_id%type,
157       p_blocks            out NOCOPY hxc_block_table_type,
158       p_attributes        out NOCOPY hxc_attribute_table_type
159      );
160 --
161 -- ----------------------------------------------------------------------------
162 -- |------------------------<     get_timecard     >--------------------------|
163 -- ----------------------------------------------------------------------------
164 -- {Start Of Comments}
165 --
166 -- Description:
167 --   This function returns the timecard block and attribute table structures
168 --   based on the passed timecard id.  The structures are ordered, such that
169 --   the first block, with index 1, is the timecard, then the days appear
170 --   and finally the details.  This order is guaranteed.  The timecard
171 --   structures returned correspond to the timecard object for the latest
172 --   (active) timecard object version number.  Historical timecards can not
173 --   be obtained with this method.  This overloaded version also returns
174 --   information about the translation display key of the timecard for use
175 --   in the self service timecard entry page.
176 --
177 -- Prerequisites:
178 --   A valid timecard id must be passed.
179 --
180 -- In Parameters:
181 --   Name                           Reqd Type     Description
182 --   p_timecard_id                     Y number   Timecard id to fetch
183 --   p_missing_rows                    Y Boolean  If true, display key info
184 --                                                is also returned.  No
185 --                                                display key info returned
186 --                                                otherwise.
187 --
188 -- Out Parameters:
189 --   Name                           Reqd Type     Description
190 --   p_blocks                          Y BLOCKS   Timecard blocks.
191 --   p_attributes                      Y ATTRIBUTETimecard attributes.
192 --   p_row_data                        Y Row Used Index of rows used
193 --   p_missing_rows                    Y Boolean  True if missing rows
194 --                                                False otherwise.
195 --
196 -- Post Success:
197 --   The block and attribute structures are populated as expected.  Note:
198 --   if the timecard id does not exist, then the returned structures are
199 --   not initialized, i.e. (p_blocks=null) is true.
200 --   If p_missing_rows was passed as true, the p_row_data structure will
201 --   be populated for the rows used by the timecard as per the translation
202 --   display keys of the timecard detail building blocks.
203 --   If this parameter was initially true, it will remain true if the
204 --   translation rows are not contiguous starting at 1 for the details.
205 --   If all rows are used, then this parameter will be returned as false,
206 --   if it was passed as true to begin with.
207 --   If p_missing_rows was false on entry to the call, no translation row
208 --   information is returned, and the value remains false.
209 --
210 -- Post Failure:
211 --   This function does not fail.
212 --
213 -- Access Status:
214 --   Public.
215 --
216 -- {End Of Comments}
217 --
218    PROCEDURE get_timecard
219      (p_timecard_id    in            hxc_time_building_blocks.time_building_block_id%type,
220       p_blocks            out NOCOPY hxc_block_table_type,
221       p_attributes        out NOCOPY hxc_attribute_table_type,
222       p_row_data          out NOCOPY hxc_trans_display_key_utils.translation_row_used,
223       p_missing_rows   in out NOCOPY boolean
224      );
225 --
226 -- ----------------------------------------------------------------------------
227 -- |------------------------<     get_template     >--------------------------|
228 -- ----------------------------------------------------------------------------
229 -- {Start Of Comments}
230 --
231 -- Description:
232 --   This function returns the template block and attribute table structures
233 --   based on the passed template id.  The structures are ordered, such that
234 --   the first block, with index 1, is the template, then the days appear
235 --   and finally the details.  This order is guaranteed.  The template
236 --   structures returned correspond to the template object for the latest
237 --   (active) template object version number.  Historical timecards can not
238 --   be obtained with this method.  This also returns the start and stop time
239 --   stamped on the dummy start and stop time of the template days, so that
240 --   the timecard/template retrieval code has easy access to this information
241 --   to reset the parent building blocks of the details (append) or to
242 --   reset the dates of the day building blocks based on the timecard period
243 --   (overwrrite).
244 --
245 -- Prerequisites:
246 --   A valid template id must be passed.
247 --
248 -- In Parameters:
249 --   Name                           Reqd Type     Description
250 --   p_template_id                     Y number   Timecard id to fetch
251 --
252 -- Out Parameters:
253 --   Name                           Reqd Type     Description
254 --   p_blocks                          Y BLOCKS   Template blocks.
255 --   p_attributes                      Y ATTRIBUTETemplate attributes.
256 --   p_template_start_time             Y date     Start date of the template
257 --   p_template_stop_time              Y date     Stop date of the template
258 --
259 -- Post Success:
260 --   The block and attribute structures are populated as expected.  Note:
261 --   if the template id does not exist, then the returned structures are
262 --   not initialized, i.e. (p_blocks=null) is true.
263 --   p_template_stat_time is set to the start time on the timecard-template
264 --   scope building block, and the p_template_stop_time is set to the
265 --   stop_time of the timecard-template scope building block.
266 --
267 -- Post Failure:
268 --   This function does not fail.
269 --
270 -- Access Status:
271 --   Public.
272 --
273 -- {End Of Comments}
274 --
275    PROCEDURE get_template
276      (p_template_id         in            hxc_time_building_blocks.time_building_block_id%type,
277       p_blocks                out NOCOPY hxc_block_table_type,
278       p_attributes            out NOCOPY hxc_attribute_table_type,
279       p_template_start_time   out NOCOPY date,
280       p_template_stop_time    out NOCOPY date
281      );
282 
283 END hxc_block_collection_utils;