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
) 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_PRTY
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_prty
WHERE igs_en_timeslot_prty_id = x_igs_en_timeslot_prty_id
FOR UPDATE NOWAIT;
SELECT rowid
FROM igs_en_timeslot_prty
WHERE igs_en_timeslot_stup_id = x_igs_en_timeslot_stup_id
AND priority_value = x_priority_value and ((l_rowid is null) or (rowid <> l_rowid))
;
SELECT rowid
FROM igs_en_timeslot_prty
WHERE igs_en_timeslot_stup_id = x_igs_en_timeslot_stup_id ;
x_last_update_date IN DATE DEFAULT NULL,
x_last_updated_by IN NUMBER DEFAULT NULL,
x_last_update_login 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_prty_id,
x_igs_en_timeslot_stup_id,
x_priority_order,
x_priority_value,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
Null;
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to Before Update.
Null;
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.
IF get_pk_for_validation (
new_references.igs_en_timeslot_prty_id) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
check_uniqueness;
ELSIF (p_action = 'VALIDATE_DELETE') THEN
check_child_existance;
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_prty_id IN OUT NOCOPY NUMBER,
x_igs_en_timeslot_stup_id IN NUMBER,
x_priority_order IN NUMBER,
x_priority_value IN VARCHAR2,
x_mode IN VARCHAR2 DEFAULT 'R'
) AS
/*************************************************************
Created By :
Date Created By :
Purpose :
Know limitations, enhancements or remarks
Change History
Who When What
(reverse chronological order - newest change first)
***************************************************************/
CURSOR c IS SELECT ROWID FROM igs_en_timeslot_prty
WHERE igs_en_timeslot_prty_id= x_igs_en_timeslot_prty_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_prty_s.nextval into x_igs_en_timeslot_prty_id from dual;
p_action=>'INSERT',
x_rowid=>X_ROWID,
x_igs_en_timeslot_prty_id=>x_igs_en_timeslot_prty_id,
x_igs_en_timeslot_stup_id=>x_igs_en_timeslot_stup_id,
x_priority_order=>x_priority_order,
x_priority_value=>x_priority_value,
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);
INSERT INTO igs_en_timeslot_prty (
igs_en_timeslot_prty_id
,igs_en_timeslot_stup_id
,priority_order
,priority_value
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
) VALUES (
new_references.igs_en_timeslot_prty_id
,new_references.igs_en_timeslot_stup_id
,new_references.priority_order
,new_references.priority_value
,x_last_update_date
,x_last_updated_by
,x_last_update_date
,x_last_updated_by
,x_last_update_login
);
p_action => 'INSERT' ,
x_rowid => X_ROWID );
END insert_row;
CURSOR c1 IS SELECT
igs_en_timeslot_stup_id
, priority_order
, priority_value
FROM igs_en_timeslot_prty
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_PRTY_ID IN NUMBER,
x_IGS_EN_TIMESLOT_STUP_ID IN NUMBER,
x_PRIORITY_ORDER IN NUMBER,
x_PRIORITY_VALUE IN VARCHAR2,
x_mode IN VARCHAR2 DEFAULT 'R'
) 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_prty_id=>X_IGS_EN_TIMESLOT_PRTY_ID,
x_igs_en_timeslot_stup_id=>X_IGS_EN_TIMESLOT_STUP_ID,
x_priority_order=>X_PRIORITY_ORDER,
x_priority_value=>X_PRIORITY_VALUE,
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);
UPDATE igs_en_timeslot_prty SET
igs_en_timeslot_stup_id = NEW_REFERENCES.igs_en_timeslot_stup_id,
priority_order = NEW_REFERENCES.priority_order,
priority_value = NEW_REFERENCES.priority_value,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login
WHERE ROWID = x_rowid;
p_action => 'UPDATE' ,
x_rowid => X_ROWID
);
END update_row;
CURSOR c1 IS SELECT ROWID FROM igs_en_timeslot_prty
WHERE igs_en_timeslot_prty_id= x_igs_en_timeslot_prty_id
;
insert_row (
x_rowid,
X_igs_en_timeslot_prty_id,
X_igs_en_timeslot_stup_id,
X_priority_order,
X_priority_value,
x_mode );
update_row (
x_rowid,
x_igs_en_timeslot_prty_id,
x_igs_en_timeslot_stup_id,
x_priority_order,
x_priority_value,
x_mode );
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_prty
WHERE ROWID = x_rowid;
p_action => 'DELETE',
x_rowid => X_ROWID
);
END delete_row;