15: --
16: l_proc varchar2(72) := g_package||'constraint_error';
17: --
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_FK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
18: Begin
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_FK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_PK') Then
19: hr_utility.set_location('Entering:'||l_proc, 5);
20: --
21: If (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_FK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
20: --
21: If (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_FK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
21: If (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_FK') Then
22: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
23: hr_utility.set_message_token('PROCEDURE', l_proc);
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_UK') Then
24: hr_utility.set_message_token('STEP','5');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_UK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
25: hr_utility.raise_error;
26: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_UK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
26: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_PK') Then
27: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_UK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
28: hr_utility.set_message_token('PROCEDURE', l_proc);
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_UK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
29: hr_utility.set_message_token('STEP','10');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_UK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
30: hr_utility.raise_error;
31: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_UK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
31: ElsIf (p_constraint_name = 'PER_SEC_PROFILE_ASSIGNMENTS_UK') Then
32: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
33: hr_utility.set_message_token('PROCEDURE', l_proc);
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
34: hr_utility.set_message_token('STEP','15');
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
42: --
35: hr_utility.raise_error;
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
42: --
43: hr_utility.set_location(' Leaving:'||l_proc, 10);
36: Else
37: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
38: hr_utility.set_message_token('PROCEDURE', l_proc);
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
42: --
43: hr_utility.set_location(' Leaving:'||l_proc, 10);
44: End constraint_error;
39: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
40: hr_utility.raise_error;
41: End If;
42: --
43: hr_utility.set_location(' Leaving:'||l_proc, 10);
44: End constraint_error;
45: --
46: -- ----------------------------------------------------------------------------
47: -- |-----------------------------< api_updating >-----------------------------|
73: l_proc varchar2(72) := g_package||'api_updating';
74: l_fct_ret boolean;
75: --
76: Begin
77: hr_utility.set_location('Entering:'||l_proc, 5);
78: --
79: If (
80: p_sec_profile_assignment_id is null and
81: p_object_version_number is null
89: If (
90: p_sec_profile_assignment_id = g_old_rec.sec_profile_assignment_id and
91: p_object_version_number = g_old_rec.object_version_number
92: ) Then
93: hr_utility.set_location(l_proc, 10);
94: --
95: -- The g_old_rec is current therefore we must
96: -- set the returning function to true
97: --
106: Close C_Sel1;
107: --
108: -- The primary key is invalid therefore we must error
109: --
110: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
111: hr_utility.raise_error;
112: End If;
113: Close C_Sel1;
114: If (p_object_version_number <> g_old_rec.object_version_number) Then
107: --
108: -- The primary key is invalid therefore we must error
109: --
110: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
111: hr_utility.raise_error;
112: End If;
113: Close C_Sel1;
114: If (p_object_version_number <> g_old_rec.object_version_number) Then
115: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
111: hr_utility.raise_error;
112: End If;
113: Close C_Sel1;
114: If (p_object_version_number <> g_old_rec.object_version_number) Then
115: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
116: hr_utility.raise_error;
117: End If;
118: hr_utility.set_location(l_proc, 15);
119: l_fct_ret := true;
112: End If;
113: Close C_Sel1;
114: If (p_object_version_number <> g_old_rec.object_version_number) Then
115: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
116: hr_utility.raise_error;
117: End If;
118: hr_utility.set_location(l_proc, 15);
119: l_fct_ret := true;
120: End If;
114: If (p_object_version_number <> g_old_rec.object_version_number) Then
115: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
116: hr_utility.raise_error;
117: End If;
118: hr_utility.set_location(l_proc, 15);
119: l_fct_ret := true;
120: End If;
121: End If;
122: hr_utility.set_location(' Leaving:'||l_proc, 20);
118: hr_utility.set_location(l_proc, 15);
119: l_fct_ret := true;
120: End If;
121: End If;
122: hr_utility.set_location(' Leaving:'||l_proc, 20);
123: Return (l_fct_ret);
124: --
125: End api_updating;
126: --
152: --
153: l_proc varchar2(72) := g_package||'lck';
154: --
155: Begin
156: hr_utility.set_location('Entering:'||l_proc, 5);
157: --
158: -- Add any mandatory argument checking here:
159: -- Example:
160: -- hr_api.mandatory_arg_error
168: Close C_Sel1;
169: --
170: -- The primary key is invalid therefore we must error
171: --
172: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
173: hr_utility.raise_error;
174: End If;
175: Close C_Sel1;
176: If (p_object_version_number <> g_old_rec.object_version_number) Then
169: --
170: -- The primary key is invalid therefore we must error
171: --
172: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
173: hr_utility.raise_error;
174: End If;
175: Close C_Sel1;
176: If (p_object_version_number <> g_old_rec.object_version_number) Then
177: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
173: hr_utility.raise_error;
174: End If;
175: Close C_Sel1;
176: If (p_object_version_number <> g_old_rec.object_version_number) Then
177: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
178: hr_utility.raise_error;
179: End If;
180: --
181: hr_utility.set_location(' Leaving:'||l_proc, 10);
174: End If;
175: Close C_Sel1;
176: If (p_object_version_number <> g_old_rec.object_version_number) Then
177: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
178: hr_utility.raise_error;
179: End If;
180: --
181: hr_utility.set_location(' Leaving:'||l_proc, 10);
182: --
177: hr_utility.set_message(801, 'HR_7155_OBJECT_INVALID');
178: hr_utility.raise_error;
179: End If;
180: --
181: hr_utility.set_location(' Leaving:'||l_proc, 10);
182: --
183: -- We need to trap the ORA LOCK exception
184: --
185: Exception
187: --
188: -- The object is locked therefore we need to supply a meaningful
189: -- error message.
190: --
191: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
192: hr_utility.set_message_token('TABLE_NAME', 'per_sec_profile_assignments');
193: hr_utility.raise_error;
194: End lck;
195: --
188: -- The object is locked therefore we need to supply a meaningful
189: -- error message.
190: --
191: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
192: hr_utility.set_message_token('TABLE_NAME', 'per_sec_profile_assignments');
193: hr_utility.raise_error;
194: End lck;
195: --
196: -- ----------------------------------------------------------------------------
189: -- error message.
190: --
191: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
192: hr_utility.set_message_token('TABLE_NAME', 'per_sec_profile_assignments');
193: hr_utility.raise_error;
194: End lck;
195: --
196: -- ----------------------------------------------------------------------------
197: -- |-----------------------------< convert_args >-----------------------------|
215: l_proc varchar2(72) := g_package||'convert_args';
216: --
217: Begin
218: --
219: hr_utility.set_location('Entering:'||l_proc, 5);
220: --
221: -- Convert arguments into local l_rec structure.
222: --
223: l_rec.sec_profile_assignment_id := p_sec_profile_assignment_id;
232: l_rec.object_version_number := p_object_version_number;
233: --
234: -- Return the plsql record structure.
235: --
236: hr_utility.set_location(' Leaving:'||l_proc, 10);
237: Return(l_rec);
238: --
239: End convert_args;
240: --