1 PACKAGE per_abs_shadow_booking_pkg AS
2 -- $Header: peabsbkg.pkh 120.0 2005/05/31 04:45:10 appldev noship $
3
4 ----------------------------------------------------------------------------
5 --
6 -- Purpose:-
7 --
8 -- Create a shadow booking for the absence record.
9 --
10 -- Parameters:-
11 --
12 -- P_PERSON_ID = Identifier of person for whom a shadow booking
13 -- is being created. Must be supplied if Assignment Id
14 -- is not given.
15 -- P_ASSIGNMENT_ID = Identifier of assignment for whom a shadow booking
16 -- is being created. Must be supplied if Person Id is
17 -- not given.
18 -- P_ABSENCE_ID = Identifier of absence for which a shadow booking
19 -- is being created.
20 -- P_START_DATE = Start date of the absence.
21 -- P_END_DATE = End date of the absence.
22 -- X_BOOKING_ID = Identifier generated for the newly created booking
23 -- X_RETURN_STATUS = '0' = success, '1' = warning, '2' = error.
24 -- X_RETURN_MESSAGE = Message in case of return status '1' or '2'.
25 --
26 ----------------------------------------------------------------------------
27 PROCEDURE create_shadow_booking( p_person_id IN NUMBER DEFAULT NULL
28 , p_assignment_id IN NUMBER DEFAULT NULL
29 , p_absence_id IN NUMBER
30 , p_start_date IN DATE
31 , p_end_date IN DATE DEFAULT NULL
32 , x_booking_id OUT NOCOPY NUMBER
33 , x_return_status OUT NOCOPY NUMBER
34 , x_return_message OUT NOCOPY VARCHAR2
35 );
36
37 ----------------------------------------------------------------------------
38 --
39 -- Purpose:-
40 --
41 -- Update an existing shadow booking correcponding to changes to the
42 -- absence record.
43 --
44 -- Parameters:-
45 --
46 -- P_PERSON_ID = Identifier of person for whom a shadow booking
47 -- is being updated. Must be supplied if Assignment Id
48 -- is not given.
49 -- P_ASSIGNMENT_ID = Identifier of assignment for whom a shadow booking
50 -- is being updated. Must be supplied if Person Id is
51 -- not given.
52 -- P_ABSENCE_ID = Identifier of absence for which a shadow booking
53 -- is being updated.
54 -- P_START_DATE = Start date of the absence.
55 -- P_END_DATE = End date of the absence.
56 -- X_RETURN_STATUS = '0' = success, '1' = warning, '2' = error.
57 -- X_RETURN_MESSAGE = Message in case of return status '1' or '2'.
58 --
59 ----------------------------------------------------------------------------
60 PROCEDURE update_shadow_booking( p_person_id IN NUMBER DEFAULT NULL
61 , p_assignment_id IN NUMBER DEFAULT NULL
62 , p_absence_id IN NUMBER
63 , p_start_date IN DATE
64 , p_end_date IN DATE
65 , x_return_status OUT NOCOPY NUMBER
66 , x_return_message OUT NOCOPY VARCHAR2
67 );
68
69 ----------------------------------------------------------------------------
70 --
71 -- Purpose:-
72 --
73 -- Delete an existing shadow booking correcponding to delete of the
74 -- absence record.
75 --
76 -- Parameters:-
77 --
78 -- P_PERSON_ID = Identifier of person for whom a shadow booking
79 -- is being deleted. Must be supplied if Assignment Id
80 -- is not given.
81 -- P_ASSIGNMENT_ID = Identifier of assignment for whom a shadow booking
82 -- is being deleted. Must be supplied if Person Id is
83 -- not given.
84 -- P_ABSENCE_ID = Identifier of absence for which a shadow booking
85 -- is being deleted.
86 -- X_RETURN_STATUS = '0' = success, '1' = warning, '2' = error.
87 -- X_RETURN_MESSAGE = Message in case of return status '1' or '2'.
88 --
89 ----------------------------------------------------------------------------
90 PROCEDURE delete_shadow_booking( p_person_id IN NUMBER DEFAULT NULL
91 , p_assignment_id IN NUMBER DEFAULT NULL
92 , p_absence_id IN NUMBER
93 , x_return_status OUT NOCOPY NUMBER
94 , x_return_message OUT NOCOPY VARCHAR2
95 );
96
97 ----------------------------------------------------------------------------
98 --
99 -- Purpose:-
100 --
101 -- Retrieve absences as shadow bookings for the given person assignment.
102 --
103 -- Parameters:-
104 --
105 -- P_PERSON_ID = Identifier of person for whom shadow bookings
106 -- are being retrieved. Must be supplied if Assignment
107 -- Id is not given.
108 -- P_ASSIGNMENT_ID = Identifier of assignment for whom shadow bookings
109 -- are being retrieved. Must be supplied if Person
110 -- Id is not given.
111 -- P_START_DATE = Start date of period of interest.
112 -- P_END_DATE = End date of period of interest.
113 -- X_BOOKINGS = Varray of bookings retrieved for the person and
114 -- period.
115 -- X_RETURN_STATUS = '0' = success, '1' = warning, '2' = error.
116 -- X_RETURN_MESSAGE = Message in case of return status '1' or '2'.
117 --
118 ----------------------------------------------------------------------------
119 PROCEDURE get_shadow_booking( p_person_id IN NUMBER DEFAULT NULL
120 , p_assignment_id IN NUMBER DEFAULT NULL
121 , p_start_date IN DATE DEFAULT NULL
122 , p_end_date IN DATE DEFAULT NULL
123 , x_bookings OUT NOCOPY per_abs_booking_varray
124 , x_return_status OUT NOCOPY NUMBER
125 , x_return_message OUT NOCOPY VARCHAR2
126 );
127
128 END per_abs_shadow_booking_pkg;