54: --
55: -- {End Of Comments}
56: -- ----------------------------------------------------------------------------
57: Procedure dt_update_dml
58: (p_rec in out NOCOPY pqh_doa_shd.g_rec_type
59: ,p_effective_date in date
60: ,p_datetrack_mode in varchar2
61: ,p_validation_start_date in date
62: ,p_validation_end_date in date
79: ,p_base_key_column => 'document_attribute_id'
80: ,p_base_key_value => p_rec.document_attribute_id
81: );
82: --
83: pqh_doa_shd.g_api_dml := true; -- Set the api dml status
84: --
85: -- Update the pqh_document_attributes_f Row
86: --
87: update pqh_document_attributes_f
94: where document_attribute_id = p_rec.document_attribute_id
95: and effective_start_date = p_validation_start_date
96: and effective_end_date = p_validation_end_date;
97: --
98: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
99: --
100: -- Set the effective start and end dates
101: --
102: p_rec.effective_start_date := p_validation_start_date;
106: hr_utility.set_location(' Leaving:'||l_proc, 15);
107: Exception
108: When hr_api.check_integrity_violated Then
109: -- A check constraint has been violated
110: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
111: pqh_doa_shd.constraint_error
112: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
113: When hr_api.unique_integrity_violated Then
114: -- Unique integrity has been violated
107: Exception
108: When hr_api.check_integrity_violated Then
109: -- A check constraint has been violated
110: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
111: pqh_doa_shd.constraint_error
112: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
113: When hr_api.unique_integrity_violated Then
114: -- Unique integrity has been violated
115: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
111: pqh_doa_shd.constraint_error
112: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
113: When hr_api.unique_integrity_violated Then
114: -- Unique integrity has been violated
115: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
116: pqh_doa_shd.constraint_error
117: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
118: When Others Then
119: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
112: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
113: When hr_api.unique_integrity_violated Then
114: -- Unique integrity has been violated
115: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
116: pqh_doa_shd.constraint_error
117: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
118: When Others Then
119: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
120: Raise;
115: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
116: pqh_doa_shd.constraint_error
117: (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
118: When Others Then
119: pqh_doa_shd.g_api_dml := false; -- Unset the api dml status
120: Raise;
121: End dt_update_dml;
122: --
123: -- ----------------------------------------------------------------------------
151: --
152: -- {End Of Comments}
153: -- ----------------------------------------------------------------------------
154: Procedure update_dml
155: (p_rec in out NOCOPY pqh_doa_shd.g_rec_type
156: ,p_effective_date in date
157: ,p_datetrack_mode in varchar2
158: ,p_validation_start_date in date
159: ,p_validation_end_date in date
218: --
219: -- {End Of Comments}
220: -- ----------------------------------------------------------------------------
221: Procedure dt_pre_update
222: (p_rec in out NOCOPY pqh_doa_shd.g_rec_type
223: ,p_effective_date in date
224: ,p_datetrack_mode in varchar2
225: ,p_validation_start_date in date
226: ,p_validation_end_date in date
234: If (p_datetrack_mode <> hr_api.g_correction) then
235: --
236: -- Update the current effective end date
237: --
238: pqh_doa_shd.upd_effective_end_date
239: (p_effective_date => p_effective_date
240: ,p_base_key_value => p_rec.document_attribute_id
241: ,p_new_effective_end_date => (p_validation_start_date - 1)
242: ,p_validation_start_date => p_validation_start_date
303: --
304: -- {End Of Comments}
305: -- ----------------------------------------------------------------------------
306: Procedure pre_update
307: (p_rec in out NOCOPY pqh_doa_shd.g_rec_type
308: ,p_effective_date in date
309: ,p_datetrack_mode in varchar2
310: ,p_validation_start_date in date
311: ,p_validation_end_date in date
361: --
362: -- {End Of Comments}
363: -- ----------------------------------------------------------------------------
364: Procedure post_update
365: (p_rec in pqh_doa_shd.g_rec_type
366: ,p_effective_date in date
367: ,p_datetrack_mode in varchar2
368: ,p_validation_start_date in date
369: ,p_validation_end_date in date
398: => p_rec.tag_name
399: ,p_object_version_number
400: => p_rec.object_version_number
401: ,p_effective_start_date_o
402: => pqh_doa_shd.g_old_rec.effective_start_date
403: ,p_effective_end_date_o
404: => pqh_doa_shd.g_old_rec.effective_end_date
405: ,p_document_id_o
406: => pqh_doa_shd.g_old_rec.document_id
400: => p_rec.object_version_number
401: ,p_effective_start_date_o
402: => pqh_doa_shd.g_old_rec.effective_start_date
403: ,p_effective_end_date_o
404: => pqh_doa_shd.g_old_rec.effective_end_date
405: ,p_document_id_o
406: => pqh_doa_shd.g_old_rec.document_id
407: ,p_attribute_id_o
408: => pqh_doa_shd.g_old_rec.attribute_id
402: => pqh_doa_shd.g_old_rec.effective_start_date
403: ,p_effective_end_date_o
404: => pqh_doa_shd.g_old_rec.effective_end_date
405: ,p_document_id_o
406: => pqh_doa_shd.g_old_rec.document_id
407: ,p_attribute_id_o
408: => pqh_doa_shd.g_old_rec.attribute_id
409: ,p_tag_name_o
410: => pqh_doa_shd.g_old_rec.tag_name
404: => pqh_doa_shd.g_old_rec.effective_end_date
405: ,p_document_id_o
406: => pqh_doa_shd.g_old_rec.document_id
407: ,p_attribute_id_o
408: => pqh_doa_shd.g_old_rec.attribute_id
409: ,p_tag_name_o
410: => pqh_doa_shd.g_old_rec.tag_name
411: ,p_object_version_number_o
412: => pqh_doa_shd.g_old_rec.object_version_number
406: => pqh_doa_shd.g_old_rec.document_id
407: ,p_attribute_id_o
408: => pqh_doa_shd.g_old_rec.attribute_id
409: ,p_tag_name_o
410: => pqh_doa_shd.g_old_rec.tag_name
411: ,p_object_version_number_o
412: => pqh_doa_shd.g_old_rec.object_version_number
413: );
414: --
408: => pqh_doa_shd.g_old_rec.attribute_id
409: ,p_tag_name_o
410: => pqh_doa_shd.g_old_rec.tag_name
411: ,p_object_version_number_o
412: => pqh_doa_shd.g_old_rec.object_version_number
413: );
414: --
415: exception
416: --
468: --
469: -- {End Of Comments}
470: -- ----------------------------------------------------------------------------
471: Procedure convert_defs
472: (p_rec in out NOCOPY pqh_doa_shd.g_rec_type
473: ) is
474: --
475: Begin
476: --
480: -- is being used then we must set to the 'current' argument value.
481: --
482: If (p_rec.document_id = hr_api.g_number) then
483: p_rec.document_id :=
484: pqh_doa_shd.g_old_rec.document_id;
485: End If;
486: If (p_rec.attribute_id = hr_api.g_number) then
487: p_rec.attribute_id :=
488: pqh_doa_shd.g_old_rec.attribute_id;
484: pqh_doa_shd.g_old_rec.document_id;
485: End If;
486: If (p_rec.attribute_id = hr_api.g_number) then
487: p_rec.attribute_id :=
488: pqh_doa_shd.g_old_rec.attribute_id;
489: End If;
490: If (p_rec.tag_name = hr_api.g_varchar2) then
491: p_rec.tag_name :=
492: pqh_doa_shd.g_old_rec.tag_name;
488: pqh_doa_shd.g_old_rec.attribute_id;
489: End If;
490: If (p_rec.tag_name = hr_api.g_varchar2) then
491: p_rec.tag_name :=
492: pqh_doa_shd.g_old_rec.tag_name;
493: End If;
494: --
495: End convert_defs;
496: --
499: -- ----------------------------------------------------------------------------
500: Procedure upd
501: (p_effective_date in date
502: ,p_datetrack_mode in varchar2
503: ,p_rec in out NOCOPY pqh_doa_shd.g_rec_type
504: ) is
505: --
506: l_proc varchar2(72) := g_package||'upd';
507: l_validation_start_date date;
515: dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
516: --
517: -- We must lock the row which we need to update.
518: --
519: pqh_doa_shd.lck
520: (p_effective_date => p_effective_date
521: ,p_datetrack_mode => p_datetrack_mode
522: ,p_document_attribute_id => p_rec.document_attribute_id
523: ,p_object_version_number => p_rec.object_version_number
592: ,p_effective_start_date out NOCOPY date
593: ,p_effective_end_date out NOCOPY date
594: ) is
595: --
596: l_rec pqh_doa_shd.g_rec_type;
597: l_proc varchar2(72) := g_package||'upd';
598: --
599: Begin
600: hr_utility.set_location('Entering:'||l_proc, 5);
602: -- Call conversion function to turn arguments into the
603: -- l_rec structure.
604: --
605: l_rec :=
606: pqh_doa_shd.convert_args
607: (p_document_attribute_id
608: ,null
609: ,null
610: ,p_document_id