The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_last_update_date IN DATE DEFAULT NULL,
x_last_updated_by IN NUMBER DEFAULT NULL,
x_last_update_login IN NUMBER DEFAULT NULL,
x_sequence_number IN NUMBER DEFAULT NULL
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
CURSOR cur_old_ref_values IS
SELECT *
FROM IGS_EN_TIMESLOT_PREF
WHERE rowid = x_rowid;
IF (cur_old_ref_values%NOTFOUND) AND (p_action NOT IN ('INSERT','VALIDATE_INSERT')) THEN
CLOSE cur_old_ref_values;
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
IF (p_action = 'UPDATE') THEN
new_references.creation_date := old_references.creation_date;
new_references.last_update_date := x_last_update_date;
new_references.last_updated_by := x_last_updated_by;
new_references.last_update_login := x_last_update_login;
fnd_message.set_name ('FND','FORM_RECORD_DELETED');
SELECT rowid
FROM igs_en_timeslot_pref
WHERE igs_en_timeslot_pref_id = x_igs_en_timeslot_pref_id
FOR UPDATE NOWAIT;
SELECT rowid
FROM igs_en_timeslot_pref
WHERE igs_en_timeslot_prty_id = x_igs_en_timeslot_prty_id
AND preference_code = x_preference_code
AND ((preference_version IS NULL and x_preference_version IS NULL)
OR preference_version = x_preference_version)
AND ((sequence_number IS NULL and x_sequence_number IS NULL)
OR sequence_number = x_sequence_number)
AND ((l_rowid is null) or (rowid <> l_rowid))
;
SELECT rowid
FROM igs_en_timeslot_pref
WHERE igs_en_timeslot_prty_id = x_igs_en_timeslot_prty_id ;
PROCEDURE BeforeInsertUpdate(p_inserting BOOLEAN , p_updating BOOLEAN) AS
p_message_name VARCHAR2(30);
CURSOR grp_id_cur is select group_id from igs_pe_persid_group_all
WHERE group_cd = new_references.preference_code;
IF ( p_inserting = TRUE OR (p_updating = TRUE AND new_references.preference_code <> old_references.preference_code ) ) THEN
OPEN grp_id_cur;
END BeforeInsertUpdate;
x_last_update_date IN DATE DEFAULT NULL,
x_last_updated_by IN NUMBER DEFAULT NULL,
x_last_update_login IN NUMBER DEFAULT NULL,
x_sequence_number IN NUMBER DEFAULT NULL
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
BEGIN
set_column_values (
p_action,
x_rowid,
x_igs_en_timeslot_pref_id,
x_igs_en_timeslot_prty_id,
x_preference_order,
x_preference_code,
x_preference_version,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_sequence_number
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
Null;
BeforeInsertUpdate(TRUE,FALSE);
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to Before Update.
Null;
BeforeInsertUpdate(FALSE,TRUE);
ELSIF (p_action = 'DELETE') THEN
-- Call all the procedures related to Before Delete.
Null;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insert.
BeforeInsertUpdate(TRUE,FALSE);
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
BeforeInsertUpdate(FALSE,TRUE);
ELSIF (p_action = 'VALIDATE_DELETE') THEN
NULL;
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to After Insert.
Null;
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to After Update.
Null;
ELSIF (p_action = 'DELETE') THEN
-- Call all the procedures related to After Delete.
Null;
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_igs_en_timeslot_pref_id IN OUT NOCOPY NUMBER,
x_igs_en_timeslot_prty_id IN NUMBER,
x_preference_order IN NUMBER,
x_preference_code IN VARCHAR2,
x_preference_version IN NUMBER,
x_mode IN VARCHAR2 DEFAULT 'R',
x_sequence_number IN NUMBER
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
Know limitations, enhancements or remarks
Change History
Who When What
ayedubat 16,JUL 2002 Removed the default NULL value of the in parameter,x_sequence_number for the bug fix:2464172
(reverse chronological order - newest change first)
***************************************************************/
CURSOR c IS SELECT ROWID FROM igs_en_timeslot_pref
WHERE igs_en_timeslot_pref_id= x_igs_en_timeslot_pref_id
;
x_last_update_date DATE ;
x_last_updated_by NUMBER ;
x_last_update_login NUMBER ;
x_last_update_date := SYSDATE;
x_last_updated_by := 1;
x_last_update_login := 0;
x_last_updated_by := fnd_global.user_id;
IF x_last_updated_by IS NULL then
x_last_updated_by := -1;
x_last_update_login := fnd_global.login_id;
IF x_last_update_login IS NULL THEN
x_last_update_login := -1;
select igs_en_timeslot_pref_s.nextval into x_igs_en_timeslot_pref_id from dual;
p_action=>'INSERT',
x_rowid=>X_ROWID,
x_igs_en_timeslot_pref_id=>x_igs_en_timeslot_pref_id,
x_igs_en_timeslot_prty_id=>x_igs_en_timeslot_prty_id,
x_preference_order=>x_preference_order,
x_preference_code=>x_preference_code,
x_preference_version=>x_preference_version,
x_creation_date=> x_last_update_date,
x_created_by=> x_last_updated_by,
x_last_update_date=> x_last_update_date,
x_last_updated_by=> x_last_updated_by,
x_last_update_login=> x_last_update_login,
x_sequence_number=> x_sequence_number
);
INSERT INTO igs_en_timeslot_pref (
igs_en_timeslot_pref_id
,igs_en_timeslot_prty_id
,preference_order
,preference_code
,preference_version
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,sequence_number
) VALUES (
new_references.igs_en_timeslot_pref_id
,new_references.igs_en_timeslot_prty_id
,new_references.preference_order
,new_references.preference_code
,new_references.preference_version
,x_last_update_date
,x_last_updated_by
,x_last_update_date
,x_last_updated_by
,x_last_update_login
,x_sequence_number
);
p_action => 'INSERT' ,
x_rowid => X_ROWID );
END insert_row;
CURSOR c1 IS SELECT
igs_en_timeslot_prty_id
, preference_order
, preference_code
, preference_version
, sequence_number
FROM igs_en_timeslot_pref
WHERE ROWID = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_IGS_EN_TIMESLOT_PREF_ID IN NUMBER,
x_IGS_EN_TIMESLOT_PRTY_ID IN NUMBER,
x_PREFERENCE_ORDER IN NUMBER,
x_PREFERENCE_CODE IN VARCHAR2,
x_PREFERENCE_VERSION IN NUMBER,
x_mode IN VARCHAR2 DEFAULT 'R',
x_sequence_number IN NUMBER
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
x_last_update_date DATE ;
x_last_updated_by NUMBER ;
x_last_update_login NUMBER ;
x_last_update_date := SYSDATE;
x_last_updated_by := 1;
x_last_update_login := 0;
x_last_updated_by := fnd_global.user_id;
IF x_last_updated_by IS NULL THEN
x_last_updated_by := -1;
x_last_update_login := fnd_global.login_id;
IF x_last_update_login IS NULL THEN
x_last_update_login := -1;
p_action=>'UPDATE',
x_rowid=>X_ROWID,
x_igs_en_timeslot_pref_id=>X_IGS_EN_TIMESLOT_PREF_ID,
x_igs_en_timeslot_prty_id=>X_IGS_EN_TIMESLOT_PRTY_ID,
x_preference_order=>X_PREFERENCE_ORDER,
x_preference_code=>X_PREFERENCE_CODE,
x_preference_version=>X_PREFERENCE_VERSION,
x_creation_date=>x_last_update_date,
x_created_by=>x_last_updated_by,
x_last_update_date=>x_last_update_date,
x_last_updated_by=>x_last_updated_by,
x_last_update_login=>x_last_update_login,
x_sequence_number=>x_sequence_number
);
UPDATE igs_en_timeslot_pref SET
igs_en_timeslot_prty_id = NEW_REFERENCES.igs_en_timeslot_prty_id,
preference_order = NEW_REFERENCES.preference_order,
preference_code = NEW_REFERENCES.preference_code,
preference_version = NEW_REFERENCES.preference_version,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login,
sequence_number = x_sequence_number
WHERE ROWID = x_rowid;
p_action => 'UPDATE' ,
x_rowid => X_ROWID
);
END update_row;
CURSOR c1 IS SELECT ROWID FROM igs_en_timeslot_pref
WHERE igs_en_timeslot_pref_id= x_igs_en_timeslot_pref_id
;
insert_row (
x_rowid,
X_igs_en_timeslot_pref_id,
X_igs_en_timeslot_prty_id,
X_preference_order,
X_preference_code,
X_preference_version,
x_mode,
x_sequence_number
);
update_row (
x_rowid,
x_igs_en_timeslot_pref_id,
x_igs_en_timeslot_prty_id,
x_preference_order,
x_preference_code,
x_preference_version,
x_mode,
x_sequence_number
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
BEGIN
before_dml (
p_action => 'DELETE',
x_rowid => X_ROWID
);
DELETE FROM igs_en_timeslot_pref
WHERE ROWID = x_rowid;
p_action => 'DELETE',
x_rowid => X_ROWID
);
END delete_row;