14: --
15: l_proc varchar2(72) := g_package||'return_api_dml_status';
16: --
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
23: End return_api_dml_status;
24: --
25: -- ----------------------------------------------------------------------------
26: -- |---------------------------< constraint_error >---------------------------|
30: --
31: l_proc varchar2(72) := g_package||'constraint_error';
32: --
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_FK2') Then
37: hr_utility.set_location(l_proc, 10);
38: hr_utility.set_message(800,'HR_52396_PRV_INVALID_REVIEW');
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_FK2') Then
37: hr_utility.set_location(l_proc, 10);
38: hr_utility.set_message(800,'HR_52396_PRV_INVALID_REVIEW');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_PK') Then
41: hr_utility.set_location(l_proc, 15);
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_FK2') Then
37: hr_utility.set_location(l_proc, 10);
38: hr_utility.set_message(800,'HR_52396_PRV_INVALID_REVIEW');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_PK') Then
41: hr_utility.set_location(l_proc, 15);
42: hr_utility.set_message(800,'HR_52395_PRV_INVALID_PK');
35: --
36: If (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_FK2') Then
37: hr_utility.set_location(l_proc, 10);
38: hr_utility.set_message(800,'HR_52396_PRV_INVALID_REVIEW');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_PK') Then
41: hr_utility.set_location(l_proc, 15);
42: hr_utility.set_message(800,'HR_52395_PRV_INVALID_PK');
43: hr_utility.raise_error;
37: hr_utility.set_location(l_proc, 10);
38: hr_utility.set_message(800,'HR_52396_PRV_INVALID_REVIEW');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_PK') Then
41: hr_utility.set_location(l_proc, 15);
42: hr_utility.set_message(800,'HR_52395_PRV_INVALID_PK');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_DT1') Then
45: hr_utility.set_location(l_proc, 15);
38: hr_utility.set_message(800,'HR_52396_PRV_INVALID_REVIEW');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_PK') Then
41: hr_utility.set_location(l_proc, 15);
42: hr_utility.set_message(800,'HR_52395_PRV_INVALID_PK');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_DT1') Then
45: hr_utility.set_location(l_proc, 15);
46: hr_utility.set_message(800,'HR_52397_PRV_INVALID_PERSON');
39: hr_utility.raise_error;
40: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_PK') Then
41: hr_utility.set_location(l_proc, 15);
42: hr_utility.set_message(800,'HR_52395_PRV_INVALID_PK');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_DT1') Then
45: hr_utility.set_location(l_proc, 15);
46: hr_utility.set_message(800,'HR_52397_PRV_INVALID_PERSON');
47: hr_utility.raise_error;
41: hr_utility.set_location(l_proc, 15);
42: hr_utility.set_message(800,'HR_52395_PRV_INVALID_PK');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_DT1') Then
45: hr_utility.set_location(l_proc, 15);
46: hr_utility.set_message(800,'HR_52397_PRV_INVALID_PERSON');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_location(l_proc, 20);
42: hr_utility.set_message(800,'HR_52395_PRV_INVALID_PK');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_DT1') Then
45: hr_utility.set_location(l_proc, 15);
46: hr_utility.set_message(800,'HR_52397_PRV_INVALID_PERSON');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_location(l_proc, 20);
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'PER_PERFORMANCE_REVIEWS_DT1') Then
45: hr_utility.set_location(l_proc, 15);
46: hr_utility.set_message(800,'HR_52397_PRV_INVALID_PERSON');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_location(l_proc, 20);
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
45: hr_utility.set_location(l_proc, 15);
46: hr_utility.set_message(800,'HR_52397_PRV_INVALID_PERSON');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_location(l_proc, 20);
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
46: hr_utility.set_message(800,'HR_52397_PRV_INVALID_PERSON');
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_location(l_proc, 20);
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54:
47: hr_utility.raise_error;
48: Else
49: hr_utility.set_location(l_proc, 20);
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54:
55: End If;
48: Else
49: hr_utility.set_location(l_proc, 20);
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54:
55: End If;
56: --
49: hr_utility.set_location(l_proc, 20);
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54:
55: End If;
56: --
57: hr_utility.set_location(' Leaving:'||l_proc, 30);
53: hr_utility.raise_error;
54:
55: End If;
56: --
57: hr_utility.set_location(' Leaving:'||l_proc, 30);
58: End constraint_error;
59: --
60: -- ----------------------------------------------------------------------------
61: -- |-----------------------------< api_updating >-----------------------------|
115: l_proc varchar2(72) := g_package||'api_updating';
116: l_fct_ret boolean;
117: --
118: Begin
119: hr_utility.set_location('Entering:'||l_proc, 5);
120: --
121: If (
122: p_performance_review_id is null and
123: p_object_version_number is null
131: If (
132: p_performance_review_id = g_old_rec.performance_review_id and
133: p_object_version_number = g_old_rec.object_version_number
134: ) Then
135: hr_utility.set_location(l_proc, 10);
136: --
137: -- The g_old_rec is current therefore we must
138: -- set the returning function to true
139: --
148: Close C_Sel1;
149: --
150: -- The primary key is invalid therefore we must error
151: --
152: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
153: hr_utility.raise_error;
154: End If;
155: Close C_Sel1;
156: If (p_object_version_number <> g_old_rec.object_version_number) Then
149: --
150: -- The primary key is invalid therefore we must error
151: --
152: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
153: hr_utility.raise_error;
154: End If;
155: Close C_Sel1;
156: If (p_object_version_number <> g_old_rec.object_version_number) Then
157: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
153: hr_utility.raise_error;
154: End If;
155: Close C_Sel1;
156: If (p_object_version_number <> g_old_rec.object_version_number) Then
157: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
158: hr_utility.raise_error;
159: End If;
160: hr_utility.set_location(l_proc, 15);
161: l_fct_ret := true;
154: End If;
155: Close C_Sel1;
156: If (p_object_version_number <> g_old_rec.object_version_number) Then
157: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
158: hr_utility.raise_error;
159: End If;
160: hr_utility.set_location(l_proc, 15);
161: l_fct_ret := true;
162: End If;
156: If (p_object_version_number <> g_old_rec.object_version_number) Then
157: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
158: hr_utility.raise_error;
159: End If;
160: hr_utility.set_location(l_proc, 15);
161: l_fct_ret := true;
162: End If;
163: End If;
164: hr_utility.set_location(' Leaving:'||l_proc, 20);
160: hr_utility.set_location(l_proc, 15);
161: l_fct_ret := true;
162: End If;
163: End If;
164: hr_utility.set_location(' Leaving:'||l_proc, 20);
165: Return (l_fct_ret);
166: --
167: End api_updating;
168: --
222: --
223: l_proc varchar2(72) := g_package||'lck';
224: --
225: Begin
226: hr_utility.set_location('Entering:'||l_proc, 5);
227: --
228: -- Add any mandatory argument checking here:
229: -- Example:
230: hr_api.mandatory_arg_error
238: Close C_Sel1;
239: --
240: -- The primary key is invalid therefore we must error
241: --
242: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
239: --
240: -- The primary key is invalid therefore we must error
241: --
242: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
243: hr_utility.raise_error;
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
244: End If;
245: Close C_Sel1;
246: If (p_object_version_number <> g_old_rec.object_version_number) Then
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
252: --
247: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
248: hr_utility.raise_error;
249: End If;
250: --
251: hr_utility.set_location(' Leaving:'||l_proc, 10);
252: --
253: -- We need to trap the ORA LOCK exception
254: --
255: Exception
257: --
258: -- The object is locked therefore we need to supply a meaningful
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'per_performance_reviews');
263: hr_utility.raise_error;
264: End lck;
265: --
258: -- The object is locked therefore we need to supply a meaningful
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'per_performance_reviews');
263: hr_utility.raise_error;
264: End lck;
265: --
266: -- ----------------------------------------------------------------------------
259: -- error message.
260: --
261: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
262: hr_utility.set_message_token('TABLE_NAME', 'per_performance_reviews');
263: hr_utility.raise_error;
264: End lck;
265: --
266: -- ----------------------------------------------------------------------------
267: -- |-----------------------------< convert_args >-----------------------------|
313: l_proc varchar2(72) := g_package||'convert_args';
314: --
315: Begin
316: --
317: hr_utility.set_location('Entering:'||l_proc, 5);
318: --
319: -- Convert arguments into local l_rec structure.
320: --
321: l_rec.performance_review_id := p_performance_review_id;
358: l_rec.object_version_number := p_object_version_number;
359: --
360: -- Return the plsql record structure.
361: --
362: hr_utility.set_location(' Leaving:'||l_proc, 10);
363: Return(l_rec);
364: --
365: End convert_args;
366: --