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 = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_APPRAISALS_FK2') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20:
21: If (p_constraint_name = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
20:
21: If (p_constraint_name = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'PER_APPRAISALS_FK1') Then
22: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
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 = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
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 = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
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 = 'PER_APPRAISALS_FK3') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
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 = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
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 = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
26: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK2') Then
27: hr_utility.set_message(801,'HR_52246_APR_TEMP_NOT_EXIST');
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 = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
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 = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
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 = 'PER_APPRAISALS_PK') Then
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
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 = 'PER_APPRAISALS_PK') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
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 = 'PER_APPRAISALS_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 = 'PER_APPRAISALS_FK3') Then
32: hr_utility.set_message(801,'HR_51898_APR_NO_SUCH_LEVEL');
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 = 'PER_APPRAISALS_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 = 'PER_APPRAISALS_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 = 'PER_APPRAISALS_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 = 'PER_APPRAISALS_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 = 'PER_APPRAISALS_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 >-----------------------------|
136: l_proc varchar2(72) := g_package||'api_updating';
137: l_fct_ret boolean;
138:
139: Begin
140: hr_utility.set_location('Entering:'||l_proc, 5);
141:
142: If (
143: p_appraisal_id is null and
144: p_object_version_number is null
152: If (
153: p_appraisal_id = g_old_rec.appraisal_id and
154: p_object_version_number = g_old_rec.object_version_number
155: ) Then
156: hr_utility.set_location(l_proc, 10);
157:
158: -- The g_old_rec is current therefore we must
159: -- set the returning function to true
160:
169: Close C_Sel1;
170:
171: -- The primary key is invalid therefore we must error
172:
173: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
174: hr_utility.raise_error;
175: End If;
176: Close C_Sel1;
177: If (p_object_version_number <> g_old_rec.object_version_number) Then
170:
171: -- The primary key is invalid therefore we must error
172:
173: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
174: hr_utility.raise_error;
175: End If;
176: Close C_Sel1;
177: If (p_object_version_number <> g_old_rec.object_version_number) Then
178: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
174: hr_utility.raise_error;
175: End If;
176: Close C_Sel1;
177: If (p_object_version_number <> g_old_rec.object_version_number) Then
178: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
179: hr_utility.raise_error;
180: End If;
181: hr_utility.set_location(l_proc, 15);
182: l_fct_ret := true;
175: End If;
176: Close C_Sel1;
177: If (p_object_version_number <> g_old_rec.object_version_number) Then
178: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
179: hr_utility.raise_error;
180: End If;
181: hr_utility.set_location(l_proc, 15);
182: l_fct_ret := true;
183: End If;
177: If (p_object_version_number <> g_old_rec.object_version_number) Then
178: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
179: hr_utility.raise_error;
180: End If;
181: hr_utility.set_location(l_proc, 15);
182: l_fct_ret := true;
183: End If;
184: End If;
185: hr_utility.set_location(' Leaving:'||l_proc, 20);
181: hr_utility.set_location(l_proc, 15);
182: l_fct_ret := true;
183: End If;
184: End If;
185: hr_utility.set_location(' Leaving:'||l_proc, 20);
186: Return (l_fct_ret);
187:
188: End api_updating;
189:
274:
275: l_proc varchar2(72) := g_package||'lck';
276:
277: Begin
278: hr_utility.set_location('Entering:'||l_proc, 5);
279:
280: -- Add any mandatory argument checking here:
281: -- Example:
282: -- hr_api.mandatory_arg_error
290: Close C_Sel1;
291:
292: -- The primary key is invalid therefore we must error
293:
294: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
295: hr_utility.raise_error;
296: End If;
297: Close C_Sel1;
298: If (p_object_version_number <> g_old_rec.object_version_number) Then
291:
292: -- The primary key is invalid therefore we must error
293:
294: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
295: hr_utility.raise_error;
296: End If;
297: Close C_Sel1;
298: If (p_object_version_number <> g_old_rec.object_version_number) Then
299: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
295: hr_utility.raise_error;
296: End If;
297: Close C_Sel1;
298: If (p_object_version_number <> g_old_rec.object_version_number) Then
299: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
300: hr_utility.raise_error;
301: End If;
302:
303: hr_utility.set_location(' Leaving:'||l_proc, 10);
296: End If;
297: Close C_Sel1;
298: If (p_object_version_number <> g_old_rec.object_version_number) Then
299: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
300: hr_utility.raise_error;
301: End If;
302:
303: hr_utility.set_location(' Leaving:'||l_proc, 10);
304:
299: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
300: hr_utility.raise_error;
301: End If;
302:
303: hr_utility.set_location(' Leaving:'||l_proc, 10);
304:
305: -- We need to trap the ORA LOCK exception
306:
307: Exception
309:
310: -- The object is locked therefore we need to supply a meaningful
311: -- error message.
312:
313: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
314: hr_utility.set_message_token('TABLE_NAME', 'per_appraisals');
315: hr_utility.raise_error;
316: End lck;
317:
310: -- The object is locked therefore we need to supply a meaningful
311: -- error message.
312:
313: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
314: hr_utility.set_message_token('TABLE_NAME', 'per_appraisals');
315: hr_utility.raise_error;
316: End lck;
317:
318: -- ---------------------------------------------------------------------------+
311: -- error message.
312:
313: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
314: hr_utility.set_message_token('TABLE_NAME', 'per_appraisals');
315: hr_utility.raise_error;
316: End lck;
317:
318: -- ---------------------------------------------------------------------------+
319: -- |-----------------------------< convert_args >-----------------------------|
395: l_proc varchar2(72) := g_package||'convert_args';
396:
397: Begin
398:
399: hr_utility.set_location('Entering:'||l_proc, 5);
400:
401: -- Convert arguments into local l_rec structure.
402:
403: l_rec.appraisal_id := p_appraisal_id;
478:
479:
480: -- Return the plsql record structure.
481:
482: hr_utility.set_location(' Leaving:'||l_proc, 10);
483: Return(l_rec);
484:
485: End convert_args;
486: