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: If (p_constraint_name = 'PER_CHK_ATT_TO_DATE') Then
37: hr_utility.set_message(801, 'HR_51489_ESA_CHK_ATT_TO_DATE');
38: hr_utility.raise_error;
33: Begin
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_CHK_ATT_TO_DATE') Then
37: hr_utility.set_message(801, 'HR_51489_ESA_CHK_ATT_TO_DATE');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_FK1') Then
40: hr_utility.set_message(801, 'HR_51490_ESA_ESTAB_ID_FK1');
41: hr_utility.raise_error;
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'PER_CHK_ATT_TO_DATE') Then
37: hr_utility.set_message(801, 'HR_51489_ESA_CHK_ATT_TO_DATE');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_FK1') Then
40: hr_utility.set_message(801, 'HR_51490_ESA_ESTAB_ID_FK1');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_ESTAB_ATTTENDANCES_FK2') Then
36: If (p_constraint_name = 'PER_CHK_ATT_TO_DATE') Then
37: hr_utility.set_message(801, 'HR_51489_ESA_CHK_ATT_TO_DATE');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_FK1') Then
40: hr_utility.set_message(801, 'HR_51490_ESA_ESTAB_ID_FK1');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_ESTAB_ATTTENDANCES_FK2') Then
43: hr_utility.set_message(801, 'HR_51491_ESA_BUS_GRP_ID_FK2');
44: hr_utility.raise_error;
37: hr_utility.set_message(801, 'HR_51489_ESA_CHK_ATT_TO_DATE');
38: hr_utility.raise_error;
39: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_FK1') Then
40: hr_utility.set_message(801, 'HR_51490_ESA_ESTAB_ID_FK1');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_ESTAB_ATTTENDANCES_FK2') Then
43: hr_utility.set_message(801, 'HR_51491_ESA_BUS_GRP_ID_FK2');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_PK') Then
39: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_FK1') Then
40: hr_utility.set_message(801, 'HR_51490_ESA_ESTAB_ID_FK1');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_ESTAB_ATTTENDANCES_FK2') Then
43: hr_utility.set_message(801, 'HR_51491_ESA_BUS_GRP_ID_FK2');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_PK') Then
46: hr_utility.set_message(801, 'HR_51492_ESA_ESTAB_ID_PK');
47: hr_utility.raise_error;
40: hr_utility.set_message(801, 'HR_51490_ESA_ESTAB_ID_FK1');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'PER_ESTAB_ATTTENDANCES_FK2') Then
43: hr_utility.set_message(801, 'HR_51491_ESA_BUS_GRP_ID_FK2');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_PK') Then
46: hr_utility.set_message(801, 'HR_51492_ESA_ESTAB_ID_PK');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_UK') Then
42: ElsIf (p_constraint_name = 'PER_ESTAB_ATTTENDANCES_FK2') Then
43: hr_utility.set_message(801, 'HR_51491_ESA_BUS_GRP_ID_FK2');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_PK') Then
46: hr_utility.set_message(801, 'HR_51492_ESA_ESTAB_ID_PK');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_UK') Then
49: hr_utility.set_message(801, 'HR_51493_ESA_ESTAB_UK');
50: hr_utility.raise_error;
43: hr_utility.set_message(801, 'HR_51491_ESA_BUS_GRP_ID_FK2');
44: hr_utility.raise_error;
45: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_PK') Then
46: hr_utility.set_message(801, 'HR_51492_ESA_ESTAB_ID_PK');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_UK') Then
49: hr_utility.set_message(801, 'HR_51493_ESA_ESTAB_UK');
50: hr_utility.raise_error;
51: Else
45: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_PK') Then
46: hr_utility.set_message(801, 'HR_51492_ESA_ESTAB_ID_PK');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_UK') Then
49: hr_utility.set_message(801, 'HR_51493_ESA_ESTAB_UK');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message(801, 'HR_51492_ESA_ESTAB_ID_PK');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_UK') Then
49: hr_utility.set_message(801, 'HR_51493_ESA_ESTAB_UK');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
48: ElsIf (p_constraint_name = 'PER_ESTAB_ATTENDANCES_UK') Then
49: hr_utility.set_message(801, 'HR_51493_ESA_ESTAB_UK');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
49: hr_utility.set_message(801, 'HR_51493_ESA_ESTAB_UK');
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
50: hr_utility.raise_error;
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
51: Else
52: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
53: hr_utility.set_message_token('PROCEDURE', l_proc);
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
54: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
55: hr_utility.raise_error;
56: End If;
57: --
58: hr_utility.set_location(' Leaving:'||l_proc, 10);
59: End constraint_error;
60: --
61: -- ----------------------------------------------------------------------------
62: -- |-----------------------------< api_updating >-----------------------------|
110: l_proc varchar2(72) := g_package||'api_updating';
111: l_fct_ret boolean;
112: --
113: Begin
114: hr_utility.set_location('Entering:'||l_proc, 5);
115: --
116: If (
117: p_attendance_id is null and
118: p_object_version_number is null
126: If (
127: p_attendance_id = g_old_rec.attendance_id and
128: p_object_version_number = g_old_rec.object_version_number
129: ) Then
130: hr_utility.set_location(l_proc, 10);
131: --
132: -- The g_old_rec is current therefore we must
133: -- set the returning function to true
134: --
143: Close C_Sel1;
144: --
145: -- The primary key is invalid therefore we must error
146: --
147: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
148: hr_utility.raise_error;
149: End If;
150: Close C_Sel1;
151: If (p_object_version_number <> g_old_rec.object_version_number) Then
144: --
145: -- The primary key is invalid therefore we must error
146: --
147: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
148: hr_utility.raise_error;
149: End If;
150: Close C_Sel1;
151: If (p_object_version_number <> g_old_rec.object_version_number) Then
152: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
148: hr_utility.raise_error;
149: End If;
150: Close C_Sel1;
151: If (p_object_version_number <> g_old_rec.object_version_number) Then
152: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
153: hr_utility.raise_error;
154: End If;
155: hr_utility.set_location(l_proc, 15);
156: l_fct_ret := true;
149: End If;
150: Close C_Sel1;
151: If (p_object_version_number <> g_old_rec.object_version_number) Then
152: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
153: hr_utility.raise_error;
154: End If;
155: hr_utility.set_location(l_proc, 15);
156: l_fct_ret := true;
157: End If;
151: If (p_object_version_number <> g_old_rec.object_version_number) Then
152: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
153: hr_utility.raise_error;
154: End If;
155: hr_utility.set_location(l_proc, 15);
156: l_fct_ret := true;
157: End If;
158: End If;
159: hr_utility.set_location(' Leaving:'||l_proc, 20);
155: hr_utility.set_location(l_proc, 15);
156: l_fct_ret := true;
157: End If;
158: End If;
159: hr_utility.set_location(' Leaving:'||l_proc, 20);
160: Return (l_fct_ret);
161: --
162: End api_updating;
163: --
212: --
213: l_proc varchar2(72) := g_package||'lck';
214: --
215: Begin
216: hr_utility.set_location('Entering:'||l_proc, 5);
217: --
218: -- Add any mandatory argument checking here:
219: -- Example:
220: -- hr_api.mandatory_arg_error
228: Close C_Sel1;
229: --
230: -- The primary key is invalid therefore we must error
231: --
232: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
233: hr_utility.raise_error;
234: End If;
235: Close C_Sel1;
236: If (p_object_version_number <> g_old_rec.object_version_number) Then
229: --
230: -- The primary key is invalid therefore we must error
231: --
232: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
233: hr_utility.raise_error;
234: End If;
235: Close C_Sel1;
236: If (p_object_version_number <> g_old_rec.object_version_number) Then
237: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
233: hr_utility.raise_error;
234: End If;
235: Close C_Sel1;
236: If (p_object_version_number <> g_old_rec.object_version_number) Then
237: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
238: hr_utility.raise_error;
239: End If;
240: --
241: hr_utility.set_location(' Leaving:'||l_proc, 10);
234: End If;
235: Close C_Sel1;
236: If (p_object_version_number <> g_old_rec.object_version_number) Then
237: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
238: hr_utility.raise_error;
239: End If;
240: --
241: hr_utility.set_location(' Leaving:'||l_proc, 10);
242: --
237: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
238: hr_utility.raise_error;
239: End If;
240: --
241: hr_utility.set_location(' Leaving:'||l_proc, 10);
242: --
243: -- We need to trap the ORA LOCK exception
244: --
245: Exception
247: --
248: -- The object is locked therefore we need to supply a meaningful
249: -- error message.
250: --
251: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
252: hr_utility.set_message_token('TABLE_NAME', 'per_establishment_attendances');
253: hr_utility.raise_error;
254: End lck;
255: --
248: -- The object is locked therefore we need to supply a meaningful
249: -- error message.
250: --
251: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
252: hr_utility.set_message_token('TABLE_NAME', 'per_establishment_attendances');
253: hr_utility.raise_error;
254: End lck;
255: --
256: -- ----------------------------------------------------------------------------
249: -- error message.
250: --
251: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
252: hr_utility.set_message_token('TABLE_NAME', 'per_establishment_attendances');
253: hr_utility.raise_error;
254: End lck;
255: --
256: -- ----------------------------------------------------------------------------
257: -- |-----------------------------< convert_args >-----------------------------|
297: l_proc varchar2(72) := g_package||'convert_args';
298: --
299: Begin
300: --
301: hr_utility.set_location('Entering:'||l_proc, 5);
302: --
303: -- Convert arguments into local l_rec structure.
304: --
305: l_rec.attendance_id := p_attendance_id;
336: l_rec.address := p_address;
337: --
338: -- Return the plsql record structure.
339: --
340: hr_utility.set_location(' Leaving:'||l_proc, 10);
341: Return(l_rec);
342: --
343: End convert_args;
344: --