[Home] [Help]
1: PACKAGE BODY igr_i_e_orgunits_pkg AS
2: /* $Header: IGSRH10B.pls 120.0 2005/06/01 17:41:41 appldev noship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igr_i_e_orgunits%ROWTYPE;
1: PACKAGE BODY igr_i_e_orgunits_pkg AS
2: /* $Header: IGSRH10B.pls 120.0 2005/06/01 17:41:41 appldev noship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igr_i_e_orgunits%ROWTYPE;
6: new_references igr_i_e_orgunits%ROWTYPE;
7:
8: PROCEDURE set_column_values (
9: p_action IN VARCHAR2,
2: /* $Header: IGSRH10B.pls 120.0 2005/06/01 17:41:41 appldev noship $ */
3:
4: l_rowid VARCHAR2(25);
5: old_references igr_i_e_orgunits%ROWTYPE;
6: new_references igr_i_e_orgunits%ROWTYPE;
7:
8: PROCEDURE set_column_values (
9: p_action IN VARCHAR2,
10: x_rowid IN VARCHAR2 DEFAULT NULL,
29: */
30:
31: CURSOR cur_old_ref_values IS
32: SELECT *
33: FROM IGR_I_E_ORGUNITS
34: WHERE rowid = x_rowid;
35:
36: BEGIN
37:
167: || (reverse chronological order - newest change first)
168: */
169: CURSOR cur_rowid IS
170: SELECT rowid
171: FROM igr_i_e_orgunits
172: WHERE ent_org_unit_id = x_ent_org_unit_id AND
173: closed_ind = NVL(x_closed_ind,closed_ind)
174: FOR UPDATE NOWAIT;
175:
205: || (reverse chronological order - newest change first)
206: */
207: CURSOR cur_rowid IS
208: SELECT rowid
209: FROM igr_i_e_orgunits
210: WHERE inquiry_type_id = x_inquiry_type_id
211: AND party_id = x_party_id
212: AND ((l_rowid IS NULL) OR (rowid <> l_rowid))
213: AND closed_ind = NVL(x_closed_ind,closed_ind);
242: || (reverse chronological order - newest change first)
243: */
244: CURSOR cur_rowid IS
245: SELECT rowid
246: FROM igr_i_e_orgunits
247: WHERE ((inquiry_type_id = x_inquiry_type_id));
248:
249: lv_rowid cur_rowid%RowType;
250:
355: || (reverse chronological order - newest change first)
356: */
357: CURSOR c IS
358: SELECT rowid
359: FROM igr_i_e_orgunits
360: WHERE ent_org_unit_id = x_ent_org_unit_id;
361:
362: x_last_update_date DATE;
363: x_last_updated_by NUMBER;
398: x_last_update_login => x_last_update_login,
399: x_inquiry_type_id => x_inquiry_type_id
400: );
401:
402: INSERT INTO igr_i_e_orgunits (
403: ent_org_unit_id,
404: party_id,
405: closed_ind,
406: creation_date,
409: last_updated_by,
410: last_update_login,
411: inquiry_type_id
412: ) VALUES (
413: IGR_I_E_ORGUNITS_S.NEXTVAL,
414: new_references.party_id,
415: new_references.closed_ind,
416: x_last_update_date,
417: x_last_updated_by,
452: SELECT
453: inquiry_type_id,
454: party_id,
455: closed_ind
456: FROM igr_i_e_orgunits
457: WHERE rowid = x_rowid
458: FOR UPDATE NOWAIT;
459:
460: tlinfo c1%ROWTYPE;
544: x_last_update_login => x_last_update_login,
545: x_inquiry_type_id => x_inquiry_type_id
546: );
547:
548: UPDATE igr_i_e_orgunits
549: SET
550: inquiry_type_id = new_references.inquiry_type_id,
551: party_id = new_references.party_id,
552: closed_ind = new_references.closed_ind,
580: || (reverse chronological order - newest change first)
581: */
582: CURSOR c1 IS
583: SELECT rowid
584: FROM igr_i_e_orgunits
585: WHERE ent_org_unit_id = x_ent_org_unit_id;
586:
587: BEGIN
588:
633: p_action => 'DELETE',
634: x_rowid => x_rowid
635: );
636:
637: DELETE FROM igr_i_e_orgunits
638: WHERE rowid = x_rowid;
639:
640: IF (SQL%NOTFOUND) THEN
641: RAISE NO_DATA_FOUND;
643:
644: END delete_row;
645:
646:
647: END igr_i_e_orgunits_pkg;