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_SALARY_SURVEYS_PK') Then
22: hr_utility.set_message(800, 'THE HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PER_SALARY_SURVEYS_PK') Then
22: hr_utility.set_message(800, 'THE HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SALARY_SURVEYS_UK1') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PER_SALARY_SURVEYS_PK') Then
22: hr_utility.set_message(800, 'THE HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SALARY_SURVEYS_UK1') Then
27: hr_utility.set_message(800, 'PER_50330_INV_SURVEY_COMB');
20: --
21: If (p_constraint_name = 'PER_SALARY_SURVEYS_PK') Then
22: hr_utility.set_message(800, 'THE HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SALARY_SURVEYS_UK1') Then
27: hr_utility.set_message(800, 'PER_50330_INV_SURVEY_COMB');
28: hr_utility.raise_error;
21: If (p_constraint_name = 'PER_SALARY_SURVEYS_PK') Then
22: hr_utility.set_message(800, 'THE HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SALARY_SURVEYS_UK1') Then
27: hr_utility.set_message(800, 'PER_50330_INV_SURVEY_COMB');
28: hr_utility.raise_error;
29: Else
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SALARY_SURVEYS_UK1') Then
27: hr_utility.set_message(800, 'PER_50330_INV_SURVEY_COMB');
28: hr_utility.raise_error;
29: Else
30: hr_utility.set_message(800, 'HR_7877_API_INVALID_CONSTRAINT');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SALARY_SURVEYS_UK1') Then
27: hr_utility.set_message(800, 'PER_50330_INV_SURVEY_COMB');
28: hr_utility.raise_error;
29: Else
30: hr_utility.set_message(800, 'HR_7877_API_INVALID_CONSTRAINT');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
26: ElsIf (p_constraint_name = 'PER_SALARY_SURVEYS_UK1') Then
27: hr_utility.set_message(800, 'PER_50330_INV_SURVEY_COMB');
28: hr_utility.raise_error;
29: Else
30: hr_utility.set_message(800, 'HR_7877_API_INVALID_CONSTRAINT');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
33: hr_utility.raise_error;
34: End If;
27: hr_utility.set_message(800, 'PER_50330_INV_SURVEY_COMB');
28: hr_utility.raise_error;
29: Else
30: hr_utility.set_message(800, 'HR_7877_API_INVALID_CONSTRAINT');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
33: hr_utility.raise_error;
34: End If;
35: --
28: hr_utility.raise_error;
29: Else
30: hr_utility.set_message(800, 'HR_7877_API_INVALID_CONSTRAINT');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
33: hr_utility.raise_error;
34: End If;
35: --
36: hr_utility.set_location(' Leaving:'||l_proc, 10);
29: Else
30: hr_utility.set_message(800, 'HR_7877_API_INVALID_CONSTRAINT');
31: hr_utility.set_message_token('PROCEDURE', l_proc);
32: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
33: hr_utility.raise_error;
34: End If;
35: --
36: hr_utility.set_location(' Leaving:'||l_proc, 10);
37: End constraint_error;
32: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
33: hr_utility.raise_error;
34: End If;
35: --
36: hr_utility.set_location(' Leaving:'||l_proc, 10);
37: End constraint_error;
38: --
39: -- ----------------------------------------------------------------------------
40: -- |-----------------------------< api_updating >-----------------------------|
85: l_proc varchar2(72) := g_package||'api_updating';
86: l_fct_ret boolean;
87: --
88: Begin
89: hr_utility.set_location('Entering:'||l_proc, 5);
90: --
91: If (
92: p_salary_survey_id is null and
93: p_object_version_number is null
101: If (
102: p_salary_survey_id = g_old_rec.salary_survey_id and
103: p_object_version_number = g_old_rec.object_version_number
104: ) Then
105: hr_utility.set_location(l_proc, 10);
106: --
107: -- The g_old_rec is current therefore we must
108: -- set the returning function to true
109: --
118: Close C_Sel1;
119: --
120: -- The primary key is invalid therefore we must error
121: --
122: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
123: hr_utility.raise_error;
124: End If;
125: Close C_Sel1;
126: If (p_object_version_number <> g_old_rec.object_version_number) Then
119: --
120: -- The primary key is invalid therefore we must error
121: --
122: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
123: hr_utility.raise_error;
124: End If;
125: Close C_Sel1;
126: If (p_object_version_number <> g_old_rec.object_version_number) Then
127: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
123: hr_utility.raise_error;
124: End If;
125: Close C_Sel1;
126: If (p_object_version_number <> g_old_rec.object_version_number) Then
127: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
128: hr_utility.raise_error;
129: End If;
130: hr_utility.set_location(l_proc, 15);
131: l_fct_ret := true;
124: End If;
125: Close C_Sel1;
126: If (p_object_version_number <> g_old_rec.object_version_number) Then
127: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
128: hr_utility.raise_error;
129: End If;
130: hr_utility.set_location(l_proc, 15);
131: l_fct_ret := true;
132: End If;
126: If (p_object_version_number <> g_old_rec.object_version_number) Then
127: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
128: hr_utility.raise_error;
129: End If;
130: hr_utility.set_location(l_proc, 15);
131: l_fct_ret := true;
132: End If;
133: End If;
134: hr_utility.set_location(' Leaving:'||l_proc, 20);
130: hr_utility.set_location(l_proc, 15);
131: l_fct_ret := true;
132: End If;
133: End If;
134: hr_utility.set_location(' Leaving:'||l_proc, 20);
135: Return (l_fct_ret);
136: --
137: End api_updating;
138: --
183: --
184: l_proc varchar2(72) := g_package||'lck';
185: --
186: Begin
187: hr_utility.set_location('Entering:'||l_proc, 5);
188: --
189: -- Add any mandatory argument checking here:
190: -- Example:
191: -- hr_api.mandatory_arg_error
199: Close C_Sel1;
200: --
201: -- The primary key is invalid therefore we must error
202: --
203: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
204: hr_utility.raise_error;
205: End If;
206: Close C_Sel1;
207: If (p_object_version_number <> g_old_rec.object_version_number) Then
200: --
201: -- The primary key is invalid therefore we must error
202: --
203: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
204: hr_utility.raise_error;
205: End If;
206: Close C_Sel1;
207: If (p_object_version_number <> g_old_rec.object_version_number) Then
208: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
204: hr_utility.raise_error;
205: End If;
206: Close C_Sel1;
207: If (p_object_version_number <> g_old_rec.object_version_number) Then
208: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
209: hr_utility.raise_error;
210: End If;
211: --
212: hr_utility.set_location(' Leaving:'||l_proc, 10);
205: End If;
206: Close C_Sel1;
207: If (p_object_version_number <> g_old_rec.object_version_number) Then
208: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
209: hr_utility.raise_error;
210: End If;
211: --
212: hr_utility.set_location(' Leaving:'||l_proc, 10);
213: --
208: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
209: hr_utility.raise_error;
210: End If;
211: --
212: hr_utility.set_location(' Leaving:'||l_proc, 10);
213: --
214: -- We need to trap the ORA LOCK exception
215: --
216: Exception
218: --
219: -- The object is locked therefore we need to supply a meaningful
220: -- error message.
221: --
222: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
223: hr_utility.set_message_token('TABLE_NAME', 'per_salary_surveys');
224: hr_utility.raise_error;
225: End lck;
226: --
219: -- The object is locked therefore we need to supply a meaningful
220: -- error message.
221: --
222: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
223: hr_utility.set_message_token('TABLE_NAME', 'per_salary_surveys');
224: hr_utility.raise_error;
225: End lck;
226: --
227: -- ----------------------------------------------------------------------------
220: -- error message.
221: --
222: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
223: hr_utility.set_message_token('TABLE_NAME', 'per_salary_surveys');
224: hr_utility.raise_error;
225: End lck;
226: --
227: -- ----------------------------------------------------------------------------
228: -- |-----------------------------< convert_args >-----------------------------|
265: l_proc varchar2(72) := g_package||'convert_args';
266: --
267: Begin
268: --
269: hr_utility.set_location('Entering:'||l_proc, 5);
270: --
271: -- Convert arguments into local l_rec structure.
272: --
273: l_rec.salary_survey_id := p_salary_survey_id;
301: l_rec.attribute20 := p_attribute20;
302: --
303: -- Return the plsql record structure.
304: --
305: hr_utility.set_location(' Leaving:'||l_proc, 10);
306: Return(l_rec);
307: --
308: End convert_args;
309: --