16: --
17: l_proc varchar2(72) := g_package||'constraint_error';
18: --
19: Begin
20: hr_utility.set_location('Entering:'||l_proc, 5);
21: --
22: If (p_constraint_name = 'HR_QUESTIONNAIRES_FK') Then
23: fnd_message.set_name('PER','PER_52409_QSN_INVAL_BUS_GRP_ID');
24: fnd_message.raise_error;
34: ElsIf (p_constraint_name = 'HR_QUEST_AVAILABLE_FLAG_CHK') Then
35: fnd_message.set_name('PER', 'PER_52411_QSN_AVAIL_FLAG_INVAL');
36: fnd_message.raise_error;
37: Else
38: hr_utility.set_message('PER', 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
35: fnd_message.set_name('PER', 'PER_52411_QSN_AVAIL_FLAG_INVAL');
36: fnd_message.raise_error;
37: Else
38: hr_utility.set_message('PER', 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
43: --
36: fnd_message.raise_error;
37: Else
38: hr_utility.set_message('PER', 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
43: --
44: hr_utility.set_location(' Leaving:'||l_proc, 10);
37: Else
38: hr_utility.set_message('PER', 'HR_7877_API_INVALID_CONSTRAINT');
39: hr_utility.set_message_token('PROCEDURE', l_proc);
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
43: --
44: hr_utility.set_location(' Leaving:'||l_proc, 10);
45: End constraint_error;
40: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
41: hr_utility.raise_error;
42: End If;
43: --
44: hr_utility.set_location(' Leaving:'||l_proc, 10);
45: End constraint_error;
46: --
47: -- ----------------------------------------------------------------------------
48: -- |-----------------------------< api_updating >-----------------------------|
71: l_proc varchar2(72) := g_package||'api_updating';
72: l_fct_ret boolean;
73: --
74: Begin
75: hr_utility.set_location('Entering:'||l_proc, 5);
76: --
77: If (
78: p_questionnaire_template_id is null and
79: p_object_version_number is null
87: If (
88: p_questionnaire_template_id = g_old_rec.questionnaire_template_id and
89: p_object_version_number = g_old_rec.object_version_number
90: ) Then
91: hr_utility.set_location(l_proc, 10);
92: --
93: -- The g_old_rec is current therefore we must
94: -- set the returning function to true
95: --
104: Close C_Sel1;
105: --
106: -- The primary key is invalid therefore we must error
107: --
108: hr_utility.set_message('PER', 'HR_7220_INVALID_PRIMARY_KEY');
109: hr_utility.raise_error;
110: End If;
111: Close C_Sel1;
112: If (p_object_version_number <> g_old_rec.object_version_number) Then
105: --
106: -- The primary key is invalid therefore we must error
107: --
108: hr_utility.set_message('PER', 'HR_7220_INVALID_PRIMARY_KEY');
109: hr_utility.raise_error;
110: End If;
111: Close C_Sel1;
112: If (p_object_version_number <> g_old_rec.object_version_number) Then
113: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
109: hr_utility.raise_error;
110: End If;
111: Close C_Sel1;
112: If (p_object_version_number <> g_old_rec.object_version_number) Then
113: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
114: hr_utility.raise_error;
115: End If;
116: hr_utility.set_location(l_proc, 15);
117: l_fct_ret := true;
110: End If;
111: Close C_Sel1;
112: If (p_object_version_number <> g_old_rec.object_version_number) Then
113: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
114: hr_utility.raise_error;
115: End If;
116: hr_utility.set_location(l_proc, 15);
117: l_fct_ret := true;
118: End If;
112: If (p_object_version_number <> g_old_rec.object_version_number) Then
113: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
114: hr_utility.raise_error;
115: End If;
116: hr_utility.set_location(l_proc, 15);
117: l_fct_ret := true;
118: End If;
119: End If;
120: hr_utility.set_location(' Leaving:'||l_proc, 20);
116: hr_utility.set_location(l_proc, 15);
117: l_fct_ret := true;
118: End If;
119: End If;
120: hr_utility.set_location(' Leaving:'||l_proc, 20);
121: Return (l_fct_ret);
122: --
123: End api_updating;
124: --
147: --
148: l_proc varchar2(72) := g_package||'lck';
149: --
150: Begin
151: hr_utility.set_location('Entering:'||l_proc, 5);
152: --
153: -- Add any mandatory argument checking here:
154: -- Example:
155: -- hr_api.mandatory_arg_error
174: Close C_Sel1;
175: --
176: -- The primary key is invalid therefore we must error
177: --
178: hr_utility.set_message('PER', 'HR_7220_INVALID_PRIMARY_KEY');
179: hr_utility.raise_error;
180: End If;
181: Close C_Sel1;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
175: --
176: -- The primary key is invalid therefore we must error
177: --
178: hr_utility.set_message('PER', 'HR_7220_INVALID_PRIMARY_KEY');
179: hr_utility.raise_error;
180: End If;
181: Close C_Sel1;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
183: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
179: hr_utility.raise_error;
180: End If;
181: Close C_Sel1;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
183: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
184: hr_utility.raise_error;
185: End If;
186: --
187: hr_utility.set_location(' Leaving:'||l_proc, 10);
180: End If;
181: Close C_Sel1;
182: If (p_object_version_number <> g_old_rec.object_version_number) Then
183: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
184: hr_utility.raise_error;
185: End If;
186: --
187: hr_utility.set_location(' Leaving:'||l_proc, 10);
188: --
183: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
184: hr_utility.raise_error;
185: End If;
186: --
187: hr_utility.set_location(' Leaving:'||l_proc, 10);
188: --
189: -- We need to trap the ORA LOCK exception
190: --
191: Exception
193: --
194: -- The object is locked therefore we need to supply a meaningful
195: -- error message.
196: --
197: hr_utility.set_message('PER', 'HR_7165_OBJECT_LOCKED');
198: hr_utility.set_message_token('TABLE_NAME', 'hr_questionnaires');
199: hr_utility.raise_error;
200: End lck;
201: --
194: -- The object is locked therefore we need to supply a meaningful
195: -- error message.
196: --
197: hr_utility.set_message('PER', 'HR_7165_OBJECT_LOCKED');
198: hr_utility.set_message_token('TABLE_NAME', 'hr_questionnaires');
199: hr_utility.raise_error;
200: End lck;
201: --
202: -- ----------------------------------------------------------------------------
195: -- error message.
196: --
197: hr_utility.set_message('PER', 'HR_7165_OBJECT_LOCKED');
198: hr_utility.set_message_token('TABLE_NAME', 'hr_questionnaires');
199: hr_utility.raise_error;
200: End lck;
201: --
202: -- ----------------------------------------------------------------------------
203: -- |-----------------------------< convert_args >-----------------------------|
218: l_proc varchar2(72) := g_package||'convert_args';
219: --
220: Begin
221: --
222: hr_utility.set_location('Entering:'||l_proc, 5);
223: --
224: -- Convert arguments into local l_rec structure.
225: --
226: l_rec.questionnaire_template_id := p_questionnaire_template_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: --