16: --
17: l_proc varchar2(72) := g_package||'constraint_error';
18: --
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_PROCESS_LOG_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_PROCESS_LOG_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_PROCESS_LOG_FK2') Then
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'PQH_PROCESS_LOG_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_PROCESS_LOG_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
21: --
22: If (p_constraint_name = 'PQH_PROCESS_LOG_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_PROCESS_LOG_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
22: If (p_constraint_name = 'PQH_PROCESS_LOG_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_PROCESS_LOG_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_PROCESS_LOG_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: Else
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_PROCESS_LOG_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_PROCESS_LOG_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
27: ElsIf (p_constraint_name = 'PQH_PROCESS_LOG_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
31: hr_utility.raise_error;
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
32: Else
33: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
40: End constraint_error;
35: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
36: hr_utility.raise_error;
37: End If;
38: --
39: hr_utility.set_location(' Leaving:'||l_proc, 10);
40: End constraint_error;
41: --
42: -- ----------------------------------------------------------------------------
43: -- |-----------------------------< api_updating >-----------------------------|
102: l_proc varchar2(72) := g_package||'api_updating';
103: l_fct_ret boolean;
104: --
105: Begin
106: hr_utility.set_location('Entering:'||l_proc, 5);
107: --
108: If (
109: p_process_log_id is null and
110: p_object_version_number is null
118: If (
119: p_process_log_id = g_old_rec.process_log_id and
120: p_object_version_number = g_old_rec.object_version_number
121: ) Then
122: hr_utility.set_location(l_proc, 10);
123: --
124: -- The g_old_rec is current therefore we must
125: -- set the returning function to true
126: --
135: Close C_Sel1;
136: --
137: -- The primary key is invalid therefore we must error
138: --
139: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
140: hr_utility.raise_error;
141: End If;
142: Close C_Sel1;
143: If (p_object_version_number <> g_old_rec.object_version_number) Then
136: --
137: -- The primary key is invalid therefore we must error
138: --
139: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
140: hr_utility.raise_error;
141: End If;
142: Close C_Sel1;
143: If (p_object_version_number <> g_old_rec.object_version_number) Then
144: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
140: hr_utility.raise_error;
141: End If;
142: Close C_Sel1;
143: If (p_object_version_number <> g_old_rec.object_version_number) Then
144: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
145: hr_utility.raise_error;
146: End If;
147: hr_utility.set_location(l_proc, 15);
148: l_fct_ret := true;
141: End If;
142: Close C_Sel1;
143: If (p_object_version_number <> g_old_rec.object_version_number) Then
144: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
145: hr_utility.raise_error;
146: End If;
147: hr_utility.set_location(l_proc, 15);
148: l_fct_ret := true;
149: End If;
143: If (p_object_version_number <> g_old_rec.object_version_number) Then
144: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
145: hr_utility.raise_error;
146: End If;
147: hr_utility.set_location(l_proc, 15);
148: l_fct_ret := true;
149: End If;
150: End If;
151: hr_utility.set_location(' Leaving:'||l_proc, 20);
147: hr_utility.set_location(l_proc, 15);
148: l_fct_ret := true;
149: End If;
150: End If;
151: hr_utility.set_location(' Leaving:'||l_proc, 20);
152: Return (l_fct_ret);
153: --
154: End api_updating;
155: --
214: --
215: l_proc varchar2(72) := g_package||'lck';
216: --
217: Begin
218: hr_utility.set_location('Entering:'||l_proc, 5);
219: --
220: -- Add any mandatory argument checking here:
221: -- Example:
222: -- hr_api.mandatory_arg_error
230: Close C_Sel1;
231: --
232: -- The primary key is invalid therefore we must error
233: --
234: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
235: hr_utility.raise_error;
236: End If;
237: Close C_Sel1;
238: If (p_object_version_number <> g_old_rec.object_version_number) Then
231: --
232: -- The primary key is invalid therefore we must error
233: --
234: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
235: hr_utility.raise_error;
236: End If;
237: Close C_Sel1;
238: If (p_object_version_number <> g_old_rec.object_version_number) Then
239: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
235: hr_utility.raise_error;
236: End If;
237: Close C_Sel1;
238: If (p_object_version_number <> g_old_rec.object_version_number) Then
239: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
240: hr_utility.raise_error;
241: End If;
242: --
243: hr_utility.set_location(' Leaving:'||l_proc, 10);
236: End If;
237: Close C_Sel1;
238: If (p_object_version_number <> g_old_rec.object_version_number) Then
239: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
240: hr_utility.raise_error;
241: End If;
242: --
243: hr_utility.set_location(' Leaving:'||l_proc, 10);
244: --
239: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
240: hr_utility.raise_error;
241: End If;
242: --
243: hr_utility.set_location(' Leaving:'||l_proc, 10);
244: --
245: -- We need to trap the ORA LOCK exception
246: --
247: Exception
249: --
250: -- The object is locked therefore we need to supply a meaningful
251: -- error message.
252: --
253: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
254: hr_utility.set_message_token('TABLE_NAME', 'pqh_process_log');
255: hr_utility.raise_error;
256: End lck;
257: --
250: -- The object is locked therefore we need to supply a meaningful
251: -- error message.
252: --
253: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
254: hr_utility.set_message_token('TABLE_NAME', 'pqh_process_log');
255: hr_utility.raise_error;
256: End lck;
257: --
258: -- ----------------------------------------------------------------------------
251: -- error message.
252: --
253: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
254: hr_utility.set_message_token('TABLE_NAME', 'pqh_process_log');
255: hr_utility.raise_error;
256: End lck;
257: --
258: -- ----------------------------------------------------------------------------
259: -- |-----------------------------< convert_args >-----------------------------|
310: l_proc varchar2(72) := g_package||'convert_args';
311: --
312: Begin
313: --
314: hr_utility.set_location('Entering:'||l_proc, 5);
315: --
316: -- Convert arguments into local l_rec structure.
317: --
318: l_rec.process_log_id := p_process_log_id;
360: l_rec.object_version_number := p_object_version_number;
361: --
362: -- Return the plsql record structure.
363: --
364: hr_utility.set_location(' Leaving:'||l_proc, 10);
365: Return(l_rec);
366: --
367: End convert_args;
368: --