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 = 'HR_ALL_ORGANIZATION_UNITS_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 = 'HR_ALL_ORGANIZATION_UNITS_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_RULE_SETS_FK2') Then
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'HR_ALL_ORGANIZATION_UNITS_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_RULE_SETS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
21: --
22: If (p_constraint_name = 'HR_ALL_ORGANIZATION_UNITS_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_RULE_SETS_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 = 'HR_ALL_ORGANIZATION_UNITS_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_RULE_SETS_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_RULE_SETS_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: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK3') Then
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_RULE_SETS_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: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK3') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PQH_RULE_SETS_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: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK3') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
27: ElsIf (p_constraint_name = 'PQH_RULE_SETS_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: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK3') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK3') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK4') Then
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK3') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK4') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK3') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK4') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
32: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK3') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK4') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','20');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK4') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','20');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PQH_RULE_SETS_UK') Then
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK4') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','20');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PQH_RULE_SETS_UK') Then
43: hr_utility.set_message(8302, 'PQH_DUPL_SHORT_NAME');
36: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK4') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','20');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PQH_RULE_SETS_UK') Then
43: hr_utility.set_message(8302, 'PQH_DUPL_SHORT_NAME');
44: hr_utility.raise_error;
37: ElsIf (p_constraint_name = 'PQH_RULE_SETS_FK4') Then
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','20');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PQH_RULE_SETS_UK') Then
43: hr_utility.set_message(8302, 'PQH_DUPL_SHORT_NAME');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'RULE_SETS_PK') Then
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','20');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PQH_RULE_SETS_UK') Then
43: hr_utility.set_message(8302, 'PQH_DUPL_SHORT_NAME');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'RULE_SETS_PK') Then
46: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','20');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PQH_RULE_SETS_UK') Then
43: hr_utility.set_message(8302, 'PQH_DUPL_SHORT_NAME');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'RULE_SETS_PK') Then
46: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('STEP','30');
42: ElsIf (p_constraint_name = 'PQH_RULE_SETS_UK') Then
43: hr_utility.set_message(8302, 'PQH_DUPL_SHORT_NAME');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'RULE_SETS_PK') Then
46: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('STEP','30');
49: hr_utility.raise_error;
50: Else
43: hr_utility.set_message(8302, 'PQH_DUPL_SHORT_NAME');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'RULE_SETS_PK') Then
46: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('STEP','30');
49: hr_utility.raise_error;
50: Else
51: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'RULE_SETS_PK') Then
46: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('STEP','30');
49: hr_utility.raise_error;
50: Else
51: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
52: hr_utility.set_message_token('PROCEDURE', l_proc);
45: ElsIf (p_constraint_name = 'RULE_SETS_PK') Then
46: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('STEP','30');
49: hr_utility.raise_error;
50: Else
51: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
52: hr_utility.set_message_token('PROCEDURE', l_proc);
53: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
47: hr_utility.set_message_token('PROCEDURE', l_proc);
48: hr_utility.set_message_token('STEP','30');
49: hr_utility.raise_error;
50: Else
51: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
52: hr_utility.set_message_token('PROCEDURE', l_proc);
53: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
54: hr_utility.raise_error;
55: End If;
48: hr_utility.set_message_token('STEP','30');
49: hr_utility.raise_error;
50: Else
51: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
52: hr_utility.set_message_token('PROCEDURE', l_proc);
53: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
54: hr_utility.raise_error;
55: End If;
56: --
49: hr_utility.raise_error;
50: Else
51: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
52: hr_utility.set_message_token('PROCEDURE', l_proc);
53: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
54: hr_utility.raise_error;
55: End If;
56: --
57: hr_utility.set_location(' Leaving:'||l_proc, 10);
50: Else
51: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
52: hr_utility.set_message_token('PROCEDURE', l_proc);
53: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
54: hr_utility.raise_error;
55: End If;
56: --
57: hr_utility.set_location(' Leaving:'||l_proc, 10);
58: End constraint_error;
53: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
54: hr_utility.raise_error;
55: End If;
56: --
57: hr_utility.set_location(' Leaving:'||l_proc, 10);
58: End constraint_error;
59: --
60: -- ----------------------------------------------------------------------------
61: -- |-----------------------------< api_updating >-----------------------------|
91: l_proc varchar2(72) := g_package||'api_updating';
92: l_fct_ret boolean;
93: --
94: Begin
95: hr_utility.set_location('Entering:'||l_proc, 5);
96: --
97: If (
98: p_rule_set_id is null and
99: p_object_version_number is null
107: If (
108: p_rule_set_id = g_old_rec.rule_set_id and
109: p_object_version_number = g_old_rec.object_version_number
110: ) Then
111: hr_utility.set_location(l_proc, 10);
112: --
113: -- The g_old_rec is current therefore we must
114: -- set the returning function to true
115: --
124: Close C_Sel1;
125: --
126: -- The primary key is invalid therefore we must error
127: --
128: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
129: hr_utility.raise_error;
130: End If;
131: Close C_Sel1;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
125: --
126: -- The primary key is invalid therefore we must error
127: --
128: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
129: hr_utility.raise_error;
130: End If;
131: Close C_Sel1;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
133: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
129: hr_utility.raise_error;
130: End If;
131: Close C_Sel1;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
133: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
134: hr_utility.raise_error;
135: End If;
136: hr_utility.set_location(l_proc, 15);
137: l_fct_ret := true;
130: End If;
131: Close C_Sel1;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
133: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
134: hr_utility.raise_error;
135: End If;
136: hr_utility.set_location(l_proc, 15);
137: l_fct_ret := true;
138: End If;
132: If (p_object_version_number <> g_old_rec.object_version_number) Then
133: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
134: hr_utility.raise_error;
135: End If;
136: hr_utility.set_location(l_proc, 15);
137: l_fct_ret := true;
138: End If;
139: End If;
140: hr_utility.set_location(' Leaving:'||l_proc, 20);
136: hr_utility.set_location(l_proc, 15);
137: l_fct_ret := true;
138: End If;
139: End If;
140: hr_utility.set_location(' Leaving:'||l_proc, 20);
141: Return (l_fct_ret);
142: --
143: End api_updating;
144: --
174: --
175: l_proc varchar2(72) := g_package||'lck';
176: --
177: Begin
178: hr_utility.set_location('Entering:'||l_proc, 5);
179: --
180: -- Add any mandatory argument checking here:
181: -- Example:
182: -- hr_api.mandatory_arg_error
190: Close C_Sel1;
191: --
192: -- The primary key is invalid therefore we must error
193: --
194: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
195: hr_utility.raise_error;
196: End If;
197: Close C_Sel1;
198: If (p_object_version_number <> g_old_rec.object_version_number) Then
191: --
192: -- The primary key is invalid therefore we must error
193: --
194: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
195: hr_utility.raise_error;
196: End If;
197: Close C_Sel1;
198: If (p_object_version_number <> g_old_rec.object_version_number) Then
199: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
195: hr_utility.raise_error;
196: End If;
197: Close C_Sel1;
198: If (p_object_version_number <> g_old_rec.object_version_number) Then
199: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
200: hr_utility.raise_error;
201: End If;
202: --
203: hr_utility.set_location(' Leaving:'||l_proc, 10);
196: End If;
197: Close C_Sel1;
198: If (p_object_version_number <> g_old_rec.object_version_number) Then
199: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
200: hr_utility.raise_error;
201: End If;
202: --
203: hr_utility.set_location(' Leaving:'||l_proc, 10);
204: --
199: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
200: hr_utility.raise_error;
201: End If;
202: --
203: hr_utility.set_location(' Leaving:'||l_proc, 10);
204: --
205: -- We need to trap the ORA LOCK exception
206: --
207: Exception
209: --
210: -- The object is locked therefore we need to supply a meaningful
211: -- error message.
212: --
213: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
214: hr_utility.set_message_token('TABLE_NAME', 'pqh_rule_sets');
215: hr_utility.raise_error;
216: End lck;
217: --
210: -- The object is locked therefore we need to supply a meaningful
211: -- error message.
212: --
213: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
214: hr_utility.set_message_token('TABLE_NAME', 'pqh_rule_sets');
215: hr_utility.raise_error;
216: End lck;
217: --
218: -- ----------------------------------------------------------------------------
211: -- error message.
212: --
213: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
214: hr_utility.set_message_token('TABLE_NAME', 'pqh_rule_sets');
215: hr_utility.raise_error;
216: End lck;
217: --
218: -- ----------------------------------------------------------------------------
219: -- |-----------------------------< convert_args >-----------------------------|
241: l_proc varchar2(72) := g_package||'convert_args';
242: --
243: Begin
244: --
245: hr_utility.set_location('Entering:'||l_proc, 5);
246: --
247: -- Convert arguments into local l_rec structure.
248: --
249: l_rec.business_group_id := p_business_group_id;
262: l_rec.status := p_status;
263: --
264: -- Return the plsql record structure.
265: --
266: hr_utility.set_location(' Leaving:'||l_proc, 10);
267: Return(l_rec);
268: --
269: End convert_args;
270: --