1 PACKAGE BODY igs_en_dl_offset_cons_pkg AS
2 /* $Header: IGSEI45B.pls 120.0 2005/06/01 23:46:34 appldev noship $ */
3
4 l_rowid VARCHAR2(25);
5 old_references igs_en_dl_offset_cons%ROWTYPE;
6 new_references igs_en_dl_offset_cons%ROWTYPE;
7
8 PROCEDURE set_column_values (
9 p_action IN VARCHAR2,
10 x_rowid IN VARCHAR2 DEFAULT NULL,
11 x_enr_dl_offset_cons_id IN NUMBER DEFAULT NULL,
12 x_offset_cons_type_cd IN VARCHAR2 DEFAULT NULL,
13 x_constraint_condition IN VARCHAR2 DEFAULT NULL,
14 x_constraint_resolution IN NUMBER DEFAULT NULL,
15 x_non_std_usec_dls_id IN NUMBER DEFAULT NULL,
16 x_deadline_type IN VARCHAR2 DEFAULT NULL,
17 x_creation_date IN DATE DEFAULT NULL,
18 x_created_by IN NUMBER DEFAULT NULL,
19 x_last_update_date IN DATE DEFAULT NULL,
20 x_last_updated_by IN NUMBER DEFAULT NULL,
21 x_last_update_login IN NUMBER DEFAULT NULL
22 ) AS
23 /*
24 || Created By : [email protected]
25 || Created On : 30-MAR-2001
26 || Purpose : Initialises the Old and New references for the columns of the table.
27 || Known limitations, enhancements or remarks :
28 || Change History :
29 || Who When What
30 || (reverse chronological order - newest change first)
31 */
32
33 CURSOR cur_old_ref_values IS
34 SELECT *
35 FROM IGS_EN_DL_OFFSET_CONS
36 WHERE rowid = x_rowid;
37
38 BEGIN
39
40 l_rowid := x_rowid;
41
42 -- Code for setting the Old and New Reference Values.
43 -- Populate Old Values.
44 OPEN cur_old_ref_values;
45 FETCH cur_old_ref_values INTO old_references;
46 IF ((cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT'))) THEN
47 CLOSE cur_old_ref_values;
48 fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
49 igs_ge_msg_stack.add;
50 app_exception.raise_exception;
51 RETURN;
52 END IF;
53 CLOSE cur_old_ref_values;
54
55 -- Populate New Values.
56 new_references.enr_dl_offset_cons_id := x_enr_dl_offset_cons_id;
57 new_references.offset_cons_type_cd := x_offset_cons_type_cd;
58 new_references.constraint_condition := x_constraint_condition;
59 new_references.constraint_resolution := x_constraint_resolution;
60 new_references.non_std_usec_dls_id := x_non_std_usec_dls_id;
61 new_references.deadline_type := x_deadline_type;
62
63 IF (p_action = 'UPDATE') THEN
64 new_references.creation_date := old_references.creation_date;
65 new_references.created_by := old_references.created_by;
66 ELSE
67 new_references.creation_date := x_creation_date;
68 new_references.created_by := x_created_by;
69 END IF;
70
71 new_references.last_update_date := x_last_update_date;
72 new_references.last_updated_by := x_last_updated_by;
73 new_references.last_update_login := x_last_update_login;
74
75 END set_column_values;
76
77
78 PROCEDURE check_uniqueness AS
79 /*
80 || Created By : [email protected]
81 || Created On : 30-MAR-2001
82 || Purpose : Handles the Unique Constraint logic defined for the columns.
83 || Known limitations, enhancements or remarks :
84 || Change History :
85 || Who When What
86 || (reverse chronological order - newest change first)
87 */
88 BEGIN
89
90 IF ( get_uk_for_validation (
91 new_references.offset_cons_type_cd,
92 new_references.non_std_usec_dls_id,
93 new_references.deadline_type
94 )
95 ) THEN
96 fnd_message.set_name ('IGS', 'IGS_GE_RECORD_ALREADY_EXISTS');
97 igs_ge_msg_stack.add;
98 app_exception.raise_exception;
99 END IF;
100
101 END check_uniqueness;
102
103
104 PROCEDURE check_constraints(
105 Column_Name IN VARCHAR2 DEFAULT NULL,
106 Column_Value IN VARCHAR2 DEFAULT NULL) IS
107 l_c_col_name VARCHAR2(30);
108 BEGIN
109 l_c_col_name := UPPER(Column_Name);
110 IF l_c_col_name IS NULL THEN
111 NULL;
112 ELSIF l_c_col_name ='DEADLINE_TYPE' THEN
113 new_references.deadline_type := Column_Value;
114 ELSIF l_c_col_name ='CONSTRAINT_RESOLUTION' THEN
115 new_references.constraint_resolution := Column_Value;
116 END IF;
117
118 IF l_c_col_name = 'DEADLINE_TYPE' OR Column_Name IS NULL THEN
119
120 IF new_references.deadline_type NOT IN ( 'E' , 'R' ) THEN
121 fnd_message.set_name('IGS', 'IGS_GE_INVALID_VALUE');
122 IGS_GE_MSG_STACK.ADD;
123 app_exception.raise_exception;
124 END IF;
125
126 END IF;
127
128 IF l_c_col_name='CONSTRAINT_RESOLUTION' OR Column_Name IS NULL THEN
129 IF new_references.constraint_resolution < -7 OR
130 new_references.constraint_resolution > 7 OR
131 new_references.constraint_resolution = 0 THEN
132 fnd_message.set_name('IGS', 'IGS_GE_INVALID_VALUE');
133 IGS_GE_MSG_STACK.ADD;
134 app_exception.raise_exception;
135 END IF;
136 END IF;
137
138 END check_constraints;
139
140
141 PROCEDURE check_parent_existance AS
142 /*
143 || Created By : [email protected]
144 || Created On : 30-MAR-2001
145 || Purpose : Checks for the existance of Parent records.
146 || Known limitations, enhancements or remarks :
147 || Change History :
148 || Who When What
149 || (reverse chronological order - newest change first)
150 */
151 BEGIN
152
153 IF (((old_references.non_std_usec_dls_id = new_references.non_std_usec_dls_id)) OR
154 ((new_references.non_std_usec_dls_id IS NULL))) THEN
155 NULL;
156 ELSIF (new_references.deadline_type='E' AND (NOT igs_en_nsu_dlstp_pkg.get_pk_for_validation (
157 new_references.non_std_usec_dls_id
158 ))) THEN
159 fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
160 igs_ge_msg_stack.add;
161 app_exception.raise_exception;
162 ELSIF (new_references.deadline_type='R' AND (NOT igs_ps_nsus_rtn_pkg.get_pk_for_validation (
163 new_references.non_std_usec_dls_id
164 ))) THEN
165 fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
166 igs_ge_msg_stack.add;
167 app_exception.raise_exception;
168 END IF;
169 END check_parent_existance;
170
171
172 FUNCTION get_pk_for_validation (
173 x_enr_dl_offset_cons_id IN NUMBER
174 ) RETURN BOOLEAN AS
175 /*
176 || Created By : [email protected]
177 || Created On : 30-MAR-2001
178 || Purpose : Validates the Primary Key of the table.
179 || Known limitations, enhancements or remarks :
180 || Change History :
181 || Who When What
182 || (reverse chronological order - newest change first)
183 */
184 CURSOR cur_rowid IS
185 SELECT rowid
186 FROM igs_en_dl_offset_cons
187 WHERE enr_dl_offset_cons_id = x_enr_dl_offset_cons_id
188 FOR UPDATE NOWAIT;
189
190 lv_rowid cur_rowid%RowType;
191
192 BEGIN
193
194 OPEN cur_rowid;
195 FETCH cur_rowid INTO lv_rowid;
196 IF (cur_rowid%FOUND) THEN
197 CLOSE cur_rowid;
198 RETURN(TRUE);
199 ELSE
200 CLOSE cur_rowid;
201 RETURN(FALSE);
202 END IF;
203
204 END get_pk_for_validation;
205
206
207 FUNCTION get_uk_for_validation (
208 x_offset_cons_type_cd IN VARCHAR2,
209 x_non_std_usec_dls_id IN NUMBER,
210 x_deadline_type IN VARCHAR2
211 ) RETURN BOOLEAN AS
212 /*
213 || Created By : [email protected]
214 || Created On : 30-MAR-2001
215 || Purpose : Validates the Unique Keys of the table.
216 || Known limitations, enhancements or remarks :
217 || Change History :
218 || Who When What
219 || (reverse chronological order - newest change first)
220 */
221 CURSOR cur_rowid IS
222 SELECT rowid
223 FROM igs_en_dl_offset_cons
224 WHERE offset_cons_type_cd = x_offset_cons_type_cd
225 AND non_std_usec_dls_id = x_non_std_usec_dls_id
226 AND deadline_type = x_deadline_type
227 AND ((l_rowid IS NULL) OR (rowid <> l_rowid));
228
229 lv_rowid cur_rowid%RowType;
230
231 BEGIN
232
233 OPEN cur_rowid;
234 FETCH cur_rowid INTO lv_rowid;
235 IF (cur_rowid%FOUND) THEN
236 CLOSE cur_rowid;
237 RETURN (true);
238 ELSE
239 CLOSE cur_rowid;
240 RETURN(FALSE);
241 END IF;
242
243 END get_uk_for_validation ;
244
245
246 PROCEDURE get_fk_igs_en_nsu_dlstp_all (
247 x_non_std_usec_dls_id IN NUMBER
248 ) AS
249 /*
250 || Created By : [email protected]
251 || Created On : 30-MAR-2001
252 || Purpose : Validates the Foreign Keys for the table.
253 || Known limitations, enhancements or remarks :
254 || Change History :
255 || Who When What
256 || (reverse chronological order - newest change first)
257 */
258 CURSOR cur_rowid IS
259 SELECT rowid
260 FROM igs_en_dl_offset_cons
261 WHERE non_std_usec_dls_id = x_non_std_usec_dls_id
262 AND deadline_type = 'E' ;
263
264 lv_rowid cur_rowid%RowType;
265
266 BEGIN
267
268 OPEN cur_rowid;
269 FETCH cur_rowid INTO lv_rowid;
270 IF (cur_rowid%FOUND) THEN
271 CLOSE cur_rowid;
272 fnd_message.set_name ('IGS', 'IGS_EN_DOSC_NSUD_FK');
273 igs_ge_msg_stack.add;
274 app_exception.raise_exception;
275 RETURN;
276 END IF;
277 CLOSE cur_rowid;
278
279 END get_fk_igs_en_nsu_dlstp_all;
280
281 PROCEDURE get_fk_igs_ps_nsus_rtn (
282 x_non_std_usec_dls_id IN NUMBER
283 ) AS
284 /*
285 || Created By : [email protected]
286 || Created On : 30-MAR-2001
287 || Purpose : Validates the Foreign Keys for the table.
288 || Known limitations, enhancements or remarks :
289 || Change History :
290 || Who When What
291 || (reverse chronological order - newest change first)
292 */
293 CURSOR cur_rowid IS
294 SELECT rowid
295 FROM igs_en_dl_offset_cons
296 WHERE non_std_usec_dls_id = x_non_std_usec_dls_id
297 AND DEADLINE_TYPE = 'R';
298
299 lv_rowid cur_rowid%RowType;
300 BEGIN
301
302 OPEN cur_rowid;
303 FETCH cur_rowid INTO lv_rowid;
304 IF (cur_rowid%FOUND) THEN
305 CLOSE cur_rowid;
306 fnd_message.set_name ('IGS', 'IGS_EN_DOSC_NR_FK');
307 igs_ge_msg_stack.add;
308 app_exception.raise_exception;
309 RETURN;
310 END IF;
311 CLOSE cur_rowid;
312
313 END get_fk_igs_ps_nsus_rtn;
314
315 PROCEDURE before_dml (
316 p_action IN VARCHAR2,
317 x_rowid IN VARCHAR2 DEFAULT NULL,
318 x_enr_dl_offset_cons_id IN NUMBER DEFAULT NULL,
319 x_offset_cons_type_cd IN VARCHAR2 DEFAULT NULL,
320 x_constraint_condition IN VARCHAR2 DEFAULT NULL,
321 x_constraint_resolution IN NUMBER DEFAULT NULL,
322 x_non_std_usec_dls_id IN NUMBER DEFAULT NULL,
323 x_deadline_type IN VARCHAR2 DEFAULT NULL,
324 x_creation_date IN DATE DEFAULT NULL,
325 x_created_by IN NUMBER DEFAULT NULL,
326 x_last_update_date IN DATE DEFAULT NULL,
327 x_last_updated_by IN NUMBER DEFAULT NULL,
328 x_last_update_login IN NUMBER DEFAULT NULL
329 ) AS
330 /*
331 || Created By : [email protected]
332 || Created On : 30-MAR-2001
333 || Purpose : Initialises the columns, Checks Constraints, Calls the
334 || Trigger Handlers for the table, before any DML operation.
335 || Known limitations, enhancements or remarks :
336 || Change History :
337 || Who When What
338 || (reverse chronological order - newest change first)
339 */
340 BEGIN
341
342 set_column_values (
343 p_action,
344 x_rowid,
345 x_enr_dl_offset_cons_id,
346 x_offset_cons_type_cd,
347 x_constraint_condition,
348 x_constraint_resolution,
349 x_non_std_usec_dls_id,
350 x_deadline_type,
351 x_creation_date,
352 x_created_by,
353 x_last_update_date,
354 x_last_updated_by,
355 x_last_update_login
356 );
357
358 IF (p_action = 'INSERT') THEN
359 -- Call all the procedures related to Before Insert.
360 IF ( get_pk_for_validation(
361 new_references.enr_dl_offset_cons_id
362 )
363 ) THEN
364 fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
365 igs_ge_msg_stack.add;
366 app_exception.raise_exception;
367 END IF;
368 check_uniqueness;
369 check_constraints;
370 check_parent_existance;
371 ELSIF (p_action = 'UPDATE') THEN
372 -- Call all the procedures related to Before Update.
373 check_uniqueness;
374 check_constraints;
375 check_parent_existance;
376 ELSIF (p_action = 'VALIDATE_INSERT') THEN
377 -- Call all the procedures related to Before Insert.
378 IF ( get_pk_for_validation (
379 new_references.enr_dl_offset_cons_id
380 )
381 ) THEN
382 fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
383 igs_ge_msg_stack.add;
384 app_exception.raise_exception;
388 ELSIF (p_action = 'VALIDATE_UPDATE') THEN
385 END IF;
386 check_uniqueness;
387 check_constraints;
389 check_uniqueness;
390 check_constraints;
391 END IF;
392
393 END before_dml;
394
395
396 PROCEDURE insert_row (
397 x_rowid IN OUT NOCOPY VARCHAR2,
398 x_enr_dl_offset_cons_id IN OUT NOCOPY NUMBER,
399 x_offset_cons_type_cd IN VARCHAR2,
400 x_constraint_condition IN VARCHAR2,
401 x_constraint_resolution IN NUMBER,
402 x_non_std_usec_dls_id IN NUMBER,
403 x_deadline_type IN VARCHAR2,
404 x_mode IN VARCHAR2 DEFAULT 'R'
405 ) AS
406 /*
407 || Created By : [email protected]
408 || Created On : 30-MAR-2001
409 || Purpose : Handles the INSERT DML logic for the table.
410 || Known limitations, enhancements or remarks :
411 || Change History :
412 || Who When What
413 || (reverse chronological order - newest change first)
414 */
415 CURSOR c IS
416 SELECT rowid
417 FROM igs_en_dl_offset_cons
418 WHERE enr_dl_offset_cons_id = x_enr_dl_offset_cons_id;
419
420 x_last_update_date DATE;
421 x_last_updated_by NUMBER;
422 x_last_update_login NUMBER;
423
424 BEGIN
425
426 x_last_update_date := SYSDATE;
427 IF (x_mode = 'I') THEN
428 x_last_updated_by := 1;
429 x_last_update_login := 0;
430 ELSIF (x_mode = 'R') THEN
431 x_last_updated_by := fnd_global.user_id;
432 IF (x_last_updated_by IS NULL) THEN
433 x_last_updated_by := -1;
434 END IF;
435 x_last_update_login := fnd_global.login_id;
436 IF (x_last_update_login IS NULL) THEN
437 x_last_update_login := -1;
438 END IF;
439 ELSE
440 fnd_message.set_name ('FND', 'SYSTEM-INVALID ARGS');
441 igs_ge_msg_stack.add;
442 app_exception.raise_exception;
443 END IF;
444
445 SELECT igs_en_dl_offset_cons_s.NEXTVAL
446 INTO x_enr_dl_offset_cons_id
447 FROM dual;
448
449 before_dml(
450 p_action => 'INSERT',
451 x_rowid => x_rowid,
452 x_enr_dl_offset_cons_id => x_enr_dl_offset_cons_id,
453 x_offset_cons_type_cd => x_offset_cons_type_cd,
454 x_constraint_condition => x_constraint_condition,
455 x_constraint_resolution => x_constraint_resolution,
456 x_non_std_usec_dls_id => x_non_std_usec_dls_id,
457 x_deadline_type => x_deadline_type,
458 x_creation_date => x_last_update_date,
459 x_created_by => x_last_updated_by,
460 x_last_update_date => x_last_update_date,
461 x_last_updated_by => x_last_updated_by,
462 x_last_update_login => x_last_update_login
463 );
464
465 INSERT INTO igs_en_dl_offset_cons (
466 enr_dl_offset_cons_id,
467 offset_cons_type_cd,
468 constraint_condition,
469 constraint_resolution,
470 non_std_usec_dls_id,
471 deadline_type,
472 creation_date,
473 created_by,
474 last_update_date,
475 last_updated_by,
476 last_update_login
477 ) VALUES (
478 new_references.enr_dl_offset_cons_id,
479 new_references.offset_cons_type_cd,
480 new_references.constraint_condition,
481 new_references.constraint_resolution,
482 new_references.non_std_usec_dls_id,
483 new_references.deadline_type,
484 x_last_update_date,
485 x_last_updated_by,
486 x_last_update_date,
487 x_last_updated_by,
488 x_last_update_login
489 );
490
491 OPEN c;
492 FETCH c INTO x_rowid;
493 IF (c%NOTFOUND) THEN
494 CLOSE c;
495 RAISE NO_DATA_FOUND;
496 END IF;
497 CLOSE c;
498
499 END insert_row;
500
501
502 PROCEDURE lock_row (
503 x_rowid IN VARCHAR2,
504 x_enr_dl_offset_cons_id IN NUMBER,
505 x_offset_cons_type_cd IN VARCHAR2,
506 x_constraint_condition IN VARCHAR2,
507 x_constraint_resolution IN NUMBER,
508 x_non_std_usec_dls_id IN NUMBER,
509 x_deadline_type IN VARCHAR2
510 ) AS
511 /*
512 || Created By : [email protected]
513 || Created On : 30-MAR-2001
514 || Purpose : Handles the LOCK mechanism for the table.
515 || Known limitations, enhancements or remarks :
516 || Change History :
517 || Who When What
518 || (reverse chronological order - newest change first)
519 */
520 CURSOR c1 IS
521 SELECT
522 offset_cons_type_cd,
523 constraint_condition,
524 constraint_resolution,
525 non_std_usec_dls_id,
526 deadline_type
527 FROM igs_en_dl_offset_cons
528 WHERE rowid = x_rowid
529 FOR UPDATE NOWAIT;
530
531 tlinfo c1%ROWTYPE;
535 OPEN c1;
532
533 BEGIN
534
536 FETCH c1 INTO tlinfo;
537 IF (c1%notfound) THEN
538 fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
539 igs_ge_msg_stack.add;
540 CLOSE c1;
541 app_exception.raise_exception;
542 RETURN;
543 END IF;
544 CLOSE c1;
545
546 IF (
547 (tlinfo.offset_cons_type_cd = x_offset_cons_type_cd)
548 AND (tlinfo.constraint_condition = x_constraint_condition)
549 AND (tlinfo.constraint_resolution = x_constraint_resolution)
550 AND (tlinfo.non_std_usec_dls_id = x_non_std_usec_dls_id)
551 AND (tlinfo.deadline_type = x_deadline_type)
552 ) THEN
553 NULL;
554 ELSE
555 fnd_message.set_name('FND', 'FORM_RECORD_CHANGED');
556 igs_ge_msg_stack.add;
557 app_exception.raise_exception;
558 END IF;
559
560 RETURN;
561
562 END lock_row;
563
564
565 PROCEDURE update_row (
566 x_rowid IN VARCHAR2,
567 x_enr_dl_offset_cons_id IN NUMBER,
568 x_offset_cons_type_cd IN VARCHAR2,
569 x_constraint_condition IN VARCHAR2,
570 x_constraint_resolution IN NUMBER,
571 x_non_std_usec_dls_id IN NUMBER,
572 x_deadline_type IN VARCHAR2,
573 x_mode IN VARCHAR2 DEFAULT 'R'
574 ) AS
575 /*
576 || Created By : [email protected]
577 || Created On : 30-MAR-2001
578 || Purpose : Handles the UPDATE DML logic for the table.
579 || Known limitations, enhancements or remarks :
580 || Change History :
581 || Who When What
582 || (reverse chronological order - newest change first)
583 */
584 x_last_update_date DATE ;
585 x_last_updated_by NUMBER;
586 x_last_update_login NUMBER;
587
588 BEGIN
589
590 x_last_update_date := SYSDATE;
591 IF (X_MODE = 'I') THEN
592 x_last_updated_by := 1;
593 x_last_update_login := 0;
594 ELSIF (x_mode = 'R') THEN
595 x_last_updated_by := fnd_global.user_id;
596 IF x_last_updated_by IS NULL THEN
597 x_last_updated_by := -1;
598 END IF;
599 x_last_update_login := fnd_global.login_id;
600 IF (x_last_update_login IS NULL) THEN
601 x_last_update_login := -1;
602 END IF;
603 ELSE
604 fnd_message.set_name( 'FND', 'SYSTEM-INVALID ARGS');
605 igs_ge_msg_stack.add;
606 app_exception.raise_exception;
607 END IF;
608
609 before_dml(
610 p_action => 'UPDATE',
611 x_rowid => x_rowid,
612 x_enr_dl_offset_cons_id => x_enr_dl_offset_cons_id,
613 x_offset_cons_type_cd => x_offset_cons_type_cd,
614 x_constraint_condition => x_constraint_condition,
615 x_constraint_resolution => x_constraint_resolution,
616 x_non_std_usec_dls_id => x_non_std_usec_dls_id,
617 x_deadline_type => x_deadline_type,
618 x_creation_date => x_last_update_date,
619 x_created_by => x_last_updated_by,
620 x_last_update_date => x_last_update_date,
621 x_last_updated_by => x_last_updated_by,
622 x_last_update_login => x_last_update_login
623 );
624
625 UPDATE igs_en_dl_offset_cons
626 SET
627 offset_cons_type_cd = new_references.offset_cons_type_cd,
628 constraint_condition = new_references.constraint_condition,
629 constraint_resolution = new_references.constraint_resolution,
630 non_std_usec_dls_id = new_references.non_std_usec_dls_id,
631 deadline_type = new_references.deadline_type,
632 last_update_date = x_last_update_date,
633 last_updated_by = x_last_updated_by,
634 last_update_login = x_last_update_login
635 WHERE rowid = x_rowid;
636
637 IF (SQL%NOTFOUND) THEN
638 RAISE NO_DATA_FOUND;
639 END IF;
640
641 END update_row;
642
643
644 PROCEDURE add_row (
645 x_rowid IN OUT NOCOPY VARCHAR2,
646 x_enr_dl_offset_cons_id IN OUT NOCOPY NUMBER,
647 x_offset_cons_type_cd IN VARCHAR2,
648 x_constraint_condition IN VARCHAR2,
649 x_constraint_resolution IN NUMBER,
650 x_non_std_usec_dls_id IN NUMBER,
651 x_deadline_type IN VARCHAR2,
652 x_mode IN VARCHAR2 DEFAULT 'R'
653 ) AS
654 /*
655 || Created By : [email protected]
656 || Created On : 30-MAR-2001
657 || Purpose : Adds a row if there is no existing row, otherwise updates existing row in the table.
658 || Known limitations, enhancements or remarks :
659 || Change History :
660 || Who When What
661 || (reverse chronological order - newest change first)
662 */
663 CURSOR c1 IS
664 SELECT rowid
665 FROM igs_en_dl_offset_cons
666 WHERE enr_dl_offset_cons_id = x_enr_dl_offset_cons_id;
670 OPEN c1;
667
668 BEGIN
669
671 FETCH c1 INTO x_rowid;
672 IF (c1%NOTFOUND) THEN
673 CLOSE c1;
674
675 insert_row (
676 x_rowid,
677 x_enr_dl_offset_cons_id,
678 x_offset_cons_type_cd,
679 x_constraint_condition,
680 x_constraint_resolution,
681 x_non_std_usec_dls_id,
682 x_deadline_type,
683 x_mode
684 );
685 RETURN;
686 END IF;
687 CLOSE c1;
688
689 update_row (
690 x_rowid,
691 x_enr_dl_offset_cons_id,
692 x_offset_cons_type_cd,
693 x_constraint_condition,
694 x_constraint_resolution,
695 x_non_std_usec_dls_id,
696 x_deadline_type,
697 x_mode
698 );
699
700 END add_row;
701
702
703 PROCEDURE delete_row (
704 x_rowid IN VARCHAR2
705 ) AS
706 /*
707 || Created By : [email protected]
708 || Created On : 30-MAR-2001
709 || Purpose : Handles the DELETE DML logic for the table.
710 || Known limitations, enhancements or remarks :
711 || Change History :
712 || Who When What
713 || (reverse chronological order - newest change first)
714 */
715 BEGIN
716
717 before_dml (
718 p_action => 'DELETE',
719 x_rowid => x_rowid
720 );
721
722 DELETE FROM igs_en_dl_offset_cons
723 WHERE rowid = x_rowid;
724
725 IF (SQL%NOTFOUND) THEN
726 RAISE NO_DATA_FOUND;
727 END IF;
728
729 END delete_row;
730
731
732 END igs_en_dl_offset_cons_pkg;