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_org_id 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_STUP
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');
fnd_message.set_name ('FND','FORM_RECORD_DELETED');
SELECT rowid
FROM igs_en_timeslot_stup
WHERE igs_en_timeslot_stup_id = x_igs_en_timeslot_stup_id
FOR UPDATE NOWAIT;
SELECT rowid
FROM igs_en_timeslot_stup
WHERE program_type_group_cd = x_program_type_group_cd
AND cal_type = x_cal_type
AND sequence_number = x_sequence_number
AND student_type = x_student_type and ((l_rowid is null) or (rowid <> l_rowid))
;
SELECT rowid
FROM igs_en_timeslot_stup
WHERE cal_type = x_cal_type
AND sequence_number = x_sequence_number ;
SELECT rowid
FROM igs_en_timeslot_stup
WHERE program_type_group_cd = x_course_type_group_cd ;
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_org_id 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_sequence_number,
x_student_type,
x_assign_randomly,
x_surname_alphabet,
x_cal_type,
x_igs_en_timeslot_stup_id,
x_program_type_group_cd,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login ,
x_org_id
);
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_stup_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_sequence_number IN NUMBER,
x_student_type IN VARCHAR2,
x_assign_randomly IN VARCHAR2,
x_surname_alphabet IN VARCHAR2,
x_cal_type IN VARCHAR2,
x_igs_en_timeslot_stup_id IN OUT NOCOPY NUMBER,
x_program_type_group_cd IN VARCHAR2,
x_mode IN VARCHAR2 DEFAULT 'R' ,
X_ORG_ID 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)
pradhakr 23-Jul-2002 Assigned igs_ge_gen_003.get_org_id to x_org_id in
before dml as part of bug# 2457599
***************************************************************/
CURSOR c IS SELECT ROWID FROM igs_en_timeslot_stup
WHERE igs_en_timeslot_stup_id= x_igs_en_timeslot_stup_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_stup_s.nextval into x_igs_en_timeslot_stup_id from dual;
p_action=>'INSERT',
x_rowid=>X_ROWID,
x_sequence_number=>x_sequence_number,
x_student_type=>x_student_type,
x_assign_randomly=>x_assign_randomly,
x_surname_alphabet=>x_surname_alphabet,
x_cal_type=>x_cal_type,
x_igs_en_timeslot_stup_id=>x_igs_en_timeslot_stup_id,
x_program_type_group_cd=>x_program_type_group_cd,
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_org_id => igs_ge_gen_003.get_org_id );
INSERT INTO igs_en_timeslot_stup (
sequence_number
,student_type
,assign_randomly
,surname_alphabet
,cal_type
,igs_en_timeslot_stup_id
,program_type_group_cd
,creation_date
,created_by
,last_update_date
,last_updated_by
,last_update_login
,ORG_ID
) VALUES (
new_references.sequence_number
,new_references.student_type
,new_references.assign_randomly
,new_references.surname_alphabet
,new_references.cal_type
,new_references.igs_en_timeslot_stup_id
,new_references.program_type_group_cd
,x_last_update_date
,x_last_updated_by
,x_last_update_date
,x_last_updated_by
,x_last_update_login
,NEW_REFERENCES.ORG_ID );
p_action => 'INSERT' ,
x_rowid => X_ROWID );
END insert_row;
CURSOR c1 IS SELECT
sequence_number
, student_type
, assign_randomly
, surname_alphabet
, cal_type
, program_type_group_cd
FROM igs_en_timeslot_stup
WHERE ROWID = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_SEQUENCE_NUMBER IN NUMBER,
x_STUDENT_TYPE IN VARCHAR2,
x_ASSIGN_RANDOMLY IN VARCHAR2,
x_SURNAME_ALPHABET IN VARCHAR2,
x_CAL_TYPE IN VARCHAR2,
x_IGS_EN_TIMESLOT_STUP_ID IN NUMBER,
x_PROGRAM_TYPE_GROUP_CD 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_sequence_number=>X_SEQUENCE_NUMBER,
x_student_type=>X_STUDENT_TYPE,
x_assign_randomly=>X_ASSIGN_RANDOMLY,
x_surname_alphabet=>X_SURNAME_ALPHABET,
x_cal_type=>X_CAL_TYPE,
x_igs_en_timeslot_stup_id=>X_IGS_EN_TIMESLOT_STUP_ID,
x_program_type_group_cd=>X_PROGRAM_TYPE_GROUP_CD,
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_stup SET
sequence_number = NEW_REFERENCES.sequence_number,
student_type = NEW_REFERENCES.student_type,
assign_randomly = NEW_REFERENCES.assign_randomly,
surname_alphabet = NEW_REFERENCES.surname_alphabet,
cal_type = NEW_REFERENCES.cal_type,
program_type_group_cd = NEW_REFERENCES.program_type_group_cd,
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_stup
WHERE igs_en_timeslot_stup_id= x_igs_en_timeslot_stup_id
;
insert_row (
x_rowid,
X_sequence_number,
X_student_type,
X_assign_randomly,
X_surname_alphabet,
X_cal_type,
X_igs_en_timeslot_stup_id,
X_program_type_group_cd,
x_mode ,
X_ORG_ID);
update_row (
x_rowid,
x_sequence_number,
x_student_type,
x_assign_randomly,
x_surname_alphabet,
x_cal_type,
x_igs_en_timeslot_stup_id,
x_program_type_group_cd,
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_stup
WHERE ROWID = x_rowid;
p_action => 'DELETE',
x_rowid => X_ROWID
);
END delete_row;