15: --
16: l_proc varchar2(72) := g_package||'constraint_error';
17: --
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK1') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK1') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK2') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK1') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK1') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK1') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK3') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
26: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_PK') Then
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
31: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: ElsIf (p_constraint_name = 'PAY_SHADOW_ELEMENT_TYPES_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47: --
40: hr_utility.raise_error;
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47: --
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
41: Else
42: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47: --
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
49: End constraint_error;
44: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
45: hr_utility.raise_error;
46: End If;
47: --
48: hr_utility.set_location(' Leaving:'||l_proc, 10);
49: End constraint_error;
50: --
51: -- ----------------------------------------------------------------------------
52: -- |-----------------------------< api_updating >-----------------------------|
151: l_proc varchar2(72) := g_package||'api_updating';
152: l_fct_ret boolean;
153: --
154: Begin
155: hr_utility.set_location('Entering:'||l_proc, 5);
156: --
157: If (
158: p_element_type_id is null and
159: p_object_version_number is null
167: If (
168: p_element_type_id = g_old_rec.element_type_id and
169: p_object_version_number = g_old_rec.object_version_number
170: ) Then
171: hr_utility.set_location(l_proc, 10);
172: --
173: -- The g_old_rec is current therefore we must
174: -- set the returning function to true
175: --
184: Close C_Sel1;
185: --
186: -- The primary key is invalid therefore we must error
187: --
188: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
189: hr_utility.raise_error;
190: End If;
191: Close C_Sel1;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
185: --
186: -- The primary key is invalid therefore we must error
187: --
188: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
189: hr_utility.raise_error;
190: End If;
191: Close C_Sel1;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
193: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
189: hr_utility.raise_error;
190: End If;
191: Close C_Sel1;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
193: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
194: hr_utility.raise_error;
195: End If;
196: hr_utility.set_location(l_proc, 15);
197: l_fct_ret := true;
190: End If;
191: Close C_Sel1;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
193: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
194: hr_utility.raise_error;
195: End If;
196: hr_utility.set_location(l_proc, 15);
197: l_fct_ret := true;
198: End If;
192: If (p_object_version_number <> g_old_rec.object_version_number) Then
193: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
194: hr_utility.raise_error;
195: End If;
196: hr_utility.set_location(l_proc, 15);
197: l_fct_ret := true;
198: End If;
199: End If;
200: hr_utility.set_location(' Leaving:'||l_proc, 20);
196: hr_utility.set_location(l_proc, 15);
197: l_fct_ret := true;
198: End If;
199: End If;
200: hr_utility.set_location(' Leaving:'||l_proc, 20);
201: Return (l_fct_ret);
202: --
203: End api_updating;
204: --
303: --
304: l_proc varchar2(72) := g_package||'lck';
305: --
306: Begin
307: hr_utility.set_location('Entering:'||l_proc, 5);
308: hr_api.mandatory_arg_error
309: (p_api_name => l_proc,
310: p_argument => 'p_element_type_id',
311: p_argument_value => p_element_type_id);
319: Close C_Sel1;
320: --
321: -- The primary key is invalid therefore we must error
322: --
323: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
324: hr_utility.raise_error;
325: End If;
326: Close C_Sel1;
327: If (p_object_version_number <> g_old_rec.object_version_number) Then
320: --
321: -- The primary key is invalid therefore we must error
322: --
323: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
324: hr_utility.raise_error;
325: End If;
326: Close C_Sel1;
327: If (p_object_version_number <> g_old_rec.object_version_number) Then
328: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
324: hr_utility.raise_error;
325: End If;
326: Close C_Sel1;
327: If (p_object_version_number <> g_old_rec.object_version_number) Then
328: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
329: hr_utility.raise_error;
330: End If;
331: --
332: hr_utility.set_location(' Leaving:'||l_proc, 10);
325: End If;
326: Close C_Sel1;
327: If (p_object_version_number <> g_old_rec.object_version_number) Then
328: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
329: hr_utility.raise_error;
330: End If;
331: --
332: hr_utility.set_location(' Leaving:'||l_proc, 10);
333: --
328: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
329: hr_utility.raise_error;
330: End If;
331: --
332: hr_utility.set_location(' Leaving:'||l_proc, 10);
333: --
334: -- We need to trap the ORA LOCK exception
335: --
336: Exception
338: --
339: -- The object is locked therefore we need to supply a meaningful
340: -- error message.
341: --
342: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
343: hr_utility.set_message_token('TABLE_NAME', 'pay_shadow_element_types');
344: hr_utility.raise_error;
345: End lck;
346: --
339: -- The object is locked therefore we need to supply a meaningful
340: -- error message.
341: --
342: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
343: hr_utility.set_message_token('TABLE_NAME', 'pay_shadow_element_types');
344: hr_utility.raise_error;
345: End lck;
346: --
347: -- ----------------------------------------------------------------------------
340: -- error message.
341: --
342: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
343: hr_utility.set_message_token('TABLE_NAME', 'pay_shadow_element_types');
344: hr_utility.raise_error;
345: End lck;
346: --
347: -- ----------------------------------------------------------------------------
348: -- |-----------------------------< convert_args >-----------------------------|
439: l_proc varchar2(72) := g_package||'convert_args';
440: --
441: Begin
442: --
443: hr_utility.set_location('Entering:'||l_proc, 5);
444: --
445: -- Convert arguments into local l_rec structure.
446: --
447: l_rec.element_type_id := p_element_type_id;
529: l_rec.object_version_number := p_object_version_number;
530: --
531: -- Return the plsql record structure.
532: --
533: hr_utility.set_location(' Leaving:'||l_proc, 10);
534: Return(l_rec);
535: --
536: End convert_args;
537: --