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 = 'BEN_AGE_FCTR_FK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_AGE_FCTR_FK1') 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','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_AGE_FCTR_PK') Then
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'BEN_AGE_FCTR_FK1') 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','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_AGE_FCTR_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: --
36: If (p_constraint_name = 'BEN_AGE_FCTR_FK1') 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','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_AGE_FCTR_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: If (p_constraint_name = 'BEN_AGE_FCTR_FK1') 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','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_AGE_FCTR_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_AGE_FCTR_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_AGE_RT_F_FK1') Then
39: hr_utility.set_message_token('STEP','5');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_AGE_FCTR_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_AGE_RT_F_FK1') Then
47: ben_utility.child_exists_error(p_table_name => 'BEN_AGE_RT_F');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'BEN_AGE_FCTR_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_AGE_RT_F_FK1') Then
47: ben_utility.child_exists_error(p_table_name => 'BEN_AGE_RT_F');
48: ElsIf (p_constraint_name = 'BEN_CMBN_AGE_LOS_FCTR_FK1') Then
41: ElsIf (p_constraint_name = 'BEN_AGE_FCTR_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','10');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'BEN_AGE_RT_F_FK1') Then
47: ben_utility.child_exists_error(p_table_name => 'BEN_AGE_RT_F');
48: ElsIf (p_constraint_name = 'BEN_CMBN_AGE_LOS_FCTR_FK1') Then
49: ben_utility.child_exists_error(p_table_name => 'BEN_CMBN_AGE_LOS_FCTR');
53: ben_utility.child_exists_error(p_table_name => 'BEN_ELIG_AGE_PRTE_F');
54: ElsIf (p_constraint_name = 'BEN_VSTG_AGE_RQMT_FK1') Then
55: ben_utility.child_exists_error(p_table_name => 'BEN_VSTG_AGE_RQMT_FK1');
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
54: ElsIf (p_constraint_name = 'BEN_VSTG_AGE_RQMT_FK1') Then
55: ben_utility.child_exists_error(p_table_name => 'BEN_VSTG_AGE_RQMT_FK1');
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
55: ben_utility.child_exists_error(p_table_name => 'BEN_VSTG_AGE_RQMT_FK1');
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 10);
56: Else
57: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
58: hr_utility.set_message_token('PROCEDURE', l_proc);
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 10);
64: End constraint_error;
59: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
60: hr_utility.raise_error;
61: End If;
62: --
63: hr_utility.set_location(' Leaving:'||l_proc, 10);
64: End constraint_error;
65: --
66: -- ----------------------------------------------------------------------------
67: -- |-----------------------------< api_updating >-----------------------------|
129: l_proc varchar2(72) := g_package||'api_updating';
130: l_fct_ret boolean;
131: --
132: Begin
133: hr_utility.set_location('Entering:'||l_proc, 5);
134: --
135: If (
136: p_age_fctr_id is null and
137: p_object_version_number is null
145: If (
146: p_age_fctr_id = g_old_rec.age_fctr_id and
147: p_object_version_number = g_old_rec.object_version_number
148: ) Then
149: hr_utility.set_location(l_proc, 10);
150: --
151: -- The g_old_rec is current therefore we must
152: -- set the returning function to true
153: --
162: Close C_Sel1;
163: --
164: -- The primary key is invalid therefore we must error
165: --
166: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
167: hr_utility.raise_error;
168: End If;
169: Close C_Sel1;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
163: --
164: -- The primary key is invalid therefore we must error
165: --
166: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
167: hr_utility.raise_error;
168: End If;
169: Close C_Sel1;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
171: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
167: hr_utility.raise_error;
168: End If;
169: Close C_Sel1;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
171: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: hr_utility.set_location(l_proc, 15);
175: l_fct_ret := true;
168: End If;
169: Close C_Sel1;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
171: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: hr_utility.set_location(l_proc, 15);
175: l_fct_ret := true;
176: End If;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
171: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: hr_utility.set_location(l_proc, 15);
175: l_fct_ret := true;
176: End If;
177: End If;
178: hr_utility.set_location(' Leaving:'||l_proc, 20);
174: hr_utility.set_location(l_proc, 15);
175: l_fct_ret := true;
176: End If;
177: End If;
178: hr_utility.set_location(' Leaving:'||l_proc, 20);
179: Return (l_fct_ret);
180: --
181: End api_updating;
182: --
244: --
245: l_proc varchar2(72) := g_package||'lck';
246: --
247: Begin
248: hr_utility.set_location('Entering:'||l_proc, 5);
249: --
250: -- Add any mandatory argument checking here:
251: -- Example:
252: -- hr_api.mandatory_arg_error
260: Close C_Sel1;
261: --
262: -- The primary key is invalid therefore we must error
263: --
264: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
265: hr_utility.raise_error;
266: End If;
267: Close C_Sel1;
268: If (p_object_version_number <> g_old_rec.object_version_number) Then
261: --
262: -- The primary key is invalid therefore we must error
263: --
264: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
265: hr_utility.raise_error;
266: End If;
267: Close C_Sel1;
268: If (p_object_version_number <> g_old_rec.object_version_number) Then
269: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
265: hr_utility.raise_error;
266: End If;
267: Close C_Sel1;
268: If (p_object_version_number <> g_old_rec.object_version_number) Then
269: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
270: hr_utility.raise_error;
271: End If;
272: --
273: hr_utility.set_location(' Leaving:'||l_proc, 10);
266: End If;
267: Close C_Sel1;
268: If (p_object_version_number <> g_old_rec.object_version_number) Then
269: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
270: hr_utility.raise_error;
271: End If;
272: --
273: hr_utility.set_location(' Leaving:'||l_proc, 10);
274: --
269: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
270: hr_utility.raise_error;
271: End If;
272: --
273: hr_utility.set_location(' Leaving:'||l_proc, 10);
274: --
275: -- We need to trap the ORA LOCK exception
276: --
277: Exception
279: --
280: -- The object is locked therefore we need to supply a meaningful
281: -- error message.
282: --
283: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
284: hr_utility.set_message_token('TABLE_NAME', 'ben_age_fctr');
285: hr_utility.raise_error;
286: End lck;
287: --
280: -- The object is locked therefore we need to supply a meaningful
281: -- error message.
282: --
283: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
284: hr_utility.set_message_token('TABLE_NAME', 'ben_age_fctr');
285: hr_utility.raise_error;
286: End lck;
287: --
288: -- ----------------------------------------------------------------------------
281: -- error message.
282: --
283: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
284: hr_utility.set_message_token('TABLE_NAME', 'ben_age_fctr');
285: hr_utility.raise_error;
286: End lck;
287: --
288: -- ----------------------------------------------------------------------------
289: -- |-----------------------------< convert_args >-----------------------------|
343: l_proc varchar2(72) := g_package||'convert_args';
344: --
345: Begin
346: --
347: hr_utility.set_location('Entering:'||l_proc, 5);
348: --
349: -- Convert arguments into local l_rec structure.
350: --
351: l_rec.age_fctr_id := p_age_fctr_id;
396: l_rec.object_version_number := p_object_version_number;
397: --
398: -- Return the plsql record structure.
399: --
400: hr_utility.set_location(' Leaving:'||l_proc, 10);
401: Return(l_rec);
402: --
403: End convert_args;
404: --