16: --
17: l_proc varchar2(72) := g_package||'constraint_error';
18: --
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
21: --
22: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
22: If (p_constraint_name = 'GHR_NOAC_REMARKS_FK1') Then
23: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
24: hr_utility.set_message_token('PROCEDURE', l_proc);
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
25: hr_utility.set_message_token('STEP','5');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
26: hr_utility.raise_error;
27: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
27: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_FK2') Then
28: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
29: hr_utility.set_message_token('PROCEDURE', l_proc);
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: Else
30: hr_utility.set_message_token('STEP','10');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
36: hr_utility.raise_error;
37: Else
38: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
31: hr_utility.raise_error;
32: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
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: ElsIf (p_constraint_name = 'GHR_NOAC_REMARKS_PK') Then
33: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
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: hr_utility.set_message_token('PROCEDURE', l_proc);
35: hr_utility.set_message_token('STEP','15');
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_token('STEP','15');
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 >-----------------------------|
72: l_proc varchar2(72) := g_package||'api_updating';
73: l_fct_ret boolean;
74: --
75: Begin
76: hr_utility.set_location('Entering:'||l_proc, 5);
77: --
78: If (
79: p_noac_remark_id is null and
80: p_object_version_number is null
88: If (
89: p_noac_remark_id = g_old_rec.noac_remark_id and
90: p_object_version_number = g_old_rec.object_version_number
91: ) Then
92: hr_utility.set_location(l_proc, 10);
93: --
94: -- The g_old_rec is current therefore we must
95: -- set the returning function to true
96: --
105: Close C_Sel1;
106: --
107: -- The primary key is invalid therefore we must error
108: --
109: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
110: hr_utility.raise_error;
111: End If;
112: Close C_Sel1;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
106: --
107: -- The primary key is invalid therefore we must error
108: --
109: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
110: hr_utility.raise_error;
111: End If;
112: Close C_Sel1;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
110: hr_utility.raise_error;
111: End If;
112: Close C_Sel1;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
115: hr_utility.raise_error;
116: End If;
117: hr_utility.set_location(l_proc, 15);
118: l_fct_ret := true;
111: End If;
112: Close C_Sel1;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
115: hr_utility.raise_error;
116: End If;
117: hr_utility.set_location(l_proc, 15);
118: l_fct_ret := true;
119: End If;
113: If (p_object_version_number <> g_old_rec.object_version_number) Then
114: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
115: hr_utility.raise_error;
116: End If;
117: hr_utility.set_location(l_proc, 15);
118: l_fct_ret := true;
119: End If;
120: End If;
121: hr_utility.set_location(' Leaving:'||l_proc, 20);
117: hr_utility.set_location(l_proc, 15);
118: l_fct_ret := true;
119: End If;
120: End If;
121: hr_utility.set_location(' Leaving:'||l_proc, 20);
122: Return (l_fct_ret);
123: --
124: End api_updating;
125: --
149: --
150: l_proc varchar2(72) := g_package||'lck';
151: --
152: Begin
153: hr_utility.set_location('Entering:'||l_proc, 5);
154: --
155: -- Add any mandatory argument checking here:
156: -- Example:
157: -- hr_api.mandatory_arg_error
165: Close C_Sel1;
166: --
167: -- The primary key is invalid therefore we must error
168: --
169: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
170: hr_utility.raise_error;
171: End If;
172: Close C_Sel1;
173: If (p_object_version_number <> g_old_rec.object_version_number) Then
166: --
167: -- The primary key is invalid therefore we must error
168: --
169: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
170: hr_utility.raise_error;
171: End If;
172: Close C_Sel1;
173: If (p_object_version_number <> g_old_rec.object_version_number) Then
174: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
170: hr_utility.raise_error;
171: End If;
172: Close C_Sel1;
173: If (p_object_version_number <> g_old_rec.object_version_number) Then
174: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
175: hr_utility.raise_error;
176: End If;
177: --
178: hr_utility.set_location(' Leaving:'||l_proc, 10);
171: End If;
172: Close C_Sel1;
173: If (p_object_version_number <> g_old_rec.object_version_number) Then
174: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
175: hr_utility.raise_error;
176: End If;
177: --
178: hr_utility.set_location(' Leaving:'||l_proc, 10);
179: --
174: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
175: hr_utility.raise_error;
176: End If;
177: --
178: hr_utility.set_location(' Leaving:'||l_proc, 10);
179: --
180: -- We need to trap the ORA LOCK exception
181: --
182: Exception
184: --
185: -- The object is locked therefore we need to supply a meaningful
186: -- error message.
187: --
188: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
189: hr_utility.set_message_token('TABLE_NAME', 'ghr_noac_remarks');
190: hr_utility.raise_error;
191: End lck;
192: --
185: -- The object is locked therefore we need to supply a meaningful
186: -- error message.
187: --
188: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
189: hr_utility.set_message_token('TABLE_NAME', 'ghr_noac_remarks');
190: hr_utility.raise_error;
191: End lck;
192: --
193: -- ----------------------------------------------------------------------------
186: -- error message.
187: --
188: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
189: hr_utility.set_message_token('TABLE_NAME', 'ghr_noac_remarks');
190: hr_utility.raise_error;
191: End lck;
192: --
193: -- ----------------------------------------------------------------------------
194: -- |-----------------------------< convert_args >-----------------------------|
210: l_proc varchar2(72) := g_package||'convert_args';
211: --
212: Begin
213: --
214: hr_utility.set_location('Entering:'||l_proc, 5);
215: --
216: -- Convert arguments into local l_rec structure.
217: --
218: l_rec.noac_remark_id := p_noac_remark_id;
225: l_rec.object_version_number := p_object_version_number;
226: --
227: -- Return the plsql record structure.
228: --
229: hr_utility.set_location(' Leaving:'||l_proc, 10);
230: Return(l_rec);
231: --
232: End convert_args;
233: --