50: --
51: -- {End Of Comments}
52: -- ----------------------------------------------------------------------------
53: Procedure insert_dml
54: (p_rec in out nocopy per_elc_shd.g_rec_type
55: ) is
56: --
57: l_proc varchar2(72) := g_package||'insert_dml';
58: l_created_by per_elections.created_by%TYPE;
64: Begin
65: hr_utility.set_location('Entering:'||l_proc, 5);
66: p_rec.object_version_number := 1; -- Initialise the object version
67: --
68: per_elc_shd.g_api_dml := true; -- Set the api dml status
69: --
70: --
71: -- Set the who columns
72: --
234: ,l_last_updated_by
235: ,l_last_update_login
236: );
237: --
238: per_elc_shd.g_api_dml := false; -- Unset the api dml status
239: --
240: hr_utility.set_location(' Leaving:'||l_proc, 10);
241: Exception
242: When hr_api.check_integrity_violated Then
240: hr_utility.set_location(' Leaving:'||l_proc, 10);
241: Exception
242: When hr_api.check_integrity_violated Then
243: -- A check constraint has been violated
244: per_elc_shd.g_api_dml := false; -- Unset the api dml status
245: per_elc_shd.constraint_error
246: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
247: When hr_api.parent_integrity_violated Then
248: -- Parent integrity has been violated
241: Exception
242: When hr_api.check_integrity_violated Then
243: -- A check constraint has been violated
244: per_elc_shd.g_api_dml := false; -- Unset the api dml status
245: per_elc_shd.constraint_error
246: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
247: When hr_api.parent_integrity_violated Then
248: -- Parent integrity has been violated
249: per_elc_shd.g_api_dml := false; -- Unset the api dml status
245: per_elc_shd.constraint_error
246: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
247: When hr_api.parent_integrity_violated Then
248: -- Parent integrity has been violated
249: per_elc_shd.g_api_dml := false; -- Unset the api dml status
250: per_elc_shd.constraint_error
251: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
252: When hr_api.unique_integrity_violated Then
253: -- Unique integrity has been violated
246: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
247: When hr_api.parent_integrity_violated Then
248: -- Parent integrity has been violated
249: per_elc_shd.g_api_dml := false; -- Unset the api dml status
250: per_elc_shd.constraint_error
251: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
252: When hr_api.unique_integrity_violated Then
253: -- Unique integrity has been violated
254: per_elc_shd.g_api_dml := false; -- Unset the api dml status
250: per_elc_shd.constraint_error
251: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
252: When hr_api.unique_integrity_violated Then
253: -- Unique integrity has been violated
254: per_elc_shd.g_api_dml := false; -- Unset the api dml status
255: per_elc_shd.constraint_error
256: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
257: When Others Then
258: per_elc_shd.g_api_dml := false; -- Unset the api dml status
251: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
252: When hr_api.unique_integrity_violated Then
253: -- Unique integrity has been violated
254: per_elc_shd.g_api_dml := false; -- Unset the api dml status
255: per_elc_shd.constraint_error
256: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
257: When Others Then
258: per_elc_shd.g_api_dml := false; -- Unset the api dml status
259: Raise;
254: per_elc_shd.g_api_dml := false; -- Unset the api dml status
255: per_elc_shd.constraint_error
256: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
257: When Others Then
258: per_elc_shd.g_api_dml := false; -- Unset the api dml status
259: Raise;
260: End insert_dml;
261: --
262: -- ----------------------------------------------------------------------------
296: --
297: -- {End Of Comments}
298: -- ----------------------------------------------------------------------------
299: Procedure pre_insert
300: (p_rec in out nocopy per_elc_shd.g_rec_type
301: ) is
302: --
303: l_proc varchar2(72) := g_package||'pre_insert';
304: --
350: -- {End Of Comments}
351: -- ----------------------------------------------------------------------------
352: Procedure post_insert
353: (p_effective_date in date
354: ,p_rec in per_elc_shd.g_rec_type
355: ) is
356: --
357: l_proc varchar2(72) := g_package||'post_insert';
358: --
524: -- ----------------------------------------------------------------------------
525: Procedure ins
526: (p_effective_date in date
527: ,p_validate in boolean default false
528: ,p_rec in out nocopy per_elc_shd.g_rec_type
529: ) is
530: --
531: l_proc varchar2(72) := g_package||'ins';
532: --
659: ,p_election_id out nocopy number
660: ,p_object_version_number out nocopy number
661: ) is
662: --
663: l_rec per_elc_shd.g_rec_type;
664: l_proc varchar2(72) := g_package||'ins';
665: --
666: Begin
667: hr_utility.set_location('Entering:'||l_proc, 5);
669: -- Call conversion function to turn arguments into the
670: -- p_rec structure.
671: --
672: l_rec :=
673: per_elc_shd.convert_args
674: (null
675: ,p_business_group_id
676: ,p_election_date
677: ,p_description