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 = 'FF_ARCHIVE_ITEM_CONTEXT_FK1') Then
37: -- Foreign Key to FF_ARCHIVE_ITEMS, ARCHIVE_ITEM_ID.
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 = 'FF_ARCHIVE_ITEM_CONTEXT_FK1') Then
37: -- Foreign Key to FF_ARCHIVE_ITEMS, ARCHIVE_ITEM_ID.
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: -- Raise error for invalid context_id
35: --
36: If (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK1') Then
37: -- Foreign Key to FF_ARCHIVE_ITEMS, ARCHIVE_ITEM_ID.
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: -- Raise error for invalid context_id
43: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK2') Then
36: If (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK1') Then
37: -- Foreign Key to FF_ARCHIVE_ITEMS, ARCHIVE_ITEM_ID.
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: -- Raise error for invalid context_id
43: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK2') Then
44: hr_utility.set_message(801, 'HR_6153_ALL_PROCEDURE_FAIL');
37: -- Foreign Key to FF_ARCHIVE_ITEMS, ARCHIVE_ITEM_ID.
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: -- Raise error for invalid context_id
43: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK2') Then
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: -- Raise error for invalid context_id
43: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK2') Then
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','7');
47: hr_utility.raise_error;
48: /*Raise Generic Primary Key Constraint violation, supplying con. name*/
41: hr_utility.raise_error;
42: -- Raise error for invalid context_id
43: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK2') Then
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','7');
47: hr_utility.raise_error;
48: /*Raise Generic Primary Key Constraint violation, supplying con. name*/
49: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_PK') Then
42: -- Raise error for invalid context_id
43: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK2') Then
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','7');
47: hr_utility.raise_error;
48: /*Raise Generic Primary Key Constraint violation, supplying con. name*/
49: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_PK') Then
50: hr_utility.set_message(800, 'HR_7220_INVALID_PRIMARY_KEY');
43: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_FK2') Then
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','7');
47: hr_utility.raise_error;
48: /*Raise Generic Primary Key Constraint violation, supplying con. name*/
49: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_PK') Then
50: hr_utility.set_message(800, 'HR_7220_INVALID_PRIMARY_KEY');
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
46: hr_utility.set_message_token('STEP','7');
47: hr_utility.raise_error;
48: /*Raise Generic Primary Key Constraint violation, supplying con. name*/
49: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_PK') Then
50: hr_utility.set_message(800, 'HR_7220_INVALID_PRIMARY_KEY');
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
47: hr_utility.raise_error;
48: /*Raise Generic Primary Key Constraint violation, supplying con. name*/
49: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_PK') Then
50: hr_utility.set_message(800, 'HR_7220_INVALID_PRIMARY_KEY');
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
48: /*Raise Generic Primary Key Constraint violation, supplying con. name*/
49: ElsIf (p_constraint_name = 'FF_ARCHIVE_ITEM_CONTEXT_PK') Then
50: hr_utility.set_message(800, 'HR_7220_INVALID_PRIMARY_KEY');
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
50: hr_utility.set_message(800, 'HR_7220_INVALID_PRIMARY_KEY');
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
51: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
59: --
52: hr_utility.raise_error;
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
59: --
60: hr_utility.set_location(' Leaving:'||l_proc, 10);
53: Else
54: hr_utility.set_message(801, 'HR_7877_API_INVALID_CONSTRAINT');
55: hr_utility.set_message_token('PROCEDURE', l_proc);
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
59: --
60: hr_utility.set_location(' Leaving:'||l_proc, 10);
61: End constraint_error;
56: hr_utility.set_message_token('CONSTRAINT_NAME', p_constraint_name);
57: hr_utility.raise_error;
58: End If;
59: --
60: hr_utility.set_location(' Leaving:'||l_proc, 10);
61: End constraint_error;
62: --
63: -- ----------------------------------------------------------------------------
64: -- |-----------------------------< api_updating >-----------------------------|
85: l_proc varchar2(72) := g_package||'api_updating';
86: l_fct_ret boolean;
87: --
88: Begin
89: hr_utility.set_location('Entering:'||l_proc, 5);
90: --
91: If (
92: p_archive_item_id is null and
93: p_context_id is null
101: If (
102: p_archive_item_id = g_old_rec.archive_item_id and
103: p_context_id = g_old_rec.context_id
104: ) Then
105: hr_utility.set_location(l_proc, 10);
106: --
107: -- The g_old_rec is current therefore we must
108: -- set the returning function to true
109: --
118: Close C_Sel1;
119: --
120: -- The primary key is invalid therefore we must error
121: --
122: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
123: hr_utility.raise_error;
124: End If;
125: Close C_Sel1;
126: --
119: --
120: -- The primary key is invalid therefore we must error
121: --
122: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
123: hr_utility.raise_error;
124: End If;
125: Close C_Sel1;
126: --
127: hr_utility.set_location(l_proc, 15);
123: hr_utility.raise_error;
124: End If;
125: Close C_Sel1;
126: --
127: hr_utility.set_location(l_proc, 15);
128: l_fct_ret := true;
129: End If;
130: End If;
131: hr_utility.set_location(' Leaving:'||l_proc, 20);
127: hr_utility.set_location(l_proc, 15);
128: l_fct_ret := true;
129: End If;
130: End If;
131: hr_utility.set_location(' Leaving:'||l_proc, 20);
132: Return (l_fct_ret);
133: --
134: End api_updating;
135: --
156: --
157: l_proc varchar2(72) := g_package||'lck';
158: --
159: Begin
160: hr_utility.set_location('Entering:'||l_proc, 5);
161: --
162: -- Add any mandatory argument checking here:
163: -- Example:
164: -- 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(801, 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: --
173: --
174: -- The primary key is invalid therefore we must error
175: --
176: hr_utility.set_message(801, 'HR_7220_INVALID_PRIMARY_KEY');
177: hr_utility.raise_error;
178: End If;
179: Close C_Sel1;
180: --
181: --
178: End If;
179: Close C_Sel1;
180: --
181: --
182: hr_utility.set_location(' Leaving:'||l_proc, 10);
183: --
184: -- We need to trap the ORA LOCK exception
185: --
186: Exception
188: --
189: -- The object is locked therefore we need to supply a meaningful
190: -- error message.
191: --
192: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
193: hr_utility.set_message_token('TABLE_NAME', 'ff_archive_item_contexts');
194: hr_utility.raise_error;
195: End lck;
196: --
189: -- The object is locked therefore we need to supply a meaningful
190: -- error message.
191: --
192: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
193: hr_utility.set_message_token('TABLE_NAME', 'ff_archive_item_contexts');
194: hr_utility.raise_error;
195: End lck;
196: --
197: -- ----------------------------------------------------------------------------
190: -- error message.
191: --
192: hr_utility.set_message(801, 'HR_7165_OBJECT_LOCKED');
193: hr_utility.set_message_token('TABLE_NAME', 'ff_archive_item_contexts');
194: hr_utility.raise_error;
195: End lck;
196: --
197: -- ----------------------------------------------------------------------------
198: -- |-----------------------------< convert_args >-----------------------------|
210: l_proc varchar2(72) := g_package||'convert_args';
211: --
212: Begin
213: --
214: hr_utility.set_location('Entering:'||l_proc, 5);
215: --
216: -- Convert arguments into local l_rec structure.
217: --
218: l_rec.archive_item_id := p_archive_item_id;
221: l_rec.context_id := p_context_id;
222: --
223: -- Return the plsql record structure.
224: --
225: hr_utility.set_location(' Leaving:'||l_proc, 10);
226: Return(l_rec);
227: --
228: End convert_args;
229: --