14: --
15: l_proc varchar2(72) := g_package||'return_api_dml_status';
16: --
17: Begin
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
18: hr_utility.set_location('Entering:'||l_proc, 5);
19: --
20: Return (nvl(g_api_dml, false));
21: --
22: hr_utility.set_location(' Leaving:'||l_proc, 10);
23: End return_api_dml_status;
24: --
25: -- ----------------------------------------------------------------------------
26: -- |---------------------------< constraint_error >---------------------------|
30: --
31: l_proc varchar2(72) := g_package||'constraint_error';
32: --
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: -- 70.2 change d start.
37: --
38: If (p_constraint_name = 'PER_ADDRESSES_PK') Then
35: --
36: -- 70.2 change d start.
37: --
38: If (p_constraint_name = 'PER_ADDRESSES_PK') Then
39: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_ADDR_PRIMARY_FLAG_CHK') Then
42: hr_utility.set_message(801, 'HR_7325_ADD_INVALID_PRIM_FLAG');
43: hr_utility.raise_error;
36: -- 70.2 change d start.
37: --
38: If (p_constraint_name = 'PER_ADDRESSES_PK') Then
39: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_ADDR_PRIMARY_FLAG_CHK') Then
42: hr_utility.set_message(801, 'HR_7325_ADD_INVALID_PRIM_FLAG');
43: hr_utility.raise_error;
44: Else
38: If (p_constraint_name = 'PER_ADDRESSES_PK') Then
39: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_ADDR_PRIMARY_FLAG_CHK') Then
42: hr_utility.set_message(801, 'HR_7325_ADD_INVALID_PRIM_FLAG');
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_7220_INVALID_PRIMARY_KEY');
40: hr_utility.raise_error;
41: ElsIf (p_constraint_name = 'PER_ADDR_PRIMARY_FLAG_CHK') Then
42: hr_utility.set_message(801, 'HR_7325_ADD_INVALID_PRIM_FLAG');
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_ADDR_PRIMARY_FLAG_CHK') Then
42: hr_utility.set_message(801, 'HR_7325_ADD_INVALID_PRIM_FLAG');
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(801, 'HR_7325_ADD_INVALID_PRIM_FLAG');
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: -- 70.2 change d end.
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: -- 70.2 change d end.
52: --
49: End If;
50: --
51: -- 70.2 change d end.
52: --
53: hr_utility.set_location(' Leaving:'||l_proc, 10);
54: End constraint_error;
55: --
56: -- ----------------------------------------------------------------------------
57: -- |-----------------------------< api_updating >-----------------------------|
120: l_proc varchar2(72) := g_package||'api_updating';
121: l_fct_ret boolean;
122: --
123: Begin
124: hr_utility.set_location('Entering:'||l_proc, 5);
125: --
126: If (
127: p_address_id is null and
128: p_object_version_number is null
136: If (
137: p_address_id = g_old_rec.address_id and
138: p_object_version_number = g_old_rec.object_version_number
139: ) Then
140: hr_utility.set_location(l_proc, 10);
141: --
142: -- The g_old_rec is current therefore we must
143: -- set the returning function to true
144: --
153: Close C_Sel1;
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
154: --
155: -- The primary key is invalid therefore we must error
156: --
157: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
158: hr_utility.raise_error;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
159: End If;
160: Close C_Sel1;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
161: If (p_object_version_number <> g_old_rec.object_version_number) Then
162: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
163: hr_utility.raise_error;
164: End If;
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
165: hr_utility.set_location(l_proc, 15);
166: l_fct_ret := true;
167: End If;
168: End If;
169: hr_utility.set_location(' Leaving:'||l_proc, 20);
170: Return (l_fct_ret);
171: --
172: End api_updating;
173: --
236: --
237: l_proc varchar2(72) := g_package||'lck';
238: --
239: Begin
240: hr_utility.set_location('Entering:'||l_proc, 5);
241: --
242: hr_api.mandatory_arg_error
243: (p_api_name => l_proc
244: ,p_argument => 'address_id'
255: Close C_Sel1;
256: --
257: -- The primary key is invalid therefore we must error
258: --
259: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
260: hr_utility.raise_error;
261: End If;
262: Close C_Sel1;
263: If (p_object_version_number <> g_old_rec.object_version_number) Then
256: --
257: -- The primary key is invalid therefore we must error
258: --
259: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
260: hr_utility.raise_error;
261: End If;
262: Close C_Sel1;
263: If (p_object_version_number <> g_old_rec.object_version_number) Then
264: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
260: hr_utility.raise_error;
261: End If;
262: Close C_Sel1;
263: If (p_object_version_number <> g_old_rec.object_version_number) Then
264: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
265: hr_utility.raise_error;
266: End If;
267: --
268: hr_utility.set_location(' Leaving:'||l_proc, 10);
261: End If;
262: Close C_Sel1;
263: If (p_object_version_number <> g_old_rec.object_version_number) Then
264: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
265: hr_utility.raise_error;
266: End If;
267: --
268: hr_utility.set_location(' Leaving:'||l_proc, 10);
269: --
264: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
265: hr_utility.raise_error;
266: End If;
267: --
268: hr_utility.set_location(' Leaving:'||l_proc, 10);
269: --
270: -- We need to trap the ORA LOCK exception
271: --
272: Exception
274: --
275: -- The object is locked therefore we need to supply a meaningful
276: -- error message.
277: --
278: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
279: hr_utility.set_message_token('TABLE_NAME', 'per_addresses');
280: hr_utility.raise_error;
281: End lck;
282: --
275: -- The object is locked therefore we need to supply a meaningful
276: -- error message.
277: --
278: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
279: hr_utility.set_message_token('TABLE_NAME', 'per_addresses');
280: hr_utility.raise_error;
281: End lck;
282: --
283: -- ----------------------------------------------------------------------------
276: -- error message.
277: --
278: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
279: hr_utility.set_message_token('TABLE_NAME', 'per_addresses');
280: hr_utility.raise_error;
281: End lck;
282: --
283: -- ----------------------------------------------------------------------------
284: -- |-----------------------------< convert_args >-----------------------------|
339: l_proc varchar2(72) := g_package||'convert_args';
340: --
341: Begin
342: --
343: hr_utility.set_location('Entering:'||l_proc, 5);
344: --
345: -- Convert arguments into local l_rec structure.
346: --
347: l_rec.address_id := p_address_id;
393: l_rec.object_version_number := p_object_version_number;
394: --
395: -- Return the plsql record structure.
396: --
397: hr_utility.set_location(' Leaving:'||l_proc, 10);
398: Return(l_rec);
399: --
400: End convert_args;
401: --