14: --
15: l_proc varchar2(72) := g_package||'constraint_error';
16: --
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: If (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_FK1') Then
21: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: If (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_FK1') Then
21: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_PK') Then
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: If (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_FK1') Then
21: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_PK') Then
26: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
19: --
20: If (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_FK1') Then
21: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_PK') Then
26: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
27: hr_utility.set_message_token('PROCEDURE', l_proc);
20: If (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_FK1') Then
21: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_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','10');
22: hr_utility.set_message_token('PROCEDURE', l_proc);
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_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','10');
29: hr_utility.raise_error;
30: Else
23: hr_utility.set_message_token('STEP','5');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_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','10');
29: hr_utility.raise_error;
30: Else
31: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
24: hr_utility.raise_error;
25: ElsIf (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_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','10');
29: hr_utility.raise_error;
30: Else
31: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
25: ElsIf (p_constraint_name = 'PQH_COPY_ENTITY_ATTRIBS_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','10');
29: hr_utility.raise_error;
30: Else
31: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
27: hr_utility.set_message_token('PROCEDURE', l_proc);
28: hr_utility.set_message_token('STEP','10');
29: hr_utility.raise_error;
30: Else
31: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
34: hr_utility.raise_error;
35: End If;
28: hr_utility.set_message_token('STEP','10');
29: hr_utility.raise_error;
30: Else
31: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
34: hr_utility.raise_error;
35: End If;
36: --
29: hr_utility.raise_error;
30: Else
31: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
34: hr_utility.raise_error;
35: End If;
36: --
37: hr_utility.set_location(' Leaving:'||l_proc, 10);
30: Else
31: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
32: hr_utility.set_message_token('PROCEDURE', l_proc);
33: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
34: hr_utility.raise_error;
35: End If;
36: --
37: hr_utility.set_location(' Leaving:'||l_proc, 10);
38: End constraint_error;
33: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
34: hr_utility.raise_error;
35: End If;
36: --
37: hr_utility.set_location(' Leaving:'||l_proc, 10);
38: End constraint_error;
39: --
40: -- ----------------------------------------------------------------------------
41: -- |-----------------------------< api_updating >-----------------------------|
95: l_proc varchar2(72) := g_package||'api_updating';
96: l_fct_ret boolean;
97: --
98: Begin
99: hr_utility.set_location('Entering:'||l_proc, 5);
100: --
101: If (
102: p_copy_entity_attrib_id is null and
103: p_object_version_number is null
111: If (
112: p_copy_entity_attrib_id = g_old_rec.copy_entity_attrib_id and
113: p_object_version_number = g_old_rec.object_version_number
114: ) Then
115: hr_utility.set_location(l_proc, 10);
116: --
117: -- The g_old_rec is current therefore we must
118: -- set the returning function to true
119: --
128: Close C_Sel1;
129: --
130: -- The primary key is invalid therefore we must error
131: --
132: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
133: hr_utility.raise_error;
134: End If;
135: Close C_Sel1;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
129: --
130: -- The primary key is invalid therefore we must error
131: --
132: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
133: hr_utility.raise_error;
134: End If;
135: Close C_Sel1;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
137: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
133: hr_utility.raise_error;
134: End If;
135: Close C_Sel1;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
137: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
138: hr_utility.raise_error;
139: End If;
140: hr_utility.set_location(l_proc, 15);
141: l_fct_ret := true;
134: End If;
135: Close C_Sel1;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
137: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
138: hr_utility.raise_error;
139: End If;
140: hr_utility.set_location(l_proc, 15);
141: l_fct_ret := true;
142: End If;
136: If (p_object_version_number <> g_old_rec.object_version_number) Then
137: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
138: hr_utility.raise_error;
139: End If;
140: hr_utility.set_location(l_proc, 15);
141: l_fct_ret := true;
142: End If;
143: End If;
144: hr_utility.set_location(' Leaving:'||l_proc, 20);
140: hr_utility.set_location(l_proc, 15);
141: l_fct_ret := true;
142: End If;
143: End If;
144: hr_utility.set_location(' Leaving:'||l_proc, 20);
145: Return (l_fct_ret);
146: --
147: End api_updating;
148: --
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', 'pqh_copy_entity_attribs');
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', 'pqh_copy_entity_attribs');
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', 'pqh_copy_entity_attribs');
243: hr_utility.raise_error;
244: End lck;
245: --
246: -- ----------------------------------------------------------------------------
247: -- |-----------------------------< convert_args >-----------------------------|
293: l_proc varchar2(72) := g_package||'convert_args';
294: --
295: Begin
296: --
297: hr_utility.set_location('Entering:'||l_proc, 5);
298: --
299: -- Convert arguments into local l_rec structure.
300: --
301: l_rec.copy_entity_attrib_id := p_copy_entity_attrib_id;
338: l_rec.object_version_number := p_object_version_number;
339: --
340: -- Return the plsql record structure.
341: --
342: hr_utility.set_location(' Leaving:'||l_proc, 10);
343: Return(l_rec);
344: --
345: End convert_args;
346: --