1: PACKAGE BODY igs_ps_prg_unit_rel_pkg AS
2: /* $Header: IGSPI2YB.pls 115.5 2002/11/29 02:20:43 nsidana noship $ */
3:
4:
5: l_rowid VARCHAR2(25);
2: /* $Header: IGSPI2YB.pls 115.5 2002/11/29 02:20:43 nsidana noship $ */
3:
4:
5: l_rowid VARCHAR2(25);
6: old_references igs_ps_prg_unit_rel%ROWTYPE;
7: new_references igs_ps_prg_unit_rel%ROWTYPE;
8:
9: PROCEDURE set_column_values (
10: p_action IN VARCHAR2,
3:
4:
5: l_rowid VARCHAR2(25);
6: old_references igs_ps_prg_unit_rel%ROWTYPE;
7: new_references igs_ps_prg_unit_rel%ROWTYPE;
8:
9: PROCEDURE set_column_values (
10: p_action IN VARCHAR2,
11: x_rowid IN VARCHAR2 DEFAULT NULL,
31: */
32:
33: CURSOR cur_old_ref_values IS
34: SELECT *
35: FROM igs_ps_prg_unit_rel
36: WHERE rowid = x_rowid;
37:
38: BEGIN
39:
149: || (reverse chronological order - newest change first)
150: */
151: CURSOR cur_rowid IS
152: SELECT rowid
153: FROM igs_ps_prg_unit_rel
154: WHERE ps_prun_rel_id = x_ps_prun_rel_id
155: FOR UPDATE NOWAIT;
156:
157: lv_rowid cur_rowid%RowType;
185: || (reverse chronological order - newest change first)
186: */
187: CURSOR cur_rowid IS
188: SELECT rowid
189: FROM igs_ps_prg_unit_rel
190: WHERE student_career_level = x_student_career_level
191: AND unit_type_id = x_unit_type_id
192: AND ((l_rowid IS NULL) OR (rowid <> l_rowid));
193:
221: || (reverse chronological order - newest change first)
222: */
223: CURSOR cur_rowid IS
224: SELECT rowid
225: FROM igs_ps_prg_unit_rel
226: WHERE ((unit_type_id = x_unit_type_id));
227:
228: lv_rowid cur_rowid%RowType;
229:
256: || (reverse chronological order - newest change first)
257: */
258: CURSOR cur_rowid IS
259: SELECT rowid
260: FROM igs_ps_prg_unit_rel
261: WHERE ((student_career_level = x_course_type));
262:
263: lv_rowid cur_rowid%RowType;
264:
372: || (reverse chronological order - newest change first)
373: */
374: CURSOR c IS
375: SELECT rowid
376: FROM igs_ps_prg_unit_rel
377: WHERE ps_prun_rel_id = x_ps_prun_rel_id;
378:
379: x_last_update_date DATE;
380: x_last_updated_by NUMBER;
400: igs_ge_msg_stack.add;
401: app_exception.raise_exception;
402: END IF;
403:
404: SELECT igs_ps_prg_unit_rel_s.NEXTVAL
405: INTO x_ps_prun_rel_id
406: FROM dual;
407:
408: before_dml(
419: x_last_updated_by => x_last_updated_by,
420: x_last_update_login => x_last_update_login
421: );
422:
423: INSERT INTO igs_ps_prg_unit_rel (
424: ps_prun_rel_id,
425: student_career_level,
426: unit_type_id,
427: student_career_transcript,
477: student_career_level,
478: unit_type_id,
479: student_career_transcript,
480: student_career_statistics
481: FROM igs_ps_prg_unit_rel
482: WHERE rowid = x_rowid
483: FOR UPDATE NOWAIT;
484:
485: tlinfo c1%ROWTYPE;
572: x_last_updated_by => x_last_updated_by,
573: x_last_update_login => x_last_update_login
574: );
575:
576: UPDATE igs_ps_prg_unit_rel
577: SET
578: student_career_level = new_references.student_career_level,
579: unit_type_id = new_references.unit_type_id,
580: student_career_transcript = new_references.student_career_transcript,
610: || (reverse chronological order - newest change first)
611: */
612: CURSOR c1 IS
613: SELECT rowid
614: FROM igs_ps_prg_unit_rel
615: WHERE ps_prun_rel_id = x_ps_prun_rel_id;
616:
617: BEGIN
618:
665: p_action => 'DELETE',
666: x_rowid => x_rowid
667: );
668:
669: DELETE FROM igs_ps_prg_unit_rel
670: WHERE rowid = x_rowid;
671:
672: IF (SQL%NOTFOUND) THEN
673: RAISE NO_DATA_FOUND;
675:
676: END delete_row;
677:
678:
679: END igs_ps_prg_unit_rel_pkg;