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_PAE_PAT_FK') Then
37: -- *** NEW_MESSAGE_REQUIRED ***
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
34: hr_utility.set_location('Entering:'||l_proc, 5);
35: --
36: If (p_constraint_name = 'HR_PAE_PAT_FK') Then
37: -- *** NEW_MESSAGE_REQUIRED ***
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'HR_PAE_PK') Then
35: --
36: If (p_constraint_name = 'HR_PAE_PAT_FK') Then
37: -- *** NEW_MESSAGE_REQUIRED ***
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'HR_PAE_PK') Then
43: -- *** NEW_MESSAGE_REQUIRED ***
36: If (p_constraint_name = 'HR_PAE_PAT_FK') Then
37: -- *** NEW_MESSAGE_REQUIRED ***
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'HR_PAE_PK') Then
43: -- *** NEW_MESSAGE_REQUIRED ***
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
37: -- *** NEW_MESSAGE_REQUIRED ***
38: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'HR_PAE_PK') Then
43: -- *** NEW_MESSAGE_REQUIRED ***
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('STEP','5');
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'HR_PAE_PK') Then
43: -- *** NEW_MESSAGE_REQUIRED ***
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','10');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'HR_PAE_START_END_TIMES') Then
41: hr_utility.raise_error;
42: ElsIf (p_constraint_name = 'HR_PAE_PK') Then
43: -- *** NEW_MESSAGE_REQUIRED ***
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','10');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'HR_PAE_START_END_TIMES') Then
49: -- *** NEW_MESSAGE_REQUIRED ***
42: ElsIf (p_constraint_name = 'HR_PAE_PK') Then
43: -- *** NEW_MESSAGE_REQUIRED ***
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','10');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'HR_PAE_START_END_TIMES') Then
49: -- *** NEW_MESSAGE_REQUIRED ***
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
43: -- *** NEW_MESSAGE_REQUIRED ***
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
45: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','10');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'HR_PAE_START_END_TIMES') Then
49: -- *** NEW_MESSAGE_REQUIRED ***
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
46: hr_utility.set_message_token('STEP','10');
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'HR_PAE_START_END_TIMES') Then
49: -- *** NEW_MESSAGE_REQUIRED ***
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','15');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'HR_PAE_UK01') Then
47: hr_utility.raise_error;
48: ElsIf (p_constraint_name = 'HR_PAE_START_END_TIMES') Then
49: -- *** NEW_MESSAGE_REQUIRED ***
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','15');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'HR_PAE_UK01') Then
55: -- *** NEW_MESSAGE_REQUIRED ***
48: ElsIf (p_constraint_name = 'HR_PAE_START_END_TIMES') Then
49: -- *** NEW_MESSAGE_REQUIRED ***
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','15');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'HR_PAE_UK01') Then
55: -- *** NEW_MESSAGE_REQUIRED ***
56: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
49: -- *** NEW_MESSAGE_REQUIRED ***
50: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
51: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','15');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'HR_PAE_UK01') Then
55: -- *** NEW_MESSAGE_REQUIRED ***
56: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
57: hr_utility.set_message_token('PROCEDURE', l_proc);
52: hr_utility.set_message_token('STEP','15');
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'HR_PAE_UK01') Then
55: -- *** NEW_MESSAGE_REQUIRED ***
56: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
57: hr_utility.set_message_token('PROCEDURE', l_proc);
58: hr_utility.set_message_token('STEP','20');
59: hr_utility.raise_error;
60: Else
53: hr_utility.raise_error;
54: ElsIf (p_constraint_name = 'HR_PAE_UK01') Then
55: -- *** NEW_MESSAGE_REQUIRED ***
56: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
57: hr_utility.set_message_token('PROCEDURE', l_proc);
58: hr_utility.set_message_token('STEP','20');
59: hr_utility.raise_error;
60: Else
61: -- *** NEW_MESSAGE_REQUIRED ***
54: ElsIf (p_constraint_name = 'HR_PAE_UK01') Then
55: -- *** NEW_MESSAGE_REQUIRED ***
56: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
57: hr_utility.set_message_token('PROCEDURE', l_proc);
58: hr_utility.set_message_token('STEP','20');
59: hr_utility.raise_error;
60: Else
61: -- *** NEW_MESSAGE_REQUIRED ***
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: -- *** NEW_MESSAGE_REQUIRED ***
56: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
57: hr_utility.set_message_token('PROCEDURE', l_proc);
58: hr_utility.set_message_token('STEP','20');
59: hr_utility.raise_error;
60: Else
61: -- *** NEW_MESSAGE_REQUIRED ***
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
58: hr_utility.set_message_token('STEP','20');
59: hr_utility.raise_error;
60: Else
61: -- *** NEW_MESSAGE_REQUIRED ***
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
59: hr_utility.raise_error;
60: Else
61: -- *** NEW_MESSAGE_REQUIRED ***
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
67: --
60: Else
61: -- *** NEW_MESSAGE_REQUIRED ***
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
67: --
68: hr_utility.set_location(' Leaving:'||l_proc, 10);
61: -- *** NEW_MESSAGE_REQUIRED ***
62: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
63: hr_utility.set_message_token('PROCEDURE', l_proc);
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
67: --
68: hr_utility.set_location(' Leaving:'||l_proc, 10);
69: End constraint_error;
64: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
65: hr_utility.raise_error;
66: End If;
67: --
68: hr_utility.set_location(' Leaving:'||l_proc, 10);
69: End constraint_error;
70: --
71: -- ----------------------------------------------------------------------------
72: -- |-----------------------------< api_updating >-----------------------------|
95: l_proc varchar2(72) := g_package||'api_updating';
96: l_fct_ret boolean;
97: --
98: Begin
99: hr_utility.set_location('Entering:'||l_proc, 5);
100: --
101: If (
102: p_exception_id is null and
103: p_object_version_number is null
111: If (
112: p_exception_id = g_old_rec.exception_id and
113: p_object_version_number = g_old_rec.object_version_number
114: ) Then
115: hr_utility.set_location(l_proc, 10);
116: --
117: -- The g_old_rec is current therefore we must
118: -- set the returning function to true
119: --
129: --
130: -- The primary key is invalid therefore we must error
131: --
132: -- *** NEW_MESSAGE_REQUIRED ***
133: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
134: hr_utility.raise_error;
135: End If;
136: Close C_Sel1;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
130: -- The primary key is invalid therefore we must error
131: --
132: -- *** NEW_MESSAGE_REQUIRED ***
133: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
134: hr_utility.raise_error;
135: End If;
136: Close C_Sel1;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
138: -- *** NEW_MESSAGE_REQUIRED ***
135: End If;
136: Close C_Sel1;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
138: -- *** NEW_MESSAGE_REQUIRED ***
139: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
140: hr_utility.raise_error;
141: End If;
142: hr_utility.set_location(l_proc, 15);
143: l_fct_ret := true;
136: Close C_Sel1;
137: If (p_object_version_number <> g_old_rec.object_version_number) Then
138: -- *** NEW_MESSAGE_REQUIRED ***
139: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
140: hr_utility.raise_error;
141: End If;
142: hr_utility.set_location(l_proc, 15);
143: l_fct_ret := true;
144: End If;
138: -- *** NEW_MESSAGE_REQUIRED ***
139: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
140: hr_utility.raise_error;
141: End If;
142: hr_utility.set_location(l_proc, 15);
143: l_fct_ret := true;
144: End If;
145: End If;
146: hr_utility.set_location(' Leaving:'||l_proc, 20);
142: hr_utility.set_location(l_proc, 15);
143: l_fct_ret := true;
144: End If;
145: End If;
146: hr_utility.set_location(' Leaving:'||l_proc, 20);
147: Return (l_fct_ret);
148: --
149: End api_updating;
150: --
173: --
174: l_proc varchar2(72) := g_package||'lck';
175: --
176: Begin
177: hr_utility.set_location('Entering:'||l_proc, 5);
178: --
179: -- Add any mandatory argument checking here:
180: -- Example:
181: -- hr_api.mandatory_arg_error
190: --
191: -- The primary key is invalid therefore we must error
192: --
193: -- *** NEW_MESSAGE_REQUIRED ***
194: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
195: hr_utility.raise_error;
196: End If;
197: Close C_Sel1;
198: If (p_object_version_number <> g_old_rec.object_version_number) Then
191: -- The primary key is invalid therefore we must error
192: --
193: -- *** NEW_MESSAGE_REQUIRED ***
194: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
195: hr_utility.raise_error;
196: End If;
197: Close C_Sel1;
198: If (p_object_version_number <> g_old_rec.object_version_number) Then
199: -- *** NEW_MESSAGE_REQUIRED ***
196: End If;
197: Close C_Sel1;
198: If (p_object_version_number <> g_old_rec.object_version_number) Then
199: -- *** NEW_MESSAGE_REQUIRED ***
200: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
201: hr_utility.raise_error;
202: End If;
203: --
204: hr_utility.set_location(' Leaving:'||l_proc, 10);
197: Close C_Sel1;
198: If (p_object_version_number <> g_old_rec.object_version_number) Then
199: -- *** NEW_MESSAGE_REQUIRED ***
200: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
201: hr_utility.raise_error;
202: End If;
203: --
204: hr_utility.set_location(' Leaving:'||l_proc, 10);
205: --
200: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
201: hr_utility.raise_error;
202: End If;
203: --
204: hr_utility.set_location(' Leaving:'||l_proc, 10);
205: --
206: -- We need to trap the ORA LOCK exception
207: --
208: Exception
211: -- The object is locked therefore we need to supply a meaningful
212: -- error message.
213: --
214: -- *** NEW_MESSAGE_REQUIRED ***
215: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
216: hr_utility.set_message_token('TABLE_NAME', 'hr_pattern_exceptions');
217: hr_utility.raise_error;
218: End lck;
219: --
212: -- error message.
213: --
214: -- *** NEW_MESSAGE_REQUIRED ***
215: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
216: hr_utility.set_message_token('TABLE_NAME', 'hr_pattern_exceptions');
217: hr_utility.raise_error;
218: End lck;
219: --
220: -- ----------------------------------------------------------------------------
213: --
214: -- *** NEW_MESSAGE_REQUIRED ***
215: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
216: hr_utility.set_message_token('TABLE_NAME', 'hr_pattern_exceptions');
217: hr_utility.raise_error;
218: End lck;
219: --
220: -- ----------------------------------------------------------------------------
221: -- |-----------------------------< convert_args >-----------------------------|
236: l_proc varchar2(72) := g_package||'convert_args';
237: --
238: Begin
239: --
240: hr_utility.set_location('Entering:'||l_proc, 5);
241: --
242: -- Convert arguments into local l_rec structure.
243: --
244: l_rec.exception_id := p_exception_id;
250: l_rec.object_version_number := p_object_version_number;
251: --
252: -- Return the plsql record structure.
253: --
254: hr_utility.set_location(' Leaving:'||l_proc, 10);
255: Return(l_rec);
256: --
257: End convert_args;
258: --