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 = 'AVCON_14619306_ENABL_000') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'AVCON_14619306_ENABL_000') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_FK2') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'AVCON_14619306_ENABL_000') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'AVCON_14619306_ENABL_000') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'AVCON_14619306_ENABL_000') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_PK') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_ATTRIBUTES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_ATTRIBUTES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
26: ElsIf (p_constraint_name = 'PQH_ATTRIBUTES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
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 = 'PQH_ATTRIBUTES_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_ATTRIBUTES_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_ATTRIBUTES_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
31: ElsIf (p_constraint_name = 'PQH_ATTRIBUTES_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
42: --
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
42: --
43: hr_utility.set_location(' Leaving:'||l_proc, 10);
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
42: --
43: hr_utility.set_location(' Leaving:'||l_proc, 10);
44: End constraint_error;
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
42: --
43: hr_utility.set_location(' Leaving:'||l_proc, 10);
44: End constraint_error;
45: --
46: -- ----------------------------------------------------------------------------
47: -- |-----------------------------< api_updating >-----------------------------|
75: l_proc varchar2(72) := g_package||'api_updating';
76: l_fct_ret boolean;
77: --
78: Begin
79: hr_utility.set_location('Entering:'||l_proc, 5);
80: --
81: If (
82: p_attribute_id is null and
83: p_object_version_number is null
91: If (
92: p_attribute_id = g_old_rec.attribute_id and
93: p_object_version_number = g_old_rec.object_version_number
94: ) Then
95: hr_utility.set_location(l_proc, 10);
96: --
97: -- The g_old_rec is current therefore we must
98: -- set the returning function to true
99: --
108: Close C_Sel1;
109: --
110: -- The primary key is invalid therefore we must error
111: --
112: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
109: --
110: -- The primary key is invalid therefore we must error
111: --
112: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
114: End If;
115: Close C_Sel1;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
116: If (p_object_version_number <> g_old_rec.object_version_number) Then
117: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
118: hr_utility.raise_error;
119: End If;
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
123: End If;
124: hr_utility.set_location(' Leaving:'||l_proc, 20);
120: hr_utility.set_location(l_proc, 15);
121: l_fct_ret := true;
122: End If;
123: End If;
124: hr_utility.set_location(' Leaving:'||l_proc, 20);
125: Return (l_fct_ret);
126: --
127: End api_updating;
128: --
156: --
157: l_proc varchar2(72) := g_package||'lck';
158: --
159: Begin
160: hr_utility.set_location('Entering:'||l_proc, 5);
161: --
162: -- Add any mandatory argument checking here:
163: -- Example:
164: -- hr_api.mandatory_arg_error
172: Close C_Sel1;
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
186: --
181: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
186: --
187: -- We need to trap the ORA LOCK exception
188: --
189: Exception
191: --
192: -- The object is locked therefore we need to supply a meaningful
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'pqh_attributes');
197: hr_utility.raise_error;
198: End lck;
199: --
192: -- The object is locked therefore we need to supply a meaningful
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'pqh_attributes');
197: hr_utility.raise_error;
198: End lck;
199: --
200: -- ----------------------------------------------------------------------------
193: -- error message.
194: --
195: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'pqh_attributes');
197: hr_utility.raise_error;
198: End lck;
199: --
200: -- ----------------------------------------------------------------------------
201: -- |-----------------------------< convert_args >-----------------------------|
221: l_proc varchar2(72) := g_package||'convert_args';
222: --
223: Begin
224: --
225: hr_utility.set_location('Entering:'||l_proc, 5);
226: --
227: -- Convert arguments into local l_rec structure.
228: --
229: l_rec.attribute_id := p_attribute_id;
240: l_rec.decode_function_name := p_decode_function_name;
241: --
242: -- Return the plsql record structure.
243: --
244: hr_utility.set_location(' Leaving:'||l_proc, 10);
245: Return(l_rec);
246: --
247: End convert_args;
248: --
404: close csr_attribute_id;
405: --
406: If p_master_table_alias_name is not null and l_master_table_route_id is null then
407: --
408: hr_utility.set_message(8302,'PQH_INVALID_MASTER_TABLE_ROUTE');
409: hr_utility.raise_error;
410: --
411: End if;
412: --
405: --
406: If p_master_table_alias_name is not null and l_master_table_route_id is null then
407: --
408: hr_utility.set_message(8302,'PQH_INVALID_MASTER_TABLE_ROUTE');
409: hr_utility.raise_error;
410: --
411: End if;
412: --
413: -- populate WHO columns