[Home] [Help]
1: PACKAGE BODY igs_ps_us_unsched_cl_pkg AS
2: /* $Header: IGSPI2UB.pls 120.1 2005/06/29 04:26:50 appldev ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_ps_us_unsched_cl%ROWTYPE;
1: PACKAGE BODY igs_ps_us_unsched_cl_pkg AS
2: /* $Header: IGSPI2UB.pls 120.1 2005/06/29 04:26:50 appldev ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_ps_us_unsched_cl%ROWTYPE;
6: new_references igs_ps_us_unsched_cl%ROWTYPE;
7:
8: PROCEDURE set_column_values (
9: p_action IN VARCHAR2,
2: /* $Header: IGSPI2UB.pls 120.1 2005/06/29 04:26:50 appldev ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_ps_us_unsched_cl%ROWTYPE;
6: new_references igs_ps_us_unsched_cl%ROWTYPE;
7:
8: PROCEDURE set_column_values (
9: p_action IN VARCHAR2,
10: x_rowid IN VARCHAR2 DEFAULT NULL,
35: */
36:
37: CURSOR cur_old_ref_values IS
38: SELECT *
39: FROM IGS_PS_US_UNSCHED_CL
40: WHERE rowid = x_rowid;
41:
42: BEGIN
43:
260: || (reverse chronological order - newest change first)
261: */
262: CURSOR cur_rowid IS
263: SELECT rowid
264: FROM igs_ps_us_unsched_cl
265: WHERE us_unscheduled_cl_id = x_us_unscheduled_cl_id
266: FOR UPDATE NOWAIT;
267:
268: lv_rowid cur_rowid%RowType;
299: || (reverse chronological order - newest change first)
300: */
301: CURSOR cur_rowid IS
302: SELECT rowid
303: FROM igs_ps_us_unsched_cl
304: WHERE uoo_id = x_uoo_id
305: AND activity_type_id = x_activity_type_id
306: AND location_cd = x_location_cd
307: AND building_id = x_building_id
338: || (reverse chronological order - newest change first)
339: */
340: CURSOR cur_rowid IS
341: SELECT rowid
342: FROM igs_ps_us_unsched_cl
343: WHERE ((location_cd = x_location_cd));
344:
345: lv_rowid cur_rowid%RowType;
346:
373: || (reverse chronological order - newest change first)
374: */
375: CURSOR cur_rowid IS
376: SELECT rowid
377: FROM igs_ps_us_unsched_cl
378: WHERE ((building_id = x_building_id));
379:
380: lv_rowid cur_rowid%RowType;
381:
408: || (reverse chronological order - newest change first)
409: */
410: CURSOR cur_rowid IS
411: SELECT rowid
412: FROM igs_ps_us_unsched_cl
413: WHERE ((room_id = x_room_id));
414:
415: lv_rowid cur_rowid%RowType;
416:
443: || (reverse chronological order - newest change first)
444: */
445: CURSOR cur_rowid IS
446: SELECT rowid
447: FROM igs_ps_us_unsched_cl
448: WHERE ((uoo_id = x_uoo_id));
449:
450: lv_rowid cur_rowid%RowType;
451:
478: || (reverse chronological order - newest change first)
479: */
480: CURSOR cur_rowid IS
481: SELECT rowid
482: FROM igs_ps_us_unsched_cl
483: WHERE ((instructor_id = x_party_id));
484:
485: lv_rowid cur_rowid%RowType;
486:
512: || (reverse chronological order - newest change first)
513: */
514: CURSOR cur_rowid IS
515: SELECT rowid
516: FROM igs_ps_us_unsched_cl
517: WHERE ((activity_type_id = x_activity_type_id));
518:
519: lv_rowid cur_rowid%RowType;
520:
646: || (reverse chronological order - newest change first)
647: */
648: CURSOR c IS
649: SELECT rowid
650: FROM igs_ps_us_unsched_cl
651: WHERE us_unscheduled_cl_id = x_us_unscheduled_cl_id;
652:
653: x_last_update_date DATE;
654: x_last_updated_by NUMBER;
674: igs_ge_msg_stack.add;
675: app_exception.raise_exception;
676: END IF;
677:
678: SELECT igs_ps_us_unsched_cl_s.NEXTVAL
679: INTO x_us_unscheduled_cl_id
680: FROM dual;
681:
682: before_dml(
698: x_last_updated_by => x_last_updated_by,
699: x_last_update_login => x_last_update_login
700: );
701:
702: INSERT INTO igs_ps_us_unsched_cl (
703: us_unscheduled_cl_id,
704: uoo_id,
705: activity_type_id,
706: location_cd,
776: number_of_students,
777: hours_per_student,
778: hours_per_faculty,
779: instructor_id
780: FROM igs_ps_us_unsched_cl
781: WHERE rowid = x_rowid
782: FOR UPDATE NOWAIT;
783:
784: tlinfo c1%ROWTYPE;
886: x_last_updated_by => x_last_updated_by,
887: x_last_update_login => x_last_update_login
888: );
889:
890: UPDATE igs_ps_us_unsched_cl
891: SET
892: uoo_id = new_references.uoo_id,
893: activity_type_id = new_references.activity_type_id,
894: location_cd = new_references.location_cd,
934: || (reverse chronological order - newest change first)
935: */
936: CURSOR c1 IS
937: SELECT rowid
938: FROM igs_ps_us_unsched_cl
939: WHERE us_unscheduled_cl_id = x_us_unscheduled_cl_id;
940:
941: BEGIN
942:
999: p_action => 'DELETE',
1000: x_rowid => x_rowid
1001: );
1002:
1003: DELETE FROM igs_ps_us_unsched_cl
1004: WHERE rowid = x_rowid;
1005:
1006: IF (SQL%NOTFOUND) THEN
1007: RAISE NO_DATA_FOUND;
1009:
1010: END delete_row;
1011:
1012:
1013: END igs_ps_us_unsched_cl_pkg;