17: l_proc varchar2(72);
18: --
19: Begin
20: l_proc := g_package||'constraint_error';
21: hr_utility.set_location('Entering:'||l_proc, 5);
22: --
23: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
24: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.set_message_token('PROCEDURE', l_proc);
20: l_proc := g_package||'constraint_error';
21: hr_utility.set_location('Entering:'||l_proc, 5);
22: --
23: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
24: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.set_message_token('PROCEDURE', l_proc);
26: hr_utility.set_message_token('STEP','5');
27: hr_utility.raise_error;
28: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
21: hr_utility.set_location('Entering:'||l_proc, 5);
22: --
23: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
24: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.set_message_token('PROCEDURE', l_proc);
26: hr_utility.set_message_token('STEP','5');
27: hr_utility.raise_error;
28: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
22: --
23: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
24: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.set_message_token('PROCEDURE', l_proc);
26: hr_utility.set_message_token('STEP','5');
27: hr_utility.raise_error;
28: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
23: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
24: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.set_message_token('PROCEDURE', l_proc);
26: hr_utility.set_message_token('STEP','5');
27: hr_utility.raise_error;
28: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP','10');
25: hr_utility.set_message_token('PROCEDURE', l_proc);
26: hr_utility.set_message_token('STEP','5');
27: hr_utility.raise_error;
28: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP','10');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
26: hr_utility.set_message_token('STEP','5');
27: hr_utility.raise_error;
28: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP','10');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
34: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
27: hr_utility.raise_error;
28: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP','10');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
34: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
28: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
29: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP','10');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
34: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('STEP','15');
30: hr_utility.set_message_token('PROCEDURE', l_proc);
31: hr_utility.set_message_token('STEP','10');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
34: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('STEP','15');
37: hr_utility.raise_error;
38: Else
31: hr_utility.set_message_token('STEP','10');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
34: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('STEP','15');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
32: hr_utility.raise_error;
33: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
34: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('STEP','15');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
33: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
34: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('STEP','15');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
35: hr_utility.set_message_token('PROCEDURE', l_proc);
36: hr_utility.set_message_token('STEP','15');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
36: hr_utility.set_message_token('STEP','15');
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
44: --
37: hr_utility.raise_error;
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
44: --
45: hr_utility.set_location(' Leaving:'||l_proc, 10);
38: Else
39: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
40: hr_utility.set_message_token('PROCEDURE', l_proc);
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
44: --
45: hr_utility.set_location(' Leaving:'||l_proc, 10);
46: End constraint_error;
41: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
42: hr_utility.raise_error;
43: End If;
44: --
45: hr_utility.set_location(' Leaving:'||l_proc, 10);
46: End constraint_error;
47: --
48: -- ----------------------------------------------------------------------------
49: -- |-----------------------------< api_updating >-----------------------------|
74: l_fct_ret boolean;
75: --
76: Begin
77: l_proc := g_package||'api_updating';
78: hr_utility.set_location('Entering:'||l_proc, 5);
79: --
80: If (
81: p_noac_remark_id is null and
82: p_object_version_number is null
90: If (
91: p_noac_remark_id = g_old_rec.noac_remark_id and
92: p_object_version_number = g_old_rec.object_version_number
93: ) Then
94: hr_utility.set_location(l_proc, 10);
95: --
96: -- The g_old_rec is current therefore we must
97: -- set the returning function to true
98: --
107: Close C_Sel1;
108: --
109: -- The primary key is invalid therefore we must error
110: --
111: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
112: hr_utility.raise_error;
113: End If;
114: Close C_Sel1;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
108: --
109: -- The primary key is invalid therefore we must error
110: --
111: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
112: hr_utility.raise_error;
113: End If;
114: Close C_Sel1;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
116: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
112: hr_utility.raise_error;
113: End If;
114: Close C_Sel1;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
116: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
117: hr_utility.raise_error;
118: End If;
119: hr_utility.set_location(l_proc, 15);
120: l_fct_ret := true;
113: End If;
114: Close C_Sel1;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
116: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
117: hr_utility.raise_error;
118: End If;
119: hr_utility.set_location(l_proc, 15);
120: l_fct_ret := true;
121: End If;
115: If (p_object_version_number <> g_old_rec.object_version_number) Then
116: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
117: hr_utility.raise_error;
118: End If;
119: hr_utility.set_location(l_proc, 15);
120: l_fct_ret := true;
121: End If;
122: End If;
123: hr_utility.set_location(' Leaving:'||l_proc, 20);
119: hr_utility.set_location(l_proc, 15);
120: l_fct_ret := true;
121: End If;
122: End If;
123: hr_utility.set_location(' Leaving:'||l_proc, 20);
124: Return (l_fct_ret);
125: --
126: End api_updating;
127: --
152: l_proc varchar2(72);
153: --
154: Begin
155: l_proc := g_package||'lck';
156: hr_utility.set_location('Entering:'||l_proc, 5);
157: --
158: -- Add any mandatory argument checking here:
159: -- Example:
160: -- hr_api.mandatory_arg_error
168: Close C_Sel1;
169: --
170: -- The primary key is invalid therefore we must error
171: --
172: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
173: hr_utility.raise_error;
174: End If;
175: Close C_Sel1;
176: If (p_object_version_number <> g_old_rec.object_version_number) Then
169: --
170: -- The primary key is invalid therefore we must error
171: --
172: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
173: hr_utility.raise_error;
174: End If;
175: Close C_Sel1;
176: If (p_object_version_number <> g_old_rec.object_version_number) Then
177: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
173: hr_utility.raise_error;
174: End If;
175: Close C_Sel1;
176: If (p_object_version_number <> g_old_rec.object_version_number) Then
177: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
178: hr_utility.raise_error;
179: End If;
180: --
181: hr_utility.set_location(' Leaving:'||l_proc, 10);
174: End If;
175: Close C_Sel1;
176: If (p_object_version_number <> g_old_rec.object_version_number) Then
177: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
178: hr_utility.raise_error;
179: End If;
180: --
181: hr_utility.set_location(' Leaving:'||l_proc, 10);
182: --
177: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
178: hr_utility.raise_error;
179: End If;
180: --
181: hr_utility.set_location(' Leaving:'||l_proc, 10);
182: --
183: -- We need to trap the ORA LOCK exception
184: --
185: Exception
187: --
188: -- The object is locked therefore we need to supply a meaningful
189: -- error message.
190: --
191: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
192: hr_utility.set_message_token('TABLE_NAME', 'ghr_noac_remarks');
193: hr_utility.raise_error;
194: End lck;
195: --
188: -- The object is locked therefore we need to supply a meaningful
189: -- error message.
190: --
191: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
192: hr_utility.set_message_token('TABLE_NAME', 'ghr_noac_remarks');
193: hr_utility.raise_error;
194: End lck;
195: --
196: -- ----------------------------------------------------------------------------
189: -- error message.
190: --
191: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
192: hr_utility.set_message_token('TABLE_NAME', 'ghr_noac_remarks');
193: hr_utility.raise_error;
194: End lck;
195: --
196: -- ----------------------------------------------------------------------------
197: -- |-----------------------------< convert_args >-----------------------------|
214: --
215: Begin
216: --
217: l_proc := g_package||'convert_args';
218: hr_utility.set_location('Entering:'||l_proc, 5);
219: --
220: -- Convert arguments into local l_rec structure.
221: --
222: l_rec.noac_remark_id := p_noac_remark_id;
229: l_rec.object_version_number := p_object_version_number;
230: --
231: -- Return the plsql record structure.
232: --
233: hr_utility.set_location(' Leaving:'||l_proc, 10);
234: Return(l_rec);
235: --
236: End convert_args;
237: --