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 = 'PQH_ROLE_TEMPLATES_FK1') 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 = 'PQH_ROLE_TEMPLATES_FK1') 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_ROLE_TEMPLATES_FK2') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PQH_ROLE_TEMPLATES_FK1') 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_ROLE_TEMPLATES_FK2') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PQH_ROLE_TEMPLATES_FK1') 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_ROLE_TEMPLATES_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 = 'PQH_ROLE_TEMPLATES_FK1') 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_ROLE_TEMPLATES_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_ROLE_TEMPLATES_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_ROLE_TEMPLATES_FK3') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_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_ROLE_TEMPLATES_FK3') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_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_ROLE_TEMPLATES_FK3') 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_ROLE_TEMPLATES_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_ROLE_TEMPLATES_FK3') 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_ROLE_TEMPLATES_FK3') 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: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_UK1') Then
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_FK3') 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: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_UK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_FK3') 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: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_UK1') Then
37: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
31: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_FK3') 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: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_UK1') 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','20');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_UK1') 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','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'RTM_PK') Then
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_UK1') 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','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'RTM_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_UK1') 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','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'RTM_PK') Then
42: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
36: ElsIf (p_constraint_name = 'PQH_ROLE_TEMPLATES_UK1') 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','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'RTM_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','25');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'RTM_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','25');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'RTM_TCT_TEM_FK') Then
39: hr_utility.set_message_token('STEP','20');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'RTM_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','25');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'RTM_TCT_TEM_FK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'RTM_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','25');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'RTM_TCT_TEM_FK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
41: ElsIf (p_constraint_name = 'RTM_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','25');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'RTM_TCT_TEM_FK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','30');
43: hr_utility.set_message_token('PROCEDURE', l_proc);
44: hr_utility.set_message_token('STEP','25');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'RTM_TCT_TEM_FK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','30');
50: hr_utility.raise_error;
51: Else
44: hr_utility.set_message_token('STEP','25');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'RTM_TCT_TEM_FK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','30');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
45: hr_utility.raise_error;
46: ElsIf (p_constraint_name = 'RTM_TCT_TEM_FK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','30');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
46: ElsIf (p_constraint_name = 'RTM_TCT_TEM_FK') Then
47: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','30');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.set_message_token('PROCEDURE', l_proc);
49: hr_utility.set_message_token('STEP','30');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
49: hr_utility.set_message_token('STEP','30');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
60: --
61: -- ----------------------------------------------------------------------------
62: -- |-----------------------------< api_updating >-----------------------------|
84: l_proc varchar2(72) := g_package||'api_updating';
85: l_fct_ret boolean;
86: --
87: Begin
88: hr_utility.set_location('Entering:'||l_proc, 5);
89: --
90: If (
91: p_role_template_id is null and
92: p_object_version_number is null
100: If (
101: p_role_template_id = g_old_rec.role_template_id and
102: p_object_version_number = g_old_rec.object_version_number
103: ) Then
104: hr_utility.set_location(l_proc, 10);
105: --
106: -- The g_old_rec is current therefore we must
107: -- set the returning function to true
108: --
117: Close C_Sel1;
118: --
119: -- The primary key is invalid therefore we must error
120: --
121: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
122: hr_utility.raise_error;
123: End If;
124: Close C_Sel1;
125: If (p_object_version_number <> g_old_rec.object_version_number) Then
118: --
119: -- The primary key is invalid therefore we must error
120: --
121: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
122: hr_utility.raise_error;
123: End If;
124: Close C_Sel1;
125: If (p_object_version_number <> g_old_rec.object_version_number) Then
126: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
122: hr_utility.raise_error;
123: End If;
124: Close C_Sel1;
125: If (p_object_version_number <> g_old_rec.object_version_number) Then
126: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
127: hr_utility.raise_error;
128: End If;
129: hr_utility.set_location(l_proc, 15);
130: l_fct_ret := true;
123: End If;
124: Close C_Sel1;
125: If (p_object_version_number <> g_old_rec.object_version_number) Then
126: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
127: hr_utility.raise_error;
128: End If;
129: hr_utility.set_location(l_proc, 15);
130: l_fct_ret := true;
131: End If;
125: If (p_object_version_number <> g_old_rec.object_version_number) Then
126: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
127: hr_utility.raise_error;
128: End If;
129: hr_utility.set_location(l_proc, 15);
130: l_fct_ret := true;
131: End If;
132: End If;
133: hr_utility.set_location(' Leaving:'||l_proc, 20);
129: hr_utility.set_location(l_proc, 15);
130: l_fct_ret := true;
131: End If;
132: End If;
133: hr_utility.set_location(' Leaving:'||l_proc, 20);
134: Return (l_fct_ret);
135: --
136: End api_updating;
137: --
159: --
160: l_proc varchar2(72) := g_package||'lck';
161: --
162: Begin
163: hr_utility.set_location('Entering:'||l_proc, 5);
164: --
165: -- Add any mandatory argument checking here:
166: -- Example:
167: -- hr_api.mandatory_arg_error
175: Close C_Sel1;
176: --
177: -- The primary key is invalid therefore we must error
178: --
179: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
176: --
177: -- The primary key is invalid therefore we must error
178: --
179: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
180: hr_utility.raise_error;
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: --
188: hr_utility.set_location(' Leaving:'||l_proc, 10);
181: End If;
182: Close C_Sel1;
183: If (p_object_version_number <> g_old_rec.object_version_number) Then
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: --
188: hr_utility.set_location(' Leaving:'||l_proc, 10);
189: --
184: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
185: hr_utility.raise_error;
186: End If;
187: --
188: hr_utility.set_location(' Leaving:'||l_proc, 10);
189: --
190: -- We need to trap the ORA LOCK exception
191: --
192: Exception
194: --
195: -- The object is locked therefore we need to supply a meaningful
196: -- error message.
197: --
198: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
199: hr_utility.set_message_token('TABLE_NAME', 'pqh_role_templates');
200: hr_utility.raise_error;
201: End lck;
202: --
195: -- The object is locked therefore we need to supply a meaningful
196: -- error message.
197: --
198: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
199: hr_utility.set_message_token('TABLE_NAME', 'pqh_role_templates');
200: hr_utility.raise_error;
201: End lck;
202: --
203: -- ----------------------------------------------------------------------------
196: -- error message.
197: --
198: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
199: hr_utility.set_message_token('TABLE_NAME', 'pqh_role_templates');
200: hr_utility.raise_error;
201: End lck;
202: --
203: -- ----------------------------------------------------------------------------
204: -- |-----------------------------< convert_args >-----------------------------|
218: l_proc varchar2(72) := g_package||'convert_args';
219: --
220: Begin
221: --
222: hr_utility.set_location('Entering:'||l_proc, 5);
223: --
224: -- Convert arguments into local l_rec structure.
225: --
226: l_rec.role_template_id := p_role_template_id;
231: l_rec.object_version_number := p_object_version_number;
232: --
233: -- Return the plsql record structure.
234: --
235: hr_utility.set_location(' Leaving:'||l_proc, 10);
236: Return(l_rec);
237: --
238: End convert_args;
239: --