DBA Data[Home] [Help]

PACKAGE: APPS.PER_PER_DEL

Source


1 Package per_per_del AUTHID CURRENT_USER as
2 /* $Header: peperrhi.pkh 120.3 2011/11/17 09:18:28 sidsaxen ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |------------------------------< delete_dml >------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   This procedure calls the dt_delete_dml control logic which handles
11 --   the actual datetrack dml.
12 --
13 -- Pre Conditions:
14 --   This is an internal private procedure which must be called from the del
15 --   procedure.
16 --
17 -- In Arguments:
18 --   A Pl/Sql record structre.
19 --
20 -- Post Success:
21 --   Processing contines.
22 --
23 -- Post Failure:
24 --   No specific error handling is required within this procedure.
25 --
26 -- Developer Implementation Notes:
27 --   None.
28 --
29 -- Access Status:
30 --   Internal Table Handler Use Only.
31 --
32 -- {End Of Comments}
33 -- ----------------------------------------------------------------------------
34 Procedure delete_dml
35 	(p_rec 			 in out nocopy per_per_shd.g_rec_type,
36 	 p_effective_date	 in	date,
37 	 p_datetrack_mode	 in	varchar2,
38 	 p_validation_start_date in	date,
39 	 p_validation_end_date	 in	date);
40 --
41 -- ----------------------------------------------------------------------------
42 -- |---------------------------------< del >----------------------------------|
43 -- ----------------------------------------------------------------------------
44 -- {Start Of Comments}
45 --
46 -- Description:
47 --   This procedure is the record interface for the datetrack delete
48 --   business process for the specified entity. The role of this
49 --   process is to delete the dateracked row from the HR schema.
50 --   This process is the main backbone of the del business process. The
51 --   processing of this procedure is as follows:
52 --   1) Ensure that the datetrack delete mode is valid.
53 --   2) If the p_validate argument has been set to true then a savepoint is
54 --      issued.
55 --   3) The controlling validation process delete_validate is then executed
56 --      which will execute all private and public validation business rule
57 --      processes.
58 --   4) The pre_delete business process is then executed which enables any
59 --      logic to be processed before the delete dml process is executed.
60 --   5) The delete_dml process will physical perform the delete dml for the
61 --      specified row.
62 --   6) The post_delete business process is then executed which enables any
63 --      logic to be processed after the delete dml process.
64 --   7) If the p_validate argument has been set to true an exception is raised
65 --      which is handled and processed by performing a rollback to the
66 --      savepoint which was issued at the beginning of the del process.
67 --
68 -- Pre Conditions:
69 --   The main arguments to the business process have to be in the record
70 --   format.
71 --
72 -- In Arguments:
73 --   p_effective_date
74 --     Specifies the date of the datetrack update operation.
75 --   p_datetrack_mode
76 --     Determines the datetrack update mode.
77 --   p_validate
78 --     Determines if the business process is to be validated. Setting this
79 --     boolean value to true will invoke the process to be validated. The
80 --     default is false. The validation is controlled by a savepoint and
81 --     rollback mechanism. The savepoint is issued at the beginning of the
82 --     business process and is rollbacked at the end of the business process
83 --     when all the processing has been completed. The rollback is controlled
84 --     by raising and handling the exception hr_api.validate_enabled. We use
85 --     the exception because, by raising the exception with the business
86 --     process, we can exit successfully without having any of the 'OUT'
87 --     arguments being set.
88 --
89 -- Post Success:
90 --   The specified row will be fully validated and deleted for the specified
91 --   entity without being committed. If the p_validate argument has been set
92 --   to true then all the work will be rolled back.
93 --
94 -- Post Failure:
95 --   If an error has occurred, an error message will be supplied with the work
96 --   rolled back.
97 --   A failure will occur if any of the following conditions are found:
98 --   1) If future changes to SYSTEM_PERSON_TYPE exist and delete mode is
99 --      delete_next_change or future_change
100 --   2) If assignments exist which are the only ones in an
101 --      assignment set and where that assignment is included.
102 --   3) Not allowed if rows exist in PAY_ASSIGNMENT_ACTIONS
103 --      for any of the persons assignments
104 --   4) If person exists in PER_LETTER_REQUEST_LINES
105 --   5) If person exists in PER_CONTACT_RELATIONSHIPS
106 --   6) If person exists in PER_EVENTS as an internal contact
107 --   7) If person exists in PER_BOOKINGS
108 --   8) If person has only one or none assignments
109 --   9) If person exists in PER_ASSIGNMENTS_F as a recruiter or
110 --      supervisor
111 --  10) If person has accepted their own termination in
112 --      PER_PERIODS_OF_SERVICE
113 --  11) If person exists in PER_PERSON_ANALYSES
114 --  12) If person exists in PER_ABSENCE_ATTENDANCES
115 --  13) If person exists in PER_RECRUITMENT_ACTIVITIES
116 --  14) If person exists in PER_REQUISITIONS
117 --  15) If person exists in PER_VACANCIES
118 --  16) If person has any link element entries
119 --  17) If person has any entry adjustments, overides, etc
120 --  18) If person exists in PER_ASSIGNMENT_EXTRA_INFO
121 --  19) If person exists in PER_SECONDARY_ASS_STATUSES
122 --  20) If person exists in PER_EVENTS
123 --  21) If person exists in PER_SPINAL_POINT_PLACEMENTS_F
124 --  22) If person exists in PER_ QUICKPAINT_RESULT_TEXT
125 --  23) If person exists in PER_COBRA_COV_ENROLLMENTS
126 --
127 -- Developer Implementation Notes:
128 --   None.
129 --
130 -- Access Status:
131 --   Internal Development Use Only.
132 --
133 -- {End Of Comments}
134 -- ----------------------------------------------------------------------------
135 Procedure del
136   (
137   p_rec			in out nocopy 	per_per_shd.g_rec_type,
138   p_effective_date	in 	date,
139   p_datetrack_mode	in 	varchar2,
140   p_validate   		in 	boolean default false
141   );
142 --
143 -- ----------------------------------------------------------------------------
144 -- |---------------------------------< del >----------------------------------|
145 -- ----------------------------------------------------------------------------
146 -- {Start Of Comments}
147 --
148 -- Description:
149 --   This procedure is the attribute interface for the delete business
150 --   process for the specified entity and is the outermost layer. The role
151 --   of this process is to validate and delete the specified row from the
152 --   HR schema. The processing of this procedure is as follows:
153 --   1) The attributes are converted into a local record structure by
154 --      explicitly coding the attribute arguments into the g_rec_type
155 --      datatype.
156 --   2) After the conversion has taken place, the corresponding record del
157 --      interface business process is executed.
158 --
159 -- Pre Conditions:
160 --
161 -- In Arguments:
162 --   p_effective_date
163 --     Specifies the date of the datetrack update operation.
164 --   p_datetrack_mode
165 --     Determines the datetrack update mode.
166 --   p_validate
167 --     Determines if the business process is to be validated. Setting this
168 --     Boolean value to true will invoke the process to be validated.
169 --     The default is false.
170 --
171 -- Post Success:
172 --   The specified row will be fully validated and deleted for the specified
173 --   entity without being committed (or rollbacked depending on the
174 --   p_validate status).
175 --
176 -- Post Failure:
177 --   If an error has occurred, an error message will be supplied with the work
178 --   rolled back. Refere to the del record interfacefor detailsof possible
179 --   failures
180 --
181 -- Developer Implementation Notes:
182 --   The attrbute in arguments should be modified as to the business process
183 --   requirements.
184 --
185 -- Access Status:
186 --   Internal Development Use Only.
187 --
188 -- {End Of Comments}
189 -- ----------------------------------------------------------------------------
190 Procedure del
191   (
192   p_person_id	  in 	 number,
193   p_effective_start_date     out nocopy date,
194   p_effective_end_date	     out nocopy date,
195   p_object_version_number in out nocopy number,
196   p_effective_date	  in     date,
197   p_datetrack_mode  	  in     varchar2,
198   p_validate		  in     boolean default false
199   );
200 --
201 end per_per_del;