15: --
16: l_proc varchar2(72) := g_package||'return_api_dml_status';
17: --
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: Return (nvl(g_api_dml, false));
22: --
23: hr_utility.set_location(' Leaving:'||l_proc, 10);
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: Return (nvl(g_api_dml, false));
22: --
23: hr_utility.set_location(' Leaving:'||l_proc, 10);
24: End return_api_dml_status;
25: */
26:
27: --
33: --
34: l_proc varchar2(72) := g_package||'constraint_error';
35: --
36: Begin
37: hr_utility.set_location('Entering:'||l_proc, 5);
38: --
39: If (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK1') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
36: Begin
37: hr_utility.set_location('Entering:'||l_proc, 5);
38: --
39: If (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK1') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','5');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK2') Then
37: hr_utility.set_location('Entering:'||l_proc, 5);
38: --
39: If (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK1') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','5');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK2') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
38: --
39: If (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK1') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','5');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK2') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
39: If (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK1') Then
40: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','5');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK2') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','5');
41: hr_utility.set_message_token('PROCEDURE', l_proc);
42: hr_utility.set_message_token('STEP','5');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK2') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','5');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_PK') Then
42: hr_utility.set_message_token('STEP','5');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK2') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','5');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_PK') Then
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: hr_utility.raise_error;
44: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK2') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','5');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_PK') Then
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
44: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_FK2') Then
45: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','5');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_PK') Then
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','10');
46: hr_utility.set_message_token('PROCEDURE', l_proc);
47: hr_utility.set_message_token('STEP','5');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_PK') Then
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','10');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PD_CLASSIFICATIONS_UK') Then
47: hr_utility.set_message_token('STEP','5');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_PK') Then
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','10');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PD_CLASSIFICATIONS_UK') Then
55: hr_utility.set_message(8301, 'GHR_MULTIPLE_FEEDBACKS');
48: hr_utility.raise_error;
49: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_PK') Then
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','10');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PD_CLASSIFICATIONS_UK') Then
55: hr_utility.set_message(8301, 'GHR_MULTIPLE_FEEDBACKS');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
49: ElsIf (p_constraint_name = 'GHR_PD_CLASSIFICATIONS_PK') Then
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','10');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PD_CLASSIFICATIONS_UK') Then
55: hr_utility.set_message(8301, 'GHR_MULTIPLE_FEEDBACKS');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('STEP','15');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','10');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PD_CLASSIFICATIONS_UK') Then
55: hr_utility.set_message(8301, 'GHR_MULTIPLE_FEEDBACKS');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('STEP','15');
58: hr_utility.raise_error;
59: Else
52: hr_utility.set_message_token('STEP','10');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PD_CLASSIFICATIONS_UK') Then
55: hr_utility.set_message(8301, 'GHR_MULTIPLE_FEEDBACKS');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('STEP','15');
58: hr_utility.raise_error;
59: Else
60: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'PD_CLASSIFICATIONS_UK') Then
55: hr_utility.set_message(8301, 'GHR_MULTIPLE_FEEDBACKS');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('STEP','15');
58: hr_utility.raise_error;
59: Else
60: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
61: hr_utility.set_message_token('PROCEDURE', l_proc);
54: ElsIf (p_constraint_name = 'PD_CLASSIFICATIONS_UK') Then
55: hr_utility.set_message(8301, 'GHR_MULTIPLE_FEEDBACKS');
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('STEP','15');
58: hr_utility.raise_error;
59: Else
60: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
61: hr_utility.set_message_token('PROCEDURE', l_proc);
62: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
56: hr_utility.set_message_token('PROCEDURE', l_proc);
57: hr_utility.set_message_token('STEP','15');
58: hr_utility.raise_error;
59: Else
60: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
61: hr_utility.set_message_token('PROCEDURE', l_proc);
62: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
63: hr_utility.raise_error;
64: End If;
57: hr_utility.set_message_token('STEP','15');
58: hr_utility.raise_error;
59: Else
60: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
61: hr_utility.set_message_token('PROCEDURE', l_proc);
62: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
63: hr_utility.raise_error;
64: End If;
65: --
58: hr_utility.raise_error;
59: Else
60: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
61: hr_utility.set_message_token('PROCEDURE', l_proc);
62: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
63: hr_utility.raise_error;
64: End If;
65: --
66: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: Else
60: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
61: hr_utility.set_message_token('PROCEDURE', l_proc);
62: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
63: hr_utility.raise_error;
64: End If;
65: --
66: hr_utility.set_location(' Leaving:'||l_proc, 10);
67: End constraint_error;
62: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
63: hr_utility.raise_error;
64: End If;
65: --
66: hr_utility.set_location(' Leaving:'||l_proc, 10);
67: End constraint_error;
68: --
69: -- ----------------------------------------------------------------------------
70: -- |-----------------------------< 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_pd_classification_id is null and
102: p_object_version_number is null
110: If (
111: p_pd_classification_id = g_old_rec.pd_classification_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: --
172: l_proc varchar2(72) := g_package||'lck';
173: --
174: Begin
175:
176: hr_utility.set_location('Entering:'||l_proc, 5);
177: --
178: -- Add any mandatory argument checking here:
179: -- Example:
180: -- hr_api.mandatory_arg_error
188: Close C_Sel1;
189: --
190: -- The primary key is invalid therefore we must error
191: --
192: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
193: hr_utility.raise_error;
194: End If;
195: Close C_Sel1;
196: If (p_object_version_number <> g_old_rec.object_version_number) Then
189: --
190: -- The primary key is invalid therefore we must error
191: --
192: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
193: hr_utility.raise_error;
194: End If;
195: Close C_Sel1;
196: If (p_object_version_number <> g_old_rec.object_version_number) Then
197: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
193: hr_utility.raise_error;
194: End If;
195: Close C_Sel1;
196: If (p_object_version_number <> g_old_rec.object_version_number) Then
197: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
198: hr_utility.raise_error;
199: End If;
200: --
201: hr_utility.set_location(' Leaving:'||l_proc, 10);
194: End If;
195: Close C_Sel1;
196: If (p_object_version_number <> g_old_rec.object_version_number) Then
197: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
198: hr_utility.raise_error;
199: End If;
200: --
201: hr_utility.set_location(' Leaving:'||l_proc, 10);
202: --
197: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
198: hr_utility.raise_error;
199: End If;
200: --
201: hr_utility.set_location(' Leaving:'||l_proc, 10);
202: --
203: -- We need to trap the ORA LOCK exception
204: --
205: Exception
207: --
208: -- The object is locked therefore we need to supply a meaningful
209: -- error message.
210: --
211: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
212: hr_utility.set_message_token('TABLE_NAME', 'ghr_pd_classifications');
213: hr_utility.raise_error;
214: End lck;
215: --
208: -- The object is locked therefore we need to supply a meaningful
209: -- error message.
210: --
211: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
212: hr_utility.set_message_token('TABLE_NAME', 'ghr_pd_classifications');
213: hr_utility.raise_error;
214: End lck;
215: --
216: -- ----------------------------------------------------------------------------
209: -- error message.
210: --
211: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
212: hr_utility.set_message_token('TABLE_NAME', 'ghr_pd_classifications');
213: hr_utility.raise_error;
214: End lck;
215: --
216: -- ----------------------------------------------------------------------------
217: -- |-----------------------------< convert_args >-----------------------------|
233: l_proc varchar2(72) := g_package||'convert_args';
234: --
235: Begin
236: --
237: hr_utility.set_location('Entering:'||l_proc, 5);
238: --
239: -- Convert arguments into local l_rec structure.
240: --
241: l_rec.pd_classification_id := p_pd_classification_id;
248: l_rec.object_version_number := p_object_version_number;
249: --
250: -- Return the plsql record structure.
251: --
252: hr_utility.set_location(' Leaving:'||l_proc, 10);
253: Return(l_rec);
254: --
255: End convert_args;
256: --