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 = 'PER_PERFORMANCE_RATINGS_FK2') Then
22: hr_utility.set_message(801, 'HR_51919_PRT_APR_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_FK2') Then
22: hr_utility.set_message(801, 'HR_51919_PRT_APR_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_FK4') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20:
21: If (p_constraint_name = 'PER_PERFORMANCE_RATINGS_FK2') Then
22: hr_utility.set_message(801, 'HR_51919_PRT_APR_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_FK4') Then
27: hr_utility.set_message(801, 'HR_51925_PRT_RLI_NOT_EXIST');
20:
21: If (p_constraint_name = 'PER_PERFORMANCE_RATINGS_FK2') Then
22: hr_utility.set_message(801, 'HR_51919_PRT_APR_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_FK4') Then
27: hr_utility.set_message(801, 'HR_51925_PRT_RLI_NOT_EXIST');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'PER_PERFORMANCE_RATINGS_FK2') Then
22: hr_utility.set_message(801, 'HR_51919_PRT_APR_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_FK4') Then
27: hr_utility.set_message(801, 'HR_51925_PRT_RLI_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_FK4') Then
27: hr_utility.set_message(801, 'HR_51925_PRT_RLI_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_PK') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_PERFORMANCE_RATINGS_FK4') Then
27: hr_utility.set_message(801, 'HR_51925_PRT_RLI_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_PK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_PERFORMANCE_RATINGS_FK4') Then
27: hr_utility.set_message(801, 'HR_51925_PRT_RLI_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_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 = 'PER_PERFORMANCE_RATINGS_FK4') Then
27: hr_utility.set_message(801, 'HR_51925_PRT_RLI_NOT_EXIST');
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 = 'PER_PERFORMANCE_RATINGS_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 = 'PER_PERFORMANCE_RATINGS_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 = 'PER_PERFORMANCE_RATINGS_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 = 'PER_PERFORMANCE_RATINGS_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 = 'PER_PERFORMANCE_RATINGS_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 >-----------------------------|
92: l_proc varchar2(72) := g_package||'api_updating';
93: l_fct_ret boolean;
94:
95: Begin
96: hr_utility.set_location('Entering:'||l_proc, 5);
97:
98: If (
99: p_performance_rating_id is null and
100: p_object_version_number is null
108: If (
109: p_performance_rating_id = g_old_rec.performance_rating_id and
110: p_object_version_number = g_old_rec.object_version_number
111: ) Then
112: hr_utility.set_location(l_proc, 10);
113:
114: -- The g_old_rec is current therefore we must
115: -- set the returning function to true
116:
125: Close C_Sel1;
126:
127: -- The primary key is invalid therefore we must error
128:
129: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
130: hr_utility.raise_error;
131: End If;
132: Close C_Sel1;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
126:
127: -- The primary key is invalid therefore we must error
128:
129: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
130: hr_utility.raise_error;
131: End If;
132: Close C_Sel1;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
130: hr_utility.raise_error;
131: End If;
132: Close C_Sel1;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
135: hr_utility.raise_error;
136: End If;
137: hr_utility.set_location(l_proc, 15);
138: l_fct_ret := true;
131: End If;
132: Close C_Sel1;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
135: hr_utility.raise_error;
136: End If;
137: hr_utility.set_location(l_proc, 15);
138: l_fct_ret := true;
139: End If;
133: If (p_object_version_number <> g_old_rec.object_version_number) Then
134: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
135: hr_utility.raise_error;
136: End If;
137: hr_utility.set_location(l_proc, 15);
138: l_fct_ret := true;
139: End If;
140: End If;
141: hr_utility.set_location(' Leaving:'||l_proc, 20);
137: hr_utility.set_location(l_proc, 15);
138: l_fct_ret := true;
139: End If;
140: End If;
141: hr_utility.set_location(' Leaving:'||l_proc, 20);
142: Return (l_fct_ret);
143:
144: End api_updating;
145:
191:
192: l_proc varchar2(72) := g_package||'lck';
193:
194: Begin
195: hr_utility.set_location('Entering:'||l_proc, 5);
196:
197: -- Add any mandatory argument checking here:
198: -- Example:
199: -- hr_api.mandatory_arg_error
207: Close C_Sel1;
208:
209: -- The primary key is invalid therefore we must error
210:
211: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
208:
209: -- The primary key is invalid therefore we must error
210:
211: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
212: hr_utility.raise_error;
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219:
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
213: End If;
214: Close C_Sel1;
215: If (p_object_version_number <> g_old_rec.object_version_number) Then
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219:
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
221:
216: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
217: hr_utility.raise_error;
218: End If;
219:
220: hr_utility.set_location(' Leaving:'||l_proc, 10);
221:
222: -- We need to trap the ORA LOCK exception
223:
224: Exception
226:
227: -- The object is locked therefore we need to supply a meaningful
228: -- error message.
229:
230: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: hr_utility.set_message_token('TABLE_NAME', 'per_performance_ratings');
232: hr_utility.raise_error;
233: End lck;
234:
227: -- The object is locked therefore we need to supply a meaningful
228: -- error message.
229:
230: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: hr_utility.set_message_token('TABLE_NAME', 'per_performance_ratings');
232: hr_utility.raise_error;
233: End lck;
234:
235: -- ---------------------------------------------------------------------------+
228: -- error message.
229:
230: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
231: hr_utility.set_message_token('TABLE_NAME', 'per_performance_ratings');
232: hr_utility.raise_error;
233: End lck;
234:
235: -- ---------------------------------------------------------------------------+
236: -- |-----------------------------< convert_args >-----------------------------|
273: l_proc varchar2(72) := g_package||'convert_args';
274:
275: Begin
276:
277: hr_utility.set_location('Entering:'||l_proc, 5);
278:
279: -- Convert arguments into local l_rec structure.
280:
281: l_rec.performance_rating_id := p_performance_rating_id;
309: l_rec.appr_line_score := p_appr_line_score;
310:
311: -- Return the plsql record structure.
312:
313: hr_utility.set_location(' Leaving:'||l_proc, 10);
314: Return(l_rec);
315:
316: End convert_args;
317: