DBA Data[Home] [Help]

PACKAGE: APPS.PER_HRTCA_MERGE

Source


1 package per_hrtca_merge as
2 /* $Header: perhrtca.pkh 120.3.12010000.1 2008/07/28 05:43:02 appldev ship $ */
3   --
4   g_prev_last_name_len number default null;
5   --
6 --bug no 5546586 starts here
7   g_old_email_address        per_all_people_f.email_address%type;
8 --bug no 5546586 ends here
9 
10   TYPE g_party_id_type IS TABLE OF NUMBER(15) index by binary_integer;
11   --
12   procedure migrate_all_hr_persons
13     (p_number_of_workers in number default 1,
14      p_current_worker    in number default 1);
15   --
16   procedure migrate_all_hr_email
17     (p_number_of_workers in number default 1,
18      p_current_worker    in number default 1);
19   --
20   procedure migrate_all_hr_gender
21     (p_number_of_workers in number default 1,
22      p_current_worker    in number default 1);
23   --
24   procedure create_tca_person
25     (p_rec                in out nocopy per_all_people_f%rowtype);
26   --
27   procedure update_tca_person
28     (p_rec                in out nocopy per_all_people_f%rowtype,
29      p_overwrite_data     in varchar2 default 'Y');
30   --
31   procedure replicate_person_across_bg
32     (p_rec                in out nocopy per_all_people_f%rowtype,
33      p_overwrite_data     in varchar2 default 'Y');
34   --
35   procedure create_update_contact_point
36     (p_rec                in out nocopy per_all_people_f%rowtype);
37   --
38   procedure per_party_merge
39     (p_entity_name        in  varchar2,
40      p_from_id            in  number,
41      p_to_id              out nocopy number,
42      p_from_fk_id         in  number,
43      p_to_fk_id           in  number,
44      p_parent_entity_name in  varchar2,
45      p_batch_id           in  number,
46      p_batch_party_id     in  number,
47      p_return_status      out nocopy varchar2);
48   --
49   -- ------------------------------------------------------------------------------
50   -- |------------------------------< partyCleanup >------------------------------|
51   -- ------------------------------------------------------------------------------
52   --
53   -- procedure to process a range of rowids and purge party data when
54   -- required.
55   --
56     procedure partyCleanup(
57       p_process_ctrl    IN            varchar2,
58       p_start_rowid     IN            rowid,
59       p_end_rowid       IN            rowid,
60       p_rows_processed    OUT nocopy number);
61   --
62   -- ------------------------------------------------------------------------------
63   -- |------------------------< partycleanup_full_conc >--------------------------|
64   -- ------------------------------------------------------------------------------
65   --
66   procedure partycleanup_full_conc(errbuf        out NOCOPY  varchar2,
67                                    retcode       out NOCOPY  varchar2
68                                   );
69   --
70   --
71   -- ------------------------------------------------------------------------------
72   -- |------------------------< partycleanup_tca_conc >--------------------------|
73   -- ------------------------------------------------------------------------------
74   --
75   procedure partycleanup_tca_conc(errbuf        out NOCOPY  varchar2,
76                                   retcode       out NOCOPY  varchar2);
77   --
78   -- ------------------------------------------------------------------------------
79   -- |------------------------< CHK_GUPUD_RUN_BOOLEAN >--------------------------|
80   -- ------------------------------------------------------------------------------
81   --
82   procedure CHK_GUPUD_RUN_BOOLEAN(retstring     out NOCOPY  varchar2);
83   --
84   -- ----------------------------------------------------------------------------
85   -- |----------------------------< get_party_details >-------------------------|
86   -- ----------------------------------------------------------------------------
87   -- {Start Of Comments}
88   --
89   -- Description:
90   --   This function will return a single record for a given party id and
91   --   effective date
92   --
93   -- Prerequisites:
94   --   A valid record should be existing in per_all_people_f table for the
95   --   given party id and effective date
96   --
97   -- In Parameters:
98   --   Name                        Reqd   Type     Description
99   --   p_party_id                  Yes    Number   Party identifier
100   --   p_effective_date            Yes    Date     Effective date (Session date)
101   --
102   -- Post Success:
103   --   A single record will be returned for the given party id and effective date
104   --
105   -- Post Failure:
106   --   None
107   --
108   -- Access Status:
109   --   Public.
110   --
111   -- {End Of Comments}
112   --
113   -- ---------------------------------------------------------------------------
114     function get_party_details
115       (p_party_id           in number,
116        p_effective_date     in date) return per_per_shd.g_rec_type;
117   --
118   --
119   -- ------------------------------------------------------------------------------
120   -- |--------------------------< get_tca_merge_actions >-----------------------|
121   -- ------------------------------------------------------------------------------
122   --
123   -- Description:
124   --   This function will return an action to be performed. This function
125   --   returns one of the following actions.
126   --
127   --        'CREATE PARTY'
128   --        'AVOID CREATE PARTY'
129   --        'PARTY VALID'
130   --        'PARTY INVALID'
131   --
132   -- Prerequisites:
133   --   A valid record should be existing in per_all_people_f table for the
134   --   given party id and effective date
135   --
136   -- In Parameters:
137   --   Name                        Reqd   Type     Description
138   --   p_person_id                 Yes    Number   Person Identifier
139   --   p_party_id                  Yes    Number   Party identifier
140   --
141   -- Post Success:
142   --   Function returns actions to be performed depending upon the person_id,
143   --   party_id and the system_person_type, at the end of time.
144   --
145   -- Post Failure:
146   --   None
147   --
148   -- Access Status:
149   --   Public.
150   --
151   -- {End Of Comments}
152   --
153   -- ---------------------------------------------------------------------------
154   --
155   FUNCTION get_tca_merge_actions
156     (p_person_id  in number
157     ,p_party_id   in number
158     )
159   RETURN VARCHAR2;
160   --
161   --
162   -- ----------------------------------------------------------------------------
163   -- |----------------------------< get_person_details >-------------------------|
164   -- ----------------------------------------------------------------------------
165   -- {Start Of Comments}
166   --
167   -- Description:
168   --   This function will return a single record for a given party id, person_id and
169   --   effective date
170   --
171   -- Prerequisites:
172   --   A valid record should be existing in per_all_people_f table for the
173   --   given party id,person id and effective date
174   --
175   -- In Parameters:
176   --   Name                        Reqd   Type     Description
177   --   p_party_id                  Yes    Number   Party identifier
178   --   p_person_id                 Yes    Number   Person Identifier
179   --   p_effective_date            Yes    Date     Effective date (Session date)
180   --
181   -- Post Success:
182   --   A single record will be returned for the given party id,person_id and effective
183   --   date
184   --
185   -- Post Failure:
186   --   None
187   --
188   -- Access Status:
189   --   Public.
190   --
191   -- {End Of Comments}
192   --
193   -- ---------------------------------------------------------------------------
194   function get_person_details
195            (p_party_id           in number,
196             p_person_id          in number,
197             p_effective_date     in date) return per_per_shd.g_rec_type;
198   --
199   --
200   -- ----------------------------------------------------------------------------
201   -- |-------------------------< migrate_all_hr_persons >-----------------------|
202   -- ----------------------------------------------------------------------------
203   -- {Start Of Comments}
204   --
205   -- Description:
206   --   Procedure to update the party id for the valid persons.This is called from
207   --   the upgrade script perhrtca3.sql.
208   --
209   -- Prerequisites:
210   --   None
211   --
212   -- In Parameters:
213   --   Name                        Reqd   Type     Description
214   --   p_start_rowid               Yes    Rowid    Starting Person rowid in this range
215   --   p_end_rowid                 Yes    Rowid    Final Person rowid in this range
216   --
217   -- Out Parameters:
218   --   Name                        Reqd   Type     Description
219   --   p_rows_processed            Yes    Number   Number of rows processed.
220   --
221   -- Post Success:
222   --   Number of records processed will be assigned to p_row_processed.
223   --
224   -- Post Failure:
225   --   None
226   --
227   -- Access Status:
228   --   Public.
229   --
230   -- {End Of Comments}
231   --
232   -- ---------------------------------------------------------------------------
233   procedure migrate_all_hr_persons(p_start_rowid in rowid,
234                                  p_end_rowid in rowid,
235                                  p_rows_processed out NOCOPY number);
236   --
237   -- ----------------------------------------------------------------------------
238   -- |-------------------------< migrate_all_hr_email >-----------------------|
239   -- ----------------------------------------------------------------------------
240   -- {Start Of Comments}
241   --
242   -- Description:
243   --   Procedure to migrate hr_email for the valid persons.This is called from
244   --   the upgrade script peremtca2.sql.
245   --
246   -- Prerequisites:
247   --   None
248   --
249   -- In Parameters:
250   --   Name                        Reqd   Type     Description
251   --   p_start_rowid               Yes    Rowid    Starting Person rowid in this range
252   --   p_end_rowid                 Yes    Rowid    Final Person rowid in this range
253   --
254   -- Out Parameters:
255   --   Name                        Reqd   Type     Description
256   --   p_rows_processed            Yes    Number   Number of rows processed.
257   --
258   -- Post Success:
259   --   Number of records processed will be assigned to p_row_processed.
260   --
261   -- Post Failure:
262   --   None
263   --
264   -- Access Status:
265   --   Public.
266   --
267   -- {End Of Comments}
268   --
269    procedure migrate_all_hr_email(p_start_rowid in rowid,
270                                  p_end_rowid in rowid,
271                                  p_rows_processed out NOCOPY number);
272   --
273   /* Added this for the bug 5395601  */
274   Procedure purge_person(
275 			p_person_id  in number
276 		       ,p_party_id   in number
277 		        );
278   --
279 
280 end per_hrtca_merge;
281 --