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_RATING_SCALES_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 = 'PER_RATING_SCALES_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 = 'PER_RATING_SCALES_PK') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PER_RATING_SCALES_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 = 'PER_RATING_SCALES_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PER_RATING_SCALES_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 = 'PER_RATING_SCALES_PK') 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 = 'PER_RATING_SCALES_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 = 'PER_RATING_SCALES_PK') 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 = 'PER_RATING_SCALES_PK') 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: --
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_RATING_SCALES_PK') 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: --
32: -- pmfletch. Now a coded check in TL row handler
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_RATING_SCALES_PK') 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: --
32: -- pmfletch. Now a coded check in TL row handler
33: --
26: ElsIf (p_constraint_name = 'PER_RATING_SCALES_PK') 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: --
32: -- pmfletch. Now a coded check in TL row handler
33: --
34: -- ElsIf (p_constraint_name = 'PER_RATING_SCALES_UK1') Then
31: --
32: -- pmfletch. Now a coded check in TL row handler
33: --
34: -- ElsIf (p_constraint_name = 'PER_RATING_SCALES_UK1') Then
35: -- hr_utility.set_message(801, 'HR_51449_RSC_NAME_NOT_UNIQUE');
36: -- hr_utility.raise_error;
37: Else
38: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
32: -- pmfletch. Now a coded check in TL row handler
33: --
34: -- ElsIf (p_constraint_name = 'PER_RATING_SCALES_UK1') Then
35: -- hr_utility.set_message(801, 'HR_51449_RSC_NAME_NOT_UNIQUE');
36: -- hr_utility.raise_error;
37: Else
38: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
34: -- ElsIf (p_constraint_name = 'PER_RATING_SCALES_UK1') Then
35: -- hr_utility.set_message(801, 'HR_51449_RSC_NAME_NOT_UNIQUE');
36: -- hr_utility.raise_error;
37: Else
38: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
35: -- hr_utility.set_message(801, 'HR_51449_RSC_NAME_NOT_UNIQUE');
36: -- hr_utility.raise_error;
37: Else
38: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
43: --
36: -- hr_utility.raise_error;
37: Else
38: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
43: --
44: hr_utility.set_location(' Leaving:'||l_proc, 10);
37: Else
38: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
43: --
44: hr_utility.set_location(' Leaving:'||l_proc, 10);
45: End constraint_error;
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
43: --
44: hr_utility.set_location(' Leaving:'||l_proc, 10);
45: End constraint_error;
46: --
47: -- ----------------------------------------------------------------------------
48: -- |-----------------------------< api_updating >-----------------------------|
94: l_proc varchar2(72) := g_package||'api_updating';
95: l_fct_ret boolean;
96: --
97: Begin
98: hr_utility.set_location('Entering:'||l_proc, 5);
99: --
100: If (
101: p_rating_scale_id is null and
102: p_object_version_number is null
110: If (
111: p_rating_scale_id = g_old_rec.rating_scale_id and
112: p_object_version_number = g_old_rec.object_version_number
113: ) Then
114: hr_utility.set_location(l_proc, 10);
115: --
116: -- The g_old_rec is current therefore we must
117: -- set the returning function to true
118: --
127: Close C_Sel1;
128: --
129: -- The primary key is invalid therefore we must error
130: --
131: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
132: hr_utility.raise_error;
133: End If;
134: Close C_Sel1;
135: If (p_object_version_number <> g_old_rec.object_version_number) Then
128: --
129: -- The primary key is invalid therefore we must error
130: --
131: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
132: hr_utility.raise_error;
133: End If;
134: Close C_Sel1;
135: If (p_object_version_number <> g_old_rec.object_version_number) Then
136: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
132: hr_utility.raise_error;
133: End If;
134: Close C_Sel1;
135: If (p_object_version_number <> g_old_rec.object_version_number) Then
136: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
137: hr_utility.raise_error;
138: End If;
139: hr_utility.set_location(l_proc, 15);
140: l_fct_ret := true;
133: End If;
134: Close C_Sel1;
135: If (p_object_version_number <> g_old_rec.object_version_number) Then
136: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
137: hr_utility.raise_error;
138: End If;
139: hr_utility.set_location(l_proc, 15);
140: l_fct_ret := true;
141: End If;
135: If (p_object_version_number <> g_old_rec.object_version_number) Then
136: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
137: hr_utility.raise_error;
138: End If;
139: hr_utility.set_location(l_proc, 15);
140: l_fct_ret := true;
141: End If;
142: End If;
143: hr_utility.set_location(' Leaving:'||l_proc, 20);
139: hr_utility.set_location(l_proc, 15);
140: l_fct_ret := true;
141: End If;
142: End If;
143: hr_utility.set_location(' Leaving:'||l_proc, 20);
144: Return (l_fct_ret);
145: --
146: End api_updating;
147: --
193: --
194: l_proc varchar2(72) := g_package||'lck';
195: --
196: Begin
197: hr_utility.set_location('Entering:'||l_proc, 5);
198: --
199: -- Add any mandatory argument checking here:
200: hr_api.mandatory_arg_error
201: (p_api_name => l_proc,
208: Close C_Sel1;
209: --
210: -- The primary key is invalid therefore we must error
211: --
212: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
213: hr_utility.raise_error;
214: End If;
215: Close C_Sel1;
216: If (p_object_version_number <> g_old_rec.object_version_number) Then
209: --
210: -- The primary key is invalid therefore we must error
211: --
212: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
213: hr_utility.raise_error;
214: End If;
215: Close C_Sel1;
216: If (p_object_version_number <> g_old_rec.object_version_number) Then
217: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
213: hr_utility.raise_error;
214: End If;
215: Close C_Sel1;
216: If (p_object_version_number <> g_old_rec.object_version_number) Then
217: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
218: hr_utility.raise_error;
219: End If;
220: --
221: hr_utility.set_location(' Leaving:'||l_proc, 10);
214: End If;
215: Close C_Sel1;
216: If (p_object_version_number <> g_old_rec.object_version_number) Then
217: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
218: hr_utility.raise_error;
219: End If;
220: --
221: hr_utility.set_location(' Leaving:'||l_proc, 10);
222: --
217: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
218: hr_utility.raise_error;
219: End If;
220: --
221: hr_utility.set_location(' Leaving:'||l_proc, 10);
222: --
223: -- We need to trap the ORA LOCK exception
224: --
225: Exception
227: --
228: -- The object is locked therefore we need to supply a meaningful
229: -- error message.
230: --
231: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
232: hr_utility.set_message_token('TABLE_NAME', 'per_rating_scales');
233: hr_utility.raise_error;
234: End lck;
235: --
228: -- The object is locked therefore we need to supply a meaningful
229: -- error message.
230: --
231: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
232: hr_utility.set_message_token('TABLE_NAME', 'per_rating_scales');
233: hr_utility.raise_error;
234: End lck;
235: --
236: -- ----------------------------------------------------------------------------
229: -- error message.
230: --
231: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
232: hr_utility.set_message_token('TABLE_NAME', 'per_rating_scales');
233: hr_utility.raise_error;
234: End lck;
235: --
236: -- ----------------------------------------------------------------------------
237: -- |-----------------------------< convert_args >-----------------------------|
275: l_proc varchar2(72) := g_package||'convert_args';
276: --
277: Begin
278: --
279: hr_utility.set_location('Entering:'||l_proc, 5);
280: --
281: -- Convert arguments into local l_rec structure.
282: --
283: l_rec.rating_scale_id := p_rating_scale_id;
312: l_rec.attribute20 := p_attribute20;
313: --
314: -- Return the plsql record structure.
315: --
316: hr_utility.set_location(' Leaving:'||l_proc, 10);
317: Return(l_rec);
318: --
319: End convert_args;
320: --