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: --
37: --
38: hr_utility.set_location(' Leaving:'||l_proc, 10);
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: --
37: --
38: hr_utility.set_location(' Leaving:'||l_proc, 10);
39: End constraint_error;
40: --
41: -- ----------------------------------------------------------------------------
42: -- |-----------------------------< api_updating >-----------------------------|
64: l_proc varchar2(72) := g_package||'api_updating';
65: l_fct_ret boolean;
66: --
67: Begin
68: hr_utility.set_location('Entering:'||l_proc, 5);
69: --
70: If (
71: p_occupation_id is null and
72: p_object_version_number is null
80: If (
81: p_occupation_id = g_old_rec.occupation_id and
82: p_object_version_number = g_old_rec.object_version_number
83: ) Then
84: hr_utility.set_location(l_proc, 10);
85: --
86: -- The g_old_rec is current therefore we must
87: -- set the returning function to true
88: --
97: Close C_Sel1;
98: --
99: -- The primary key is invalid therefore we must error
100: --
101: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
102: hr_utility.raise_error;
103: End If;
104: Close C_Sel1;
105: If (p_object_version_number <> g_old_rec.object_version_number) Then
98: --
99: -- The primary key is invalid therefore we must error
100: --
101: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
102: hr_utility.raise_error;
103: End If;
104: Close C_Sel1;
105: If (p_object_version_number <> g_old_rec.object_version_number) Then
106: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
102: hr_utility.raise_error;
103: End If;
104: Close C_Sel1;
105: If (p_object_version_number <> g_old_rec.object_version_number) Then
106: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
107: hr_utility.raise_error;
108: End If;
109: hr_utility.set_location(l_proc, 15);
110: l_fct_ret := true;
103: End If;
104: Close C_Sel1;
105: If (p_object_version_number <> g_old_rec.object_version_number) Then
106: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
107: hr_utility.raise_error;
108: End If;
109: hr_utility.set_location(l_proc, 15);
110: l_fct_ret := true;
111: End If;
105: If (p_object_version_number <> g_old_rec.object_version_number) Then
106: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
107: hr_utility.raise_error;
108: End If;
109: hr_utility.set_location(l_proc, 15);
110: l_fct_ret := true;
111: End If;
112: End If;
113: hr_utility.set_location(' Leaving:'||l_proc, 20);
109: hr_utility.set_location(l_proc, 15);
110: l_fct_ret := true;
111: End If;
112: End If;
113: hr_utility.set_location(' Leaving:'||l_proc, 20);
114: Return (l_fct_ret);
115: --
116: End api_updating;
117: --
139: --
140: l_proc varchar2(72) := g_package||'lck';
141: --
142: Begin
143: hr_utility.set_location('Entering:'||l_proc, 5);
144: --
145: -- Add any mandatory argument checking here:
146: -- Example:
147: -- hr_api.mandatory_arg_error
155: Close C_Sel1;
156: --
157: -- The primary key is invalid therefore we must error
158: --
159: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
160: hr_utility.raise_error;
161: End If;
162: Close C_Sel1;
163: If (p_object_version_number <> g_old_rec.object_version_number) Then
156: --
157: -- The primary key is invalid therefore we must error
158: --
159: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
160: hr_utility.raise_error;
161: End If;
162: Close C_Sel1;
163: If (p_object_version_number <> g_old_rec.object_version_number) Then
164: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
160: hr_utility.raise_error;
161: End If;
162: Close C_Sel1;
163: If (p_object_version_number <> g_old_rec.object_version_number) Then
164: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
165: hr_utility.raise_error;
166: End If;
167: --
168: hr_utility.set_location(' Leaving:'||l_proc, 10);
161: End If;
162: Close C_Sel1;
163: If (p_object_version_number <> g_old_rec.object_version_number) Then
164: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
165: hr_utility.raise_error;
166: End If;
167: --
168: hr_utility.set_location(' Leaving:'||l_proc, 10);
169: --
164: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
165: hr_utility.raise_error;
166: End If;
167: --
168: hr_utility.set_location(' Leaving:'||l_proc, 10);
169: --
170: -- We need to trap the ORA LOCK exception
171: --
172: Exception
174: --
175: -- The object is locked therefore we need to supply a meaningful
176: -- error message.
177: --
178: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
179: hr_utility.set_message_token('TABLE_NAME', 'pay_wci_occupations');
180: hr_utility.raise_error;
181: End lck;
182: --
175: -- The object is locked therefore we need to supply a meaningful
176: -- error message.
177: --
178: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
179: hr_utility.set_message_token('TABLE_NAME', 'pay_wci_occupations');
180: hr_utility.raise_error;
181: End lck;
182: --
183: -- ----------------------------------------------------------------------------
176: -- error message.
177: --
178: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
179: hr_utility.set_message_token('TABLE_NAME', 'pay_wci_occupations');
180: hr_utility.raise_error;
181: End lck;
182: --
183: -- ----------------------------------------------------------------------------
184: -- |-----------------------------< convert_args >-----------------------------|
198: l_proc varchar2(72) := g_package||'convert_args';
199: --
200: Begin
201: --
202: hr_utility.set_location('Entering:'||l_proc, 5);
203: --
204: -- Convert arguments into local l_rec structure.
205: --
206: l_rec.occupation_id := p_occupation_id;
211: l_rec.object_version_number := p_object_version_number;
212: --
213: -- Return the plsql record structure.
214: --
215: hr_utility.set_location(' Leaving:'||l_proc, 10);
216: Return(l_rec);
217: --
218: End convert_args;
219: --