1: PACKAGE BODY igs_or_inst_stats_pkg AS
2: /* $Header: IGSOI29B.pls 115.5 2002/11/29 01:44:05 nsidana ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_or_inst_stats%ROWTYPE;
1: PACKAGE BODY igs_or_inst_stats_pkg AS
2: /* $Header: IGSOI29B.pls 115.5 2002/11/29 01:44:05 nsidana ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_or_inst_stats%ROWTYPE;
6: new_references igs_or_inst_stats%ROWTYPE;
7:
8: PROCEDURE set_column_values (
9: p_action IN VARCHAR2,
2: /* $Header: IGSOI29B.pls 115.5 2002/11/29 01:44:05 nsidana ship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igs_or_inst_stats%ROWTYPE;
6: new_references igs_or_inst_stats%ROWTYPE;
7:
8: PROCEDURE set_column_values (
9: p_action IN VARCHAR2,
10: x_rowid IN VARCHAR2 ,
28: */
29:
30: CURSOR cur_old_ref_values IS
31: SELECT *
32: FROM IGS_OR_INST_STATS
33: WHERE rowid = x_rowid;
34:
35: BEGIN
36:
132: || (reverse chronological order - newest change first)
133: */
134: BEGIN
135:
136: igs_or_inst_stat_dtl_pkg.get_fk_igs_or_inst_stats (
137: old_references.inst_stat_id
138: );
139:
140: END check_child_existance;
153: || (reverse chronological order - newest change first)
154: */
155: CURSOR cur_rowid IS
156: SELECT rowid
157: FROM igs_or_inst_stats
158: WHERE inst_stat_id = x_inst_stat_id
159: FOR UPDATE NOWAIT;
160:
161: lv_rowid cur_rowid%RowType;
189: || (reverse chronological order - newest change first)
190: */
191: CURSOR cur_rowid IS
192: SELECT rowid
193: FROM igs_or_inst_stats
194: WHERE stat_type_cd = x_stat_type_cd
195: AND party_id = x_party_id
196: AND ((l_rowid IS NULL) OR (rowid <> l_rowid));
197:
305: || (reverse chronological order - newest change first)
306: */
307: CURSOR c IS
308: SELECT rowid
309: FROM igs_or_inst_stats
310: WHERE inst_stat_id = x_inst_stat_id;
311:
312: x_last_update_date DATE;
313: x_last_updated_by NUMBER;
349: igs_ge_msg_stack.add;
350: app_exception.raise_exception;
351: END IF;
352:
353: SELECT igs_or_inst_stats_s.NEXTVAL
354: INTO x_inst_stat_id
355: FROM dual;
356:
357: before_dml(
366: x_last_updated_by => x_last_updated_by,
367: x_last_update_login => x_last_update_login
368: );
369:
370: INSERT INTO igs_or_inst_stats (
371: inst_stat_id,
372: stat_type_cd,
373: party_id,
374: creation_date,
424: CURSOR c1 IS
425: SELECT
426: stat_type_cd,
427: party_id
428: FROM igs_or_inst_stats
429: WHERE rowid = x_rowid
430: FOR UPDATE NOWAIT;
431:
432: tlinfo c1%ROWTYPE;
531: x_program_update_date := SYSDATE;
532: END IF;
533: END IF;
534:
535: UPDATE igs_or_inst_stats
536: SET
537: stat_type_cd = new_references.stat_type_cd,
538: party_id = new_references.party_id,
539: last_update_date = x_last_update_date,
569: || (reverse chronological order - newest change first)
570: */
571: CURSOR c1 IS
572: SELECT rowid
573: FROM igs_or_inst_stats
574: WHERE inst_stat_id = x_inst_stat_id;
575:
576: BEGIN
577:
620: p_action => 'DELETE',
621: x_rowid => x_rowid
622: );
623:
624: DELETE FROM igs_or_inst_stats
625: WHERE rowid = x_rowid;
626:
627: IF (SQL%NOTFOUND) THEN
628: RAISE NO_DATA_FOUND;
630:
631: END delete_row;
632:
633:
634: END igs_or_inst_stats_pkg;