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_ASS_TYPES_RATE_NULL_CHK') Then
22: hr_utility.set_message(801, 'HR_51508_AST_R_ASSCLASS_ERR2');
23: hr_utility.raise_error;
18: Begin
19: hr_utility.set_location('Entering:'||l_proc,5);
20: --
21: If (p_constraint_name = 'PER_ASS_TYPES_RATE_NULL_CHK') Then
22: hr_utility.set_message(801, 'HR_51508_AST_R_ASSCLASS_ERR2');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK2') Then
25: hr_utility.set_message(801, 'HR_51507_AST_RATE_ID_INVAL');
26: hr_utility.raise_error;
19: hr_utility.set_location('Entering:'||l_proc,5);
20: --
21: If (p_constraint_name = 'PER_ASS_TYPES_RATE_NULL_CHK') Then
22: hr_utility.set_message(801, 'HR_51508_AST_R_ASSCLASS_ERR2');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK2') Then
25: hr_utility.set_message(801, 'HR_51507_AST_RATE_ID_INVAL');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PER_ASS_TYPES_RATE_NOTNULL_CHK') Then
21: If (p_constraint_name = 'PER_ASS_TYPES_RATE_NULL_CHK') Then
22: hr_utility.set_message(801, 'HR_51508_AST_R_ASSCLASS_ERR2');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK2') Then
25: hr_utility.set_message(801, 'HR_51507_AST_RATE_ID_INVAL');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PER_ASS_TYPES_RATE_NOTNULL_CHK') Then
28: hr_utility.set_message(801, 'HR_51506_AST_R_ASSCLAS_ERR');
29: hr_utility.raise_error;
22: hr_utility.set_message(801, 'HR_51508_AST_R_ASSCLASS_ERR2');
23: hr_utility.raise_error;
24: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK2') Then
25: hr_utility.set_message(801, 'HR_51507_AST_RATE_ID_INVAL');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PER_ASS_TYPES_RATE_NOTNULL_CHK') Then
28: hr_utility.set_message(801, 'HR_51506_AST_R_ASSCLAS_ERR');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK3') Then
24: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK2') Then
25: hr_utility.set_message(801, 'HR_51507_AST_RATE_ID_INVAL');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PER_ASS_TYPES_RATE_NOTNULL_CHK') Then
28: hr_utility.set_message(801, 'HR_51506_AST_R_ASSCLAS_ERR');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK3') Then
31: hr_utility.set_message(801, 'HR_51504_AST_WEIGHT_ID_INVAL');
32: hr_utility.raise_error;
25: hr_utility.set_message(801, 'HR_51507_AST_RATE_ID_INVAL');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'PER_ASS_TYPES_RATE_NOTNULL_CHK') Then
28: hr_utility.set_message(801, 'HR_51506_AST_R_ASSCLAS_ERR');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK3') Then
31: hr_utility.set_message(801, 'HR_51504_AST_WEIGHT_ID_INVAL');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_NAME_UK1') Then
27: ElsIf (p_constraint_name = 'PER_ASS_TYPES_RATE_NOTNULL_CHK') Then
28: hr_utility.set_message(801, 'HR_51506_AST_R_ASSCLAS_ERR');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK3') Then
31: hr_utility.set_message(801, 'HR_51504_AST_WEIGHT_ID_INVAL');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_NAME_UK1') Then
34: hr_utility.set_message(801, 'HR_51499_AST_NAME_NOT_UNIQ');
35: hr_utility.raise_error;
28: hr_utility.set_message(801, 'HR_51506_AST_R_ASSCLAS_ERR');
29: hr_utility.raise_error;
30: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK3') Then
31: hr_utility.set_message(801, 'HR_51504_AST_WEIGHT_ID_INVAL');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_NAME_UK1') Then
34: hr_utility.set_message(801, 'HR_51499_AST_NAME_NOT_UNIQ');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPE_PK') Then
30: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_FK3') Then
31: hr_utility.set_message(801, 'HR_51504_AST_WEIGHT_ID_INVAL');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_NAME_UK1') Then
34: hr_utility.set_message(801, 'HR_51499_AST_NAME_NOT_UNIQ');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPE_PK') Then
37: -- The primary key is generated via a sequence, so it should never
38: -- be invalid
31: hr_utility.set_message(801, 'HR_51504_AST_WEIGHT_ID_INVAL');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPES_NAME_UK1') Then
34: hr_utility.set_message(801, 'HR_51499_AST_NAME_NOT_UNIQ');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPE_PK') Then
37: -- The primary key is generated via a sequence, so it should never
38: -- be invalid
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPE_PK') Then
37: -- The primary key is generated via a sequence, so it should never
38: -- be invalid
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_APPRAISAL_TEMPLATES_FK2') Then
42: hr_utility.set_message(800, 'HR_52605_AST_APT_EXISTS');
43: hr_utility.raise_error;
36: ElsIf (p_constraint_name = 'PER_ASSESSMENT_TYPE_PK') Then
37: -- The primary key is generated via a sequence, so it should never
38: -- be invalid
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_APPRAISAL_TEMPLATES_FK2') Then
42: hr_utility.set_message(800, 'HR_52605_AST_APT_EXISTS');
43: hr_utility.raise_error;
44: Else
38: -- be invalid
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_APPRAISAL_TEMPLATES_FK2') Then
42: hr_utility.set_message(800, 'HR_52605_AST_APT_EXISTS');
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_APPRAISAL_TEMPLATES_FK2') Then
42: hr_utility.set_message(800, 'HR_52605_AST_APT_EXISTS');
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: ElsIf (p_constraint_name = 'PER_APPRAISAL_TEMPLATES_FK2') Then
42: hr_utility.set_message(800, 'HR_52605_AST_APT_EXISTS');
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
42: hr_utility.set_message(800, 'HR_52605_AST_APT_EXISTS');
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
43: hr_utility.raise_error;
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
44: Else
45: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
52: End constraint_error;
47: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: hr_utility.raise_error;
49: End If;
50: --
51: hr_utility.set_location(' Leaving:'||l_proc, 10);
52: End constraint_error;
53: --
54: -- ----------------------------------------------------------------------------
55: -- |-----------------------------< api_updating >-----------------------------|
113: l_proc varchar2(72) := g_package||'api_updating';
114: l_fct_ret boolean;
115: --
116: Begin
117: hr_utility.set_location('Entering:'||l_proc, 5);
118: --
119: If (
120: p_assessment_type_id is null and
121: p_object_version_number is null
129: If (
130: p_assessment_type_id = g_old_rec.assessment_type_id and
131: p_object_version_number = g_old_rec.object_version_number
132: ) Then
133: hr_utility.set_location(l_proc, 10);
134: --
135: -- The g_old_rec is current therefore we must
136: -- set the returning function to true
137: --
146: Close C_Sel1;
147: --
148: -- The primary key is invalid therefore we must error
149: --
150: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
147: --
148: -- The primary key is invalid therefore we must error
149: --
150: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
151: hr_utility.raise_error;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
152: End If;
153: Close C_Sel1;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
154: If (p_object_version_number <> g_old_rec.object_version_number) Then
155: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
156: hr_utility.raise_error;
157: End If;
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
161: End If;
162: hr_utility.set_location(' Leaving:'||l_proc, 20);
158: hr_utility.set_location(l_proc, 15);
159: l_fct_ret := true;
160: End If;
161: End If;
162: hr_utility.set_location(' Leaving:'||l_proc, 20);
163: Return (l_fct_ret);
164: --
165: End api_updating;
166: --
226: --
227: l_proc varchar2(72) := g_package||'lck';
228: --
229: Begin
230: hr_utility.set_location('Entering:'||l_proc, 5);
231: --
232: -- Add any mandatory argument checking here:
233: -- Example:
234: -- hr_api.mandatory_arg_error
242: Close C_Sel1;
243: --
244: -- The primary key is invalid therefore we must error
245: --
246: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
247: hr_utility.raise_error;
248: End If;
249: Close C_Sel1;
250: If (p_object_version_number <> g_old_rec.object_version_number) Then
243: --
244: -- The primary key is invalid therefore we must error
245: --
246: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
247: hr_utility.raise_error;
248: End If;
249: Close C_Sel1;
250: If (p_object_version_number <> g_old_rec.object_version_number) Then
251: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
247: hr_utility.raise_error;
248: End If;
249: Close C_Sel1;
250: If (p_object_version_number <> g_old_rec.object_version_number) Then
251: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
252: hr_utility.raise_error;
253: End If;
254: --
255: hr_utility.set_location(' Leaving:'||l_proc, 10);
248: End If;
249: Close C_Sel1;
250: If (p_object_version_number <> g_old_rec.object_version_number) Then
251: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
252: hr_utility.raise_error;
253: End If;
254: --
255: hr_utility.set_location(' Leaving:'||l_proc, 10);
256: --
251: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
252: hr_utility.raise_error;
253: End If;
254: --
255: hr_utility.set_location(' Leaving:'||l_proc, 10);
256: --
257: -- We need to trap the ORA LOCK exception
258: --
259: Exception
261: --
262: -- The object is locked therefore we need to supply a meaningful
263: -- error message.
264: --
265: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
266: hr_utility.set_message_token('TABLE_NAME', 'per_assessment_types');
267: hr_utility.raise_error;
268: End lck;
269: --
262: -- The object is locked therefore we need to supply a meaningful
263: -- error message.
264: --
265: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
266: hr_utility.set_message_token('TABLE_NAME', 'per_assessment_types');
267: hr_utility.raise_error;
268: End lck;
269: --
270: -- ----------------------------------------------------------------------------
263: -- error message.
264: --
265: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
266: hr_utility.set_message_token('TABLE_NAME', 'per_assessment_types');
267: hr_utility.raise_error;
268: End lck;
269: --
270: -- ----------------------------------------------------------------------------
271: -- |-----------------------------< convert_args >-----------------------------|
322: l_proc varchar2(72) := g_package||'convert_args';
323: --
324: Begin
325: --
326: hr_utility.set_location('Entering:'||l_proc, 5);
327: --
328: -- Convert arguments into local l_rec structure.
329: --
330: l_rec.assessment_type_id := p_assessment_type_id;
373:
374: --
375: -- Return the plsql record structure.
376: --
377: hr_utility.set_location(' Leaving:'||l_proc, 10);
378: Return(l_rec);
379: --
380: End convert_args;
381: --