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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_FK1') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_FK1') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_FK1') 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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_FK1') 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 = 'PAY_TEMPLATE_CORE_OBJECTS_FK1') 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 = 'PAY_TEMPLATE_CORE_OBJECTS_PK') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_TEMPLATE_CORE_OBJECTS_FK1') 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 = 'PAY_TEMPLATE_CORE_OBJECTS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PAY_TEMPLATE_CORE_OBJECTS_FK1') 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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_FK1') 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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 = 'PAY_TEMPLATE_CORE_OBJECTS_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 >-----------------------------|
70: l_proc varchar2(72) := g_package||'api_updating';
71: l_fct_ret boolean;
72: --
73: Begin
74: hr_utility.set_location('Entering:'||l_proc, 5);
75: --
76: If (
77: p_template_core_object_id is null and
78: p_object_version_number is null
86: If (
87: p_template_core_object_id = g_old_rec.template_core_object_id and
88: p_object_version_number = g_old_rec.object_version_number
89: ) Then
90: hr_utility.set_location(l_proc, 10);
91: --
92: -- The g_old_rec is current therefore we must
93: -- set the returning function to true
94: --
103: Close C_Sel1;
104: --
105: -- The primary key is invalid therefore we must error
106: --
107: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
108: hr_utility.raise_error;
109: End If;
110: Close C_Sel1;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
104: --
105: -- The primary key is invalid therefore we must error
106: --
107: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
108: hr_utility.raise_error;
109: End If;
110: Close C_Sel1;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
112: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
108: hr_utility.raise_error;
109: End If;
110: Close C_Sel1;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
112: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: hr_utility.set_location(l_proc, 15);
116: l_fct_ret := true;
109: End If;
110: Close C_Sel1;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
112: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: hr_utility.set_location(l_proc, 15);
116: l_fct_ret := true;
117: End If;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
112: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: hr_utility.set_location(l_proc, 15);
116: l_fct_ret := true;
117: End If;
118: End If;
119: hr_utility.set_location(' Leaving:'||l_proc, 20);
115: hr_utility.set_location(l_proc, 15);
116: l_fct_ret := true;
117: End If;
118: End If;
119: hr_utility.set_location(' Leaving:'||l_proc, 20);
120: Return (l_fct_ret);
121: --
122: End api_updating;
123: --
146: --
147: l_proc varchar2(72) := g_package||'lck';
148: --
149: Begin
150: hr_utility.set_location('Entering:'||l_proc, 5);
151: hr_api.mandatory_arg_error
152: (p_api_name => l_proc,
153: p_argument => 'p_template_core_object_id',
154: p_argument_value => p_template_core_object_id);
162: Close C_Sel1;
163: --
164: -- The primary key is invalid therefore we must error
165: --
166: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
167: hr_utility.raise_error;
168: End If;
169: Close C_Sel1;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
163: --
164: -- The primary key is invalid therefore we must error
165: --
166: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
167: hr_utility.raise_error;
168: End If;
169: Close C_Sel1;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
171: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
167: hr_utility.raise_error;
168: End If;
169: Close C_Sel1;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
171: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: --
175: hr_utility.set_location(' Leaving:'||l_proc, 10);
168: End If;
169: Close C_Sel1;
170: If (p_object_version_number <> g_old_rec.object_version_number) Then
171: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: --
175: hr_utility.set_location(' Leaving:'||l_proc, 10);
176: --
171: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
172: hr_utility.raise_error;
173: End If;
174: --
175: hr_utility.set_location(' Leaving:'||l_proc, 10);
176: --
177: -- We need to trap the ORA LOCK exception
178: --
179: Exception
181: --
182: -- The object is locked therefore we need to supply a meaningful
183: -- error message.
184: --
185: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
186: hr_utility.set_message_token('TABLE_NAME', 'pay_template_core_objects');
187: hr_utility.raise_error;
188: End lck;
189: --
182: -- The object is locked therefore we need to supply a meaningful
183: -- error message.
184: --
185: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
186: hr_utility.set_message_token('TABLE_NAME', 'pay_template_core_objects');
187: hr_utility.raise_error;
188: End lck;
189: --
190: -- ----------------------------------------------------------------------------
183: -- error message.
184: --
185: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
186: hr_utility.set_message_token('TABLE_NAME', 'pay_template_core_objects');
187: hr_utility.raise_error;
188: End lck;
189: --
190: -- ----------------------------------------------------------------------------
191: -- |-----------------------------< convert_args >-----------------------------|
206: l_proc varchar2(72) := g_package||'convert_args';
207: --
208: Begin
209: --
210: hr_utility.set_location('Entering:'||l_proc, 5);
211: --
212: -- Convert arguments into local l_rec structure.
213: --
214: l_rec.template_core_object_id := p_template_core_object_id;
220: l_rec.object_version_number := p_object_version_number;
221: --
222: -- Return the plsql record structure.
223: --
224: hr_utility.set_location(' Leaving:'||l_proc, 10);
225: Return(l_rec);
226: --
227: End convert_args;
228: --