19: --
20: l_proc varchar2(72) := g_package||'constraint_error';
21: --
22: Begin
23: hr_utility.set_location('Entering:'||l_proc, 5);
24: --
25: If (p_constraint_name = 'PER_PARTICIPANTS_PK') Then
26: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
22: Begin
23: hr_utility.set_location('Entering:'||l_proc, 5);
24: --
25: If (p_constraint_name = 'PER_PARTICIPANTS_PK') Then
26: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','5');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_PARTICPANTS_FK1') Then
23: hr_utility.set_location('Entering:'||l_proc, 5);
24: --
25: If (p_constraint_name = 'PER_PARTICIPANTS_PK') Then
26: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','5');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_PARTICPANTS_FK1') Then
31: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
24: --
25: If (p_constraint_name = 'PER_PARTICIPANTS_PK') Then
26: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','5');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_PARTICPANTS_FK1') Then
31: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
25: If (p_constraint_name = 'PER_PARTICIPANTS_PK') Then
26: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','5');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_PARTICPANTS_FK1') Then
31: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','5');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_PARTICPANTS_FK1') Then
31: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: Else
28: hr_utility.set_message_token('STEP','5');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_PARTICPANTS_FK1') Then
31: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_PARTICPANTS_FK1') Then
31: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
30: ElsIf (p_constraint_name = 'PER_PARTICPANTS_FK1') Then
31: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
33: hr_utility.set_message_token('STEP','10');
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
34: hr_utility.raise_error;
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
35: Else
36: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
37: hr_utility.set_message_token('PROCEDURE', l_proc);
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
43: End constraint_error;
38: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
39: hr_utility.raise_error;
40: End If;
41: --
42: hr_utility.set_location(' Leaving:'||l_proc, 10);
43: End constraint_error;
44: --
45: -- ----------------------------------------------------------------------------
46: -- |-----------------------------< api_updating >-----------------------------|
97: l_proc varchar2(72) := g_package||'api_updating';
98: l_fct_ret boolean;
99: --
100: Begin
101: hr_utility.set_location('Entering:'||l_proc, 5);
102: --
103: If (
104: p_participant_id is null and
105: p_object_version_number is null
113: If (
114: p_participant_id = g_old_rec.participant_id and
115: p_object_version_number = g_old_rec.object_version_number
116: ) Then
117: hr_utility.set_location(l_proc, 10);
118: --
119: -- The g_old_rec is current therefore we must
120: -- set the returning function to true
121: --
130: Close C_Sel1;
131: --
132: -- The primary key is invalid therefore we must error
133: --
134: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
135: hr_utility.raise_error;
136: End If;
137: Close C_Sel1;
138: If (p_object_version_number <> g_old_rec.object_version_number) Then
131: --
132: -- The primary key is invalid therefore we must error
133: --
134: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
135: hr_utility.raise_error;
136: End If;
137: Close C_Sel1;
138: If (p_object_version_number <> g_old_rec.object_version_number) Then
139: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
135: hr_utility.raise_error;
136: End If;
137: Close C_Sel1;
138: If (p_object_version_number <> g_old_rec.object_version_number) Then
139: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
140: hr_utility.raise_error;
141: End If;
142: hr_utility.set_location(l_proc, 15);
143: l_fct_ret := true;
136: End If;
137: Close C_Sel1;
138: If (p_object_version_number <> g_old_rec.object_version_number) Then
139: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
140: hr_utility.raise_error;
141: End If;
142: hr_utility.set_location(l_proc, 15);
143: l_fct_ret := true;
144: End If;
138: If (p_object_version_number <> g_old_rec.object_version_number) Then
139: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
140: hr_utility.raise_error;
141: End If;
142: hr_utility.set_location(l_proc, 15);
143: l_fct_ret := true;
144: End If;
145: End If;
146: hr_utility.set_location(' Leaving:'||l_proc, 20);
142: hr_utility.set_location(l_proc, 15);
143: l_fct_ret := true;
144: End If;
145: End If;
146: hr_utility.set_location(' Leaving:'||l_proc, 20);
147: Return (l_fct_ret);
148: --
149: End api_updating;
150: --
202: --
203: l_proc varchar2(72) := g_package||'lck';
204: --
205: Begin
206: hr_utility.set_location('Entering:'||l_proc, 5);
207: --
208: -- Add any mandatory argument checking here:
209: -- Example:
210: -- hr_api.mandatory_arg_error
218: Close C_Sel1;
219: --
220: -- The primary key is invalid therefore we must error
221: --
222: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
223: hr_utility.raise_error;
224: End If;
225: Close C_Sel1;
226: If (p_object_version_number <> g_old_rec.object_version_number) Then
219: --
220: -- The primary key is invalid therefore we must error
221: --
222: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
223: hr_utility.raise_error;
224: End If;
225: Close C_Sel1;
226: If (p_object_version_number <> g_old_rec.object_version_number) Then
227: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
223: hr_utility.raise_error;
224: End If;
225: Close C_Sel1;
226: If (p_object_version_number <> g_old_rec.object_version_number) Then
227: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
228: hr_utility.raise_error;
229: End If;
230: --
231: hr_utility.set_location(' Leaving:'||l_proc, 10);
224: End If;
225: Close C_Sel1;
226: If (p_object_version_number <> g_old_rec.object_version_number) Then
227: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
228: hr_utility.raise_error;
229: End If;
230: --
231: hr_utility.set_location(' Leaving:'||l_proc, 10);
232: --
227: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
228: hr_utility.raise_error;
229: End If;
230: --
231: hr_utility.set_location(' Leaving:'||l_proc, 10);
232: --
233: -- We need to trap the ORA LOCK exception
234: --
235: Exception
237: --
238: -- The object is locked therefore we need to supply a meaningful
239: -- error message.
240: --
241: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
242: hr_utility.set_message_token('TABLE_NAME', 'per_participants');
243: hr_utility.raise_error;
244: End lck;
245: --
238: -- The object is locked therefore we need to supply a meaningful
239: -- error message.
240: --
241: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
242: hr_utility.set_message_token('TABLE_NAME', 'per_participants');
243: hr_utility.raise_error;
244: End lck;
245: --
246: -- ----------------------------------------------------------------------------
239: -- error message.
240: --
241: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
242: hr_utility.set_message_token('TABLE_NAME', 'per_participants');
243: hr_utility.raise_error;
244: End lck;
245: --
246: -- ----------------------------------------------------------------------------
247: -- |-----------------------------< convert_args >-----------------------------|
290: l_proc varchar2(72) := g_package||'convert_args';
291: --
292: Begin
293: --
294: hr_utility.set_location('Entering:'||l_proc, 5);
295: --
296: -- Convert arguments into local l_rec structure.
297: --
298: l_rec.participant_id := p_participant_id;
332: l_rec.participant_usage_status := p_participant_usage_status;
333: --
334: -- Return the plsql record structure.
335: --
336: hr_utility.set_location(' Leaving:'||l_proc, 10);
337: Return(l_rec);
338: --
339: End convert_args;
340: --