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 >-----------------------------|
70: l_proc varchar2(72) := g_package||'api_updating';
71: l_fct_ret boolean;
72: --
73: Begin
74: hr_utility.set_location('Entering:'||l_proc, 5);
75: --
76: If (
77: p_questionnaire_template_id is null and
78: p_object_version_number is null
86: If (
87: p_questionnaire_template_id = g_old_rec.questionnaire_template_id and
88: p_object_version_number = g_old_rec.object_version_number
89: ) Then
90: hr_utility.set_location(l_proc, 10);
91: --
92: -- The g_old_rec is current therefore we must
93: -- set the returning function to true
94: --
103: Close C_Sel1;
104: --
105: -- The primary key is invalid therefore we must error
106: --
107: hr_utility.set_message('PER', 'HR_7220_INVALID_PRIMARY_KEY');
108: hr_utility.raise_error;
109: End If;
110: Close C_Sel1;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
104: --
105: -- The primary key is invalid therefore we must error
106: --
107: hr_utility.set_message('PER', 'HR_7220_INVALID_PRIMARY_KEY');
108: hr_utility.raise_error;
109: End If;
110: Close C_Sel1;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
112: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
108: hr_utility.raise_error;
109: End If;
110: Close C_Sel1;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
112: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: hr_utility.set_location(l_proc, 15);
116: l_fct_ret := true;
109: End If;
110: Close C_Sel1;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
112: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: hr_utility.set_location(l_proc, 15);
116: l_fct_ret := true;
117: End If;
111: If (p_object_version_number <> g_old_rec.object_version_number) Then
112: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
113: hr_utility.raise_error;
114: End If;
115: hr_utility.set_location(l_proc, 15);
116: l_fct_ret := true;
117: End If;
118: End If;
119: hr_utility.set_location(' Leaving:'||l_proc, 20);
115: hr_utility.set_location(l_proc, 15);
116: l_fct_ret := true;
117: End If;
118: End If;
119: hr_utility.set_location(' Leaving:'||l_proc, 20);
120: Return (l_fct_ret);
121: --
122: End api_updating;
123: --
145: --
146: l_proc varchar2(72) := g_package||'lck';
147: --
148: Begin
149: hr_utility.set_location('Entering:'||l_proc, 5);
150: --
151: -- Add any mandatory argument checking here:
152: -- Example:
153: -- hr_api.mandatory_arg_error
172: Close C_Sel1;
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message('PER', 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message('PER', 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
178: End If;
179: Close C_Sel1;
180: If (p_object_version_number <> g_old_rec.object_version_number) Then
181: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
186: --
181: hr_utility.set_message('PER', 'HR_7155_OBJECT_INVALID');
182: hr_utility.raise_error;
183: End If;
184: --
185: hr_utility.set_location(' Leaving:'||l_proc, 10);
186: --
187: -- We need to trap the ORA LOCK exception
188: --
189: Exception
191: --
192: -- The object is locked therefore we need to supply a meaningful
193: -- error message.
194: --
195: hr_utility.set_message('PER', 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'hr_questionnaires');
197: hr_utility.raise_error;
198: End lck;
199: --
192: -- The object is locked therefore we need to supply a meaningful
193: -- error message.
194: --
195: hr_utility.set_message('PER', 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'hr_questionnaires');
197: hr_utility.raise_error;
198: End lck;
199: --
200: -- ----------------------------------------------------------------------------
193: -- error message.
194: --
195: hr_utility.set_message('PER', 'HR_7165_OBJECT_LOCKED');
196: hr_utility.set_message_token('TABLE_NAME', 'hr_questionnaires');
197: hr_utility.raise_error;
198: End lck;
199: --
200: -- ----------------------------------------------------------------------------
201: -- |-----------------------------< 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.questionnaire_template_id := p_questionnaire_template_id;
228: l_rec.object_version_number := p_object_version_number;
229: --
230: -- Return the plsql record structure.
231: --
232: hr_utility.set_location(' Leaving:'||l_proc, 10);
233: Return(l_rec);
234: --
235: End convert_args;
236: --