14: --
15: l_proc varchar2(72) := g_package||'return_api_dml_status';
16: --
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
23: End return_api_dml_status;
24: --
25: -- ----------------------------------------------------------------------------
26: -- |---------------------------< constraint_error >---------------------------|
30: --
31: l_proc varchar2(72) := g_package||'constraint_error';
32: --
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_VALID_GRADES_FK1') Then
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_VALID_GRADES_FK1') Then
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK2') Then
40: hr_utility.set_message(801, 'HR_51082_GRADE_NOT_EXIST');
41: hr_utility.raise_error;
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_VALID_GRADES_FK1') Then
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK2') Then
40: hr_utility.set_message(801, 'HR_51082_GRADE_NOT_EXIST');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK50') Then
36: If (p_constraint_name = 'PER_VALID_GRADES_FK1') Then
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK2') Then
40: hr_utility.set_message(801, 'HR_51082_GRADE_NOT_EXIST');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK50') Then
43: hr_utility.set_message(801, 'HR_51090_JOB_NOT_EXIST');
44: hr_utility.raise_error;
37: hr_utility.set_message(801, 'HR_7208_API_BUS_GRP_INVALID');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK2') Then
40: hr_utility.set_message(801, 'HR_51082_GRADE_NOT_EXIST');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK50') Then
43: hr_utility.set_message(801, 'HR_51090_JOB_NOT_EXIST');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK51') Then
39: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK2') Then
40: hr_utility.set_message(801, 'HR_51082_GRADE_NOT_EXIST');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK50') Then
43: hr_utility.set_message(801, 'HR_51090_JOB_NOT_EXIST');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK51') Then
46: hr_utility.set_message(801, 'HR_51093_POS_NOT_EXIST');
47: hr_utility.raise_error;
40: hr_utility.set_message(801, 'HR_51082_GRADE_NOT_EXIST');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK50') Then
43: hr_utility.set_message(801, 'HR_51090_JOB_NOT_EXIST');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK51') Then
46: hr_utility.set_message(801, 'HR_51093_POS_NOT_EXIST');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_VALID_GRADES_PK') Then
42: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK50') Then
43: hr_utility.set_message(801, 'HR_51090_JOB_NOT_EXIST');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK51') Then
46: hr_utility.set_message(801, 'HR_51093_POS_NOT_EXIST');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_VALID_GRADES_PK') Then
49: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
50: hr_utility.raise_error;
43: hr_utility.set_message(801, 'HR_51090_JOB_NOT_EXIST');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK51') Then
46: hr_utility.set_message(801, 'HR_51093_POS_NOT_EXIST');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_VALID_GRADES_PK') Then
49: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
50: hr_utility.raise_error;
51: Else
45: ElsIf (p_constraint_name = 'PER_VALID_GRADES_FK51') Then
46: hr_utility.set_message(801, 'HR_51093_POS_NOT_EXIST');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_VALID_GRADES_PK') Then
49: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message(801, 'HR_51093_POS_NOT_EXIST');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_VALID_GRADES_PK') Then
49: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSRAINT_NAME', p_constraint_name);
48: ElsIf (p_constraint_name = 'PER_VALID_GRADES_PK') Then
49: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
49: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
54: hr_utility.set_message_token('CONSRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
60: --
61: -- ----------------------------------------------------------------------------
62: -- |-----------------------------< api_updating >-----------------------------|
112: l_proc varchar2(72) := g_package||'api_updating';
113: l_fct_ret boolean;
114: --
115: Begin
116: hr_utility.set_location('Entering:'||l_proc, 5);
117: --
118: If (
119: p_valid_grade_id is null and
120: p_object_version_number is null
128: If (
129: p_valid_grade_id = g_old_rec.valid_grade_id and
130: p_object_version_number = g_old_rec.object_version_number
131: ) Then
132: hr_utility.set_location(l_proc, 10);
133: --
134: -- The g_old_rec is current therefore we must
135: -- set the returning function to true
136: --
145: Close C_Sel1;
146: --
147: -- The primary key is invalid therefore we must error
148: --
149: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
150: hr_utility.raise_error;
151: End If;
152: Close C_Sel1;
153: If (p_object_version_number <> g_old_rec.object_version_number) Then
146: --
147: -- The primary key is invalid therefore we must error
148: --
149: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
150: hr_utility.raise_error;
151: End If;
152: Close C_Sel1;
153: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
150: hr_utility.raise_error;
151: End If;
152: Close C_Sel1;
153: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
155: hr_utility.raise_error;
156: End If;
157: hr_utility.set_location(l_proc, 15);
158: l_fct_ret := true;
151: End If;
152: Close C_Sel1;
153: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
155: hr_utility.raise_error;
156: End If;
157: hr_utility.set_location(l_proc, 15);
158: l_fct_ret := true;
159: End If;
153: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
155: hr_utility.raise_error;
156: End If;
157: hr_utility.set_location(l_proc, 15);
158: l_fct_ret := true;
159: End If;
160: End If;
161: hr_utility.set_location(' Leaving:'||l_proc, 20);
157: hr_utility.set_location(l_proc, 15);
158: l_fct_ret := true;
159: End If;
160: End If;
161: hr_utility.set_location(' Leaving:'||l_proc, 20);
162: Return (l_fct_ret);
163: --
164: End api_updating;
165: --
215: --
216: l_proc varchar2(72) := g_package||'lck';
217: --
218: Begin
219: hr_utility.set_location('Entering:'||l_proc, 5);
220: --
221: hr_api.mandatory_arg_error
222: (p_api_name => l_proc,
223: p_argument => 'valid_grade_id',
234: Close C_Sel1;
235: --
236: -- The primary key is invalid therefore we must error
237: --
238: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
239: hr_utility.raise_error;
240: End If;
241: Close C_Sel1;
242: If (p_object_version_number <> g_old_rec.object_version_number) Then
235: --
236: -- The primary key is invalid therefore we must error
237: --
238: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
239: hr_utility.raise_error;
240: End If;
241: Close C_Sel1;
242: If (p_object_version_number <> g_old_rec.object_version_number) Then
243: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
239: hr_utility.raise_error;
240: End If;
241: Close C_Sel1;
242: If (p_object_version_number <> g_old_rec.object_version_number) Then
243: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
244: hr_utility.raise_error;
245: End If;
246: --
247: hr_utility.set_location(' Leaving:'||l_proc, 10);
240: End If;
241: Close C_Sel1;
242: If (p_object_version_number <> g_old_rec.object_version_number) Then
243: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
244: hr_utility.raise_error;
245: End If;
246: --
247: hr_utility.set_location(' Leaving:'||l_proc, 10);
248: --
243: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
244: hr_utility.raise_error;
245: End If;
246: --
247: hr_utility.set_location(' Leaving:'||l_proc, 10);
248: --
249: -- We need to trap the ORA LOCK exception
250: --
251: Exception
253: --
254: -- The object is locked therefore we need to supply a meaningful
255: -- error message.
256: --
257: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
258: hr_utility.set_message_token('TABLE_NAME', 'per_valid_grades');
259: hr_utility.raise_error;
260: End lck;
261: --
254: -- The object is locked therefore we need to supply a meaningful
255: -- error message.
256: --
257: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
258: hr_utility.set_message_token('TABLE_NAME', 'per_valid_grades');
259: hr_utility.raise_error;
260: End lck;
261: --
262: -- ----------------------------------------------------------------------------
255: -- error message.
256: --
257: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
258: hr_utility.set_message_token('TABLE_NAME', 'per_valid_grades');
259: hr_utility.raise_error;
260: End lck;
261: --
262: -- ----------------------------------------------------------------------------
263: -- |-----------------------------< convert_args >-----------------------------|
305: l_proc varchar2(72) := g_package||'convert_args';
306: --
307: Begin
308: --
309: hr_utility.set_location('Entering:'||l_proc, 5);
310: --
311: -- Convert arguments into local l_rec structure.
312: --
313: l_rec.valid_grade_id := p_valid_grade_id;
346: l_rec.object_version_number := p_object_version_number;
347: --
348: -- Return the plsql record structure.
349: --
350: hr_utility.set_location(' Leaving:'||l_proc, 10);
351: Return(l_rec);
352: --
353: End convert_args;
354: --