51: --
52: -- {End Of Comments}
53: -- ----------------------------------------------------------------------------
54: Procedure update_dml
55: (p_rec in out nocopy ota_cms_shd.g_rec_type
56: ) is
57: --
58: l_proc varchar2(72) := g_package||'update_dml';
59: --
87: Exception
88: When hr_api.check_integrity_violated Then
89: -- A check constraint has been violated
90: --
91: ota_cms_shd.constraint_error
92: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
93: When hr_api.parent_integrity_violated Then
94: -- Parent integrity has been violated
95: --
92: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
93: When hr_api.parent_integrity_violated Then
94: -- Parent integrity has been violated
95: --
96: ota_cms_shd.constraint_error
97: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
98: When hr_api.unique_integrity_violated Then
99: -- Unique integrity has been violated
100: --
97: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
98: When hr_api.unique_integrity_violated Then
99: -- Unique integrity has been violated
100: --
101: ota_cms_shd.constraint_error
102: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
103: When Others Then
104: --
105: Raise;
137: --
138: -- {End Of Comments}
139: -- ----------------------------------------------------------------------------
140: Procedure pre_update
141: (p_rec in ota_cms_shd.g_rec_type
142: ) is
143: --
144: l_proc varchar2(72) := g_package||'pre_update';
145: --
182: -- {End Of Comments}
183: -- ----------------------------------------------------------------------------
184: Procedure post_update
185: (p_effective_date in date
186: ,p_rec in ota_cms_shd.g_rec_type
187: ) is
188: --
189: l_proc varchar2(72) := g_package||'post_update';
190: --
212: => p_rec.message_text
213: ,p_object_version_number
214: => p_rec.object_version_number
215: ,p_chat_id_o
216: => ota_cms_shd.g_old_rec.chat_id
217: ,p_business_group_id_o
218: => ota_cms_shd.g_old_rec.business_group_id
219: ,p_person_id_o
220: => ota_cms_shd.g_old_rec.person_id
214: => p_rec.object_version_number
215: ,p_chat_id_o
216: => ota_cms_shd.g_old_rec.chat_id
217: ,p_business_group_id_o
218: => ota_cms_shd.g_old_rec.business_group_id
219: ,p_person_id_o
220: => ota_cms_shd.g_old_rec.person_id
221: ,p_contact_id_o
222: => ota_cms_shd.g_old_rec.contact_id
216: => ota_cms_shd.g_old_rec.chat_id
217: ,p_business_group_id_o
218: => ota_cms_shd.g_old_rec.business_group_id
219: ,p_person_id_o
220: => ota_cms_shd.g_old_rec.person_id
221: ,p_contact_id_o
222: => ota_cms_shd.g_old_rec.contact_id
223: ,p_target_person_id_o
224: => ota_cms_shd.g_old_rec.target_person_id
218: => ota_cms_shd.g_old_rec.business_group_id
219: ,p_person_id_o
220: => ota_cms_shd.g_old_rec.person_id
221: ,p_contact_id_o
222: => ota_cms_shd.g_old_rec.contact_id
223: ,p_target_person_id_o
224: => ota_cms_shd.g_old_rec.target_person_id
225: ,p_target_contact_id_o
226: => ota_cms_shd.g_old_rec.target_contact_id
220: => ota_cms_shd.g_old_rec.person_id
221: ,p_contact_id_o
222: => ota_cms_shd.g_old_rec.contact_id
223: ,p_target_person_id_o
224: => ota_cms_shd.g_old_rec.target_person_id
225: ,p_target_contact_id_o
226: => ota_cms_shd.g_old_rec.target_contact_id
227: ,p_message_text_o
228: => ota_cms_shd.g_old_rec.message_text
222: => ota_cms_shd.g_old_rec.contact_id
223: ,p_target_person_id_o
224: => ota_cms_shd.g_old_rec.target_person_id
225: ,p_target_contact_id_o
226: => ota_cms_shd.g_old_rec.target_contact_id
227: ,p_message_text_o
228: => ota_cms_shd.g_old_rec.message_text
229: ,p_object_version_number_o
230: => ota_cms_shd.g_old_rec.object_version_number
224: => ota_cms_shd.g_old_rec.target_person_id
225: ,p_target_contact_id_o
226: => ota_cms_shd.g_old_rec.target_contact_id
227: ,p_message_text_o
228: => ota_cms_shd.g_old_rec.message_text
229: ,p_object_version_number_o
230: => ota_cms_shd.g_old_rec.object_version_number
231: );
232: --
226: => ota_cms_shd.g_old_rec.target_contact_id
227: ,p_message_text_o
228: => ota_cms_shd.g_old_rec.message_text
229: ,p_object_version_number_o
230: => ota_cms_shd.g_old_rec.object_version_number
231: );
232: --
233: exception
234: --
286: --
287: -- {End Of Comments}
288: -- ----------------------------------------------------------------------------
289: Procedure convert_defs
290: (p_rec in out nocopy ota_cms_shd.g_rec_type
291: ) is
292: --
293: Begin
294: --
298: -- is being used then we must set to the 'current' argument value.
299: --
300: If (p_rec.chat_id = hr_api.g_number) then
301: p_rec.chat_id :=
302: ota_cms_shd.g_old_rec.chat_id;
303: End If;
304: If (p_rec.business_group_id = hr_api.g_number) then
305: p_rec.business_group_id :=
306: ota_cms_shd.g_old_rec.business_group_id;
302: ota_cms_shd.g_old_rec.chat_id;
303: End If;
304: If (p_rec.business_group_id = hr_api.g_number) then
305: p_rec.business_group_id :=
306: ota_cms_shd.g_old_rec.business_group_id;
307: End If;
308: If (p_rec.person_id = hr_api.g_number) then
309: p_rec.person_id :=
310: ota_cms_shd.g_old_rec.person_id;
306: ota_cms_shd.g_old_rec.business_group_id;
307: End If;
308: If (p_rec.person_id = hr_api.g_number) then
309: p_rec.person_id :=
310: ota_cms_shd.g_old_rec.person_id;
311: End If;
312: If (p_rec.contact_id = hr_api.g_number) then
313: p_rec.contact_id :=
314: ota_cms_shd.g_old_rec.contact_id;
310: ota_cms_shd.g_old_rec.person_id;
311: End If;
312: If (p_rec.contact_id = hr_api.g_number) then
313: p_rec.contact_id :=
314: ota_cms_shd.g_old_rec.contact_id;
315: End If;
316: If (p_rec.target_person_id = hr_api.g_number) then
317: p_rec.target_person_id :=
318: ota_cms_shd.g_old_rec.target_person_id;
314: ota_cms_shd.g_old_rec.contact_id;
315: End If;
316: If (p_rec.target_person_id = hr_api.g_number) then
317: p_rec.target_person_id :=
318: ota_cms_shd.g_old_rec.target_person_id;
319: End If;
320: If (p_rec.target_contact_id = hr_api.g_number) then
321: p_rec.target_contact_id :=
322: ota_cms_shd.g_old_rec.target_contact_id;
318: ota_cms_shd.g_old_rec.target_person_id;
319: End If;
320: If (p_rec.target_contact_id = hr_api.g_number) then
321: p_rec.target_contact_id :=
322: ota_cms_shd.g_old_rec.target_contact_id;
323: End If;
324: If (p_rec.message_text = hr_api.g_varchar2) then
325: p_rec.message_text :=
326: ota_cms_shd.g_old_rec.message_text;
322: ota_cms_shd.g_old_rec.target_contact_id;
323: End If;
324: If (p_rec.message_text = hr_api.g_varchar2) then
325: p_rec.message_text :=
326: ota_cms_shd.g_old_rec.message_text;
327: End If;
328: --
329: End convert_defs;
330: --
332: -- |---------------------------------< upd >----------------------------------|
333: -- ----------------------------------------------------------------------------
334: Procedure upd
335: (p_effective_date in date
336: ,p_rec in out nocopy ota_cms_shd.g_rec_type
337: ) is
338: --
339: l_proc varchar2(72) := g_package||'upd';
340: --
342: hr_utility.set_location('Entering:'||l_proc, 5);
343: --
344: -- We must lock the row which we need to update.
345: --
346: ota_cms_shd.lck
347: (p_rec.chat_message_id
348: ,p_rec.object_version_number
349: );
350: --
397: ,p_target_person_id in number default hr_api.g_number
398: ,p_target_contact_id in number default hr_api.g_number
399: ) is
400: --
401: l_rec ota_cms_shd.g_rec_type;
402: l_proc varchar2(72) := g_package||'upd';
403: --
404: Begin
405: hr_utility.set_location('Entering:'||l_proc, 5);
407: -- Call conversion function to turn arguments into the
408: -- l_rec structure.
409: --
410: l_rec :=
411: ota_cms_shd.convert_args
412: (p_chat_message_id
413: ,p_chat_id
414: ,p_business_group_id
415: ,p_person_id