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 = 'HR_CAU_CAL_FK') Then
37: --
38: hr_utility.set_message(801, 'HR_51068_CAU_CAL_FK');
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'HR_CAU_CAL_FK') Then
37: --
38: hr_utility.set_message(801, 'HR_51068_CAU_CAL_FK');
39: --
40: ElsIf (p_constraint_name = 'HR_CAU_PPU_FK') Then
41: --
42: hr_utility.set_message(801, 'HR_51069_CAU_PPU_FK');
38: hr_utility.set_message(801, 'HR_51068_CAU_CAL_FK');
39: --
40: ElsIf (p_constraint_name = 'HR_CAU_PPU_FK') Then
41: --
42: hr_utility.set_message(801, 'HR_51069_CAU_PPU_FK');
43: --
44: ElsIf (p_constraint_name = 'HR_CAU_START_END') Then
45: --
46: hr_utility.set_message(801, 'HR_51070_CAU_START_END');
42: hr_utility.set_message(801, 'HR_51069_CAU_PPU_FK');
43: --
44: ElsIf (p_constraint_name = 'HR_CAU_START_END') Then
45: --
46: hr_utility.set_message(801, 'HR_51070_CAU_START_END');
47: --
48: Else
49: --
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
46: hr_utility.set_message(801, 'HR_51070_CAU_START_END');
47: --
48: Else
49: --
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: --
47: --
48: Else
49: --
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: --
55: End If;
48: Else
49: --
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: --
55: End If;
56: --
49: --
50: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
53: hr_utility.raise_error;
54: --
55: End If;
56: --
57: hr_utility.raise_error;
53: hr_utility.raise_error;
54: --
55: End If;
56: --
57: hr_utility.raise_error;
58: --
59: hr_utility.set_location(' Leaving:'||l_proc, 10);
60: End constraint_error;
61: --
55: End If;
56: --
57: hr_utility.raise_error;
58: --
59: hr_utility.set_location(' Leaving:'||l_proc, 10);
60: End constraint_error;
61: --
62: -- ----------------------------------------------------------------------------
63: -- |-----------------------------< api_updating >-----------------------------|
86: l_proc varchar2(72) := g_package||'api_updating';
87: l_fct_ret boolean;
88: --
89: Begin
90: hr_utility.set_location('Entering:'||l_proc, 5);
91: --
92: If (
93: p_calendar_usage_id is null and
94: p_object_version_number is null
102: If (
103: p_calendar_usage_id = g_old_rec.calendar_usage_id and
104: p_object_version_number = g_old_rec.object_version_number
105: ) Then
106: hr_utility.set_location(l_proc, 10);
107: --
108: -- The g_old_rec is current therefore we must
109: -- set the returning function to true
110: --
119: Close C_Sel1;
120: --
121: -- The primary key is invalid therefore we must error
122: --
123: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
124: hr_utility.raise_error;
125: End If;
126: Close C_Sel1;
127: If (p_object_version_number <> g_old_rec.object_version_number) Then
120: --
121: -- The primary key is invalid therefore we must error
122: --
123: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
124: hr_utility.raise_error;
125: End If;
126: Close C_Sel1;
127: If (p_object_version_number <> g_old_rec.object_version_number) Then
128: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
124: hr_utility.raise_error;
125: End If;
126: Close C_Sel1;
127: If (p_object_version_number <> g_old_rec.object_version_number) Then
128: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
129: hr_utility.raise_error;
130: End If;
131: hr_utility.set_location(l_proc, 15);
132: l_fct_ret := true;
125: End If;
126: Close C_Sel1;
127: If (p_object_version_number <> g_old_rec.object_version_number) Then
128: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
129: hr_utility.raise_error;
130: End If;
131: hr_utility.set_location(l_proc, 15);
132: l_fct_ret := true;
133: End If;
127: If (p_object_version_number <> g_old_rec.object_version_number) Then
128: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
129: hr_utility.raise_error;
130: End If;
131: hr_utility.set_location(l_proc, 15);
132: l_fct_ret := true;
133: End If;
134: End If;
135: hr_utility.set_location(' Leaving:'||l_proc, 20);
131: hr_utility.set_location(l_proc, 15);
132: l_fct_ret := true;
133: End If;
134: End If;
135: hr_utility.set_location(' Leaving:'||l_proc, 20);
136: Return (l_fct_ret);
137: --
138: End api_updating;
139: --
162: --
163: l_proc varchar2(72) := g_package||'lck';
164: --
165: Begin
166: hr_utility.set_location('Entering:'||l_proc, 5);
167: --
168: -- Add any mandatory argument checking here:
169: -- Example:
170: -- hr_api.mandatory_arg_error
178: Close C_Sel1;
179: --
180: -- The primary key is invalid therefore we must error
181: --
182: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
183: hr_utility.raise_error;
184: End If;
185: Close C_Sel1;
186: If (p_object_version_number <> g_old_rec.object_version_number) Then
179: --
180: -- The primary key is invalid therefore we must error
181: --
182: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
183: hr_utility.raise_error;
184: End If;
185: Close C_Sel1;
186: If (p_object_version_number <> g_old_rec.object_version_number) Then
187: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
183: hr_utility.raise_error;
184: End If;
185: Close C_Sel1;
186: If (p_object_version_number <> g_old_rec.object_version_number) Then
187: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
188: hr_utility.raise_error;
189: End If;
190: --
191: hr_utility.set_location(' Leaving:'||l_proc, 10);
184: End If;
185: Close C_Sel1;
186: If (p_object_version_number <> g_old_rec.object_version_number) Then
187: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
188: hr_utility.raise_error;
189: End If;
190: --
191: hr_utility.set_location(' Leaving:'||l_proc, 10);
192: --
187: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
188: hr_utility.raise_error;
189: End If;
190: --
191: hr_utility.set_location(' Leaving:'||l_proc, 10);
192: --
193: -- We need to trap the ORA LOCK exception
194: --
195: Exception
197: --
198: -- The object is locked therefore we need to supply a meaningful
199: -- error message.
200: --
201: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
202: hr_utility.set_message_token('TABLE_NAME', 'hr_calendar_usages');
203: hr_utility.raise_error;
204: End lck;
205: --
198: -- The object is locked therefore we need to supply a meaningful
199: -- error message.
200: --
201: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
202: hr_utility.set_message_token('TABLE_NAME', 'hr_calendar_usages');
203: hr_utility.raise_error;
204: End lck;
205: --
206: -- ----------------------------------------------------------------------------
199: -- error message.
200: --
201: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
202: hr_utility.set_message_token('TABLE_NAME', 'hr_calendar_usages');
203: hr_utility.raise_error;
204: End lck;
205: --
206: -- ----------------------------------------------------------------------------
207: -- |-----------------------------< convert_args >-----------------------------|
222: l_proc varchar2(72) := g_package||'convert_args';
223: --
224: Begin
225: --
226: hr_utility.set_location('Entering:'||l_proc, 5);
227: --
228: -- Convert arguments into local l_rec structure.
229: --
230: l_rec.calendar_id := p_calendar_id;
236: l_rec.object_version_number := p_object_version_number;
237: --
238: -- Return the plsql record structure.
239: --
240: hr_utility.set_location(' Leaving:'||l_proc, 10);
241: Return(l_rec);
242: --
243: End convert_args;
244: --