The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_last_update_date IN DATE ,
x_last_updated_by IN NUMBER ,
x_last_update_login IN NUMBER ,
x_STUD_AUDIT_LIM IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 22-JUN-2001
|| Purpose : Initialises the Old and New references for the columns of the table.
|| Known 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_CPD_EXT_ALL
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');
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
Fnd_Message.Set_Name ('FND', 'FORM_RECORD_DELETED');
Fnd_Message.Set_Name ('FND', 'FORM_RECORD_DELETED');
SELECT rowid
FROM igs_en_cpd_ext_all
WHERE igs_en_cpd_ext_id = x_igs_en_cpd_ext_id
FOR UPDATE NOWAIT;
SELECT rowid
FROM igs_en_cpd_ext
WHERE enrolment_cat = x_enrolment_cat
AND enr_method_type = x_enr_method_type
AND s_enrolment_step_type = x_s_enrolment_step_type
AND s_student_comm_type = x_s_student_comm_type
AND ((l_rowid IS NULL) OR (rowid <> l_rowid));
SELECT rowid
FROM igs_en_cpd_ext_all
WHERE ((enrolment_cat = x_enrolment_cat));
SELECT rowid
FROM igs_en_cpd_ext_all
WHERE ((enr_method_type = x_enr_method_type));
SELECT rowid
FROM igs_en_cpd_ext_all
WHERE ((s_rule_call_cd = x_s_rule_call_cd));
SELECT rowid
FROM igs_en_cpd_ext_all
WHERE ((rul_sequence_number = x_sequence_number));
SELECT rowid
FROM IGS_EN_CPD_EXT_ALL
WHERE s_student_comm_type = x_s_student_comm_type;
SELECT rowid
FROM IGS_EN_CPD_EXT_ALL
WHERE s_enrolment_step_type = x_s_enrolment_step_type;
x_last_update_date IN DATE ,
x_last_updated_by IN NUMBER ,
x_last_update_login IN NUMBER ,
x_STUD_AUDIT_LIM IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 22-JUN-2001
|| Purpose : Initialises the columns, Checks Constraints, Calls the
|| Trigger Handlers for the table, before any DML operation.
|| Known 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_cpd_ext_id,
x_enrolment_cat,
x_enr_method_type,
x_s_student_comm_type,
x_step_order_num,
x_s_enrolment_step_type,
x_notification_flag,
x_s_rule_call_cd,
x_rul_sequence_number,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_stud_audit_lim
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation(
new_references.igs_en_cpd_ext_id
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to Before Update.
check_uniqueness;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation (
new_references.igs_en_cpd_ext_id
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
check_uniqueness;
PROCEDURE AfterStmtInsertUpdateDelete(
p_inserting IN BOOLEAN ,
p_updating IN BOOLEAN ,
p_deleting IN BOOLEAN
) AS
CURSOR c_cpdext (cp_enr_cat igs_en_cpd_ext_all.enrolment_cat%TYPE,
cp_enr_mth igs_en_cpd_ext_all.enr_method_type%TYPE,
cp_comm_type igs_en_cpd_ext_all.s_student_comm_type%TYPE,
cp_step_type igs_en_cpd_ext_all.s_enrolment_Step_type%TYPE) IS
SELECT 'x'
FROM igs_en_cpd_ext
WHERE enrolment_cat = cp_enr_cat
AND enr_method_type = cp_enr_mth
AND s_student_comm_type = cp_comm_type
AND s_enrolment_Step_type = cp_step_type;
SELECT rowid row_id,
enrolment_cat,
s_student_comm_type,
enr_method_type,
person_add_allow_ind,
course_add_allow_ind
FROM igs_en_cat_prc_dtl
WHERE enrolment_cat = cp_enr_cat
AND s_student_comm_type = cp_comm_type
AND enr_method_type = cp_enr_mth;
igs_en_cat_prc_dtl_pkg.update_row (
x_mode => 'R',
x_rowid => l_catprc.row_id,
x_enrolment_cat => l_catprc.enrolment_cat,
x_s_student_comm_type => l_catprc.s_student_comm_type,
x_enr_method_type => l_catprc.enr_method_type,
x_person_add_allow_ind => l_catprc.person_add_allow_ind,
x_course_add_allow_ind => l_catprc.course_add_allow_ind,
x_enforce_date_alias => NULL,
x_config_min_cp_valdn => NULL
);
END AfterStmtInsertUpdateDelete;
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.
AfterStmtInsertUpdateDelete(FALSE,FALSE,TRUE);
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_igs_en_cpd_ext_id IN OUT NOCOPY NUMBER,
x_enrolment_cat IN VARCHAR2,
x_enr_method_type IN VARCHAR2,
x_s_student_comm_type IN VARCHAR2,
x_step_order_num IN NUMBER,
x_s_enrolment_step_type IN VARCHAR2,
x_notification_flag IN VARCHAR2,
x_s_rule_call_cd IN VARCHAR2,
x_rul_sequence_number IN NUMBER,
x_mode IN VARCHAR2 ,
x_STUD_AUDIT_LIM IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 22-JUN-2001
|| Purpose : Handles the INSERT DML logic for the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
CURSOR c IS
SELECT rowid
FROM igs_en_cpd_ext_all
WHERE igs_en_cpd_ext_id = x_igs_en_cpd_ext_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_cpd_ext_s.NEXTVAL
INTO x_igs_en_cpd_ext_id
FROM dual;
p_action => 'INSERT',
x_rowid => x_rowid,
x_igs_en_cpd_ext_id => x_igs_en_cpd_ext_id,
x_enrolment_cat => x_enrolment_cat,
x_enr_method_type => x_enr_method_type,
x_s_student_comm_type => x_s_student_comm_type,
x_step_order_num => x_step_order_num,
x_s_enrolment_step_type => x_s_enrolment_step_type,
x_notification_flag => x_notification_flag,
x_s_rule_call_cd => x_s_rule_call_cd,
x_rul_sequence_number => x_rul_sequence_number,
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_stud_audit_lim => x_stud_audit_lim
);
INSERT INTO igs_en_cpd_ext_all (
igs_en_cpd_ext_id,
org_id,
enrolment_cat,
enr_method_type,
s_student_comm_type,
step_order_num,
s_enrolment_step_type,
notification_flag,
s_rule_call_cd,
rul_sequence_number,
stud_audit_lim,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login
) VALUES (
new_references.igs_en_cpd_ext_id,
new_references.org_id,
new_references.enrolment_cat,
new_references.enr_method_type,
new_references.s_student_comm_type,
new_references.step_order_num,
new_references.s_enrolment_step_type,
new_references.notification_flag,
new_references.s_rule_call_cd,
new_references.rul_sequence_number,
new_references.stud_audit_lim,
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;
SELECT
enrolment_cat,
enr_method_type,
s_student_comm_type,
step_order_num,
s_enrolment_step_type,
notification_flag,
s_rule_call_cd,
rul_sequence_number,
stud_audit_lim
FROM igs_en_cpd_ext_all
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_cpd_ext_id IN NUMBER,
x_enrolment_cat IN VARCHAR2,
x_enr_method_type IN VARCHAR2,
x_s_student_comm_type IN VARCHAR2,
x_step_order_num IN NUMBER,
x_s_enrolment_step_type IN VARCHAR2,
x_notification_flag IN VARCHAR2,
x_s_rule_call_cd IN VARCHAR2,
x_rul_sequence_number IN NUMBER,
x_mode IN VARCHAR2 ,
x_STUD_AUDIT_LIM IN NUMBER
) AS
/*
|| Created By : [email protected]
|| Created On : 22-JUN-2001
|| Purpose : Handles the UPDATE DML logic for the table.
|| Known 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_cpd_ext_id => x_igs_en_cpd_ext_id,
x_enrolment_cat => x_enrolment_cat,
x_enr_method_type => x_enr_method_type,
x_s_student_comm_type => x_s_student_comm_type,
x_step_order_num => x_step_order_num,
x_s_enrolment_step_type => x_s_enrolment_step_type,
x_notification_flag => x_notification_flag,
x_s_rule_call_cd => x_s_rule_call_cd,
x_rul_sequence_number => x_rul_sequence_number,
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_stud_audit_lim => x_stud_audit_lim
);
UPDATE igs_en_cpd_ext_all
SET
enrolment_cat = new_references.enrolment_cat,
enr_method_type = new_references.enr_method_type,
s_student_comm_type = new_references.s_student_comm_type,
step_order_num = new_references.step_order_num,
s_enrolment_step_type = new_references.s_enrolment_step_type,
notification_flag = new_references.notification_flag,
s_rule_call_cd = new_references.s_rule_call_cd,
rul_sequence_number = new_references.rul_sequence_number,
stud_audit_lim = new_references.stud_audit_lim,
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;
|| Purpose : Adds a row if there is no existing row, otherwise updates existing row in the table.
|| Known limitations, enhancements or remarks :
|| Change History :
|| Who When What
|| (reverse chronological order - newest change first)
*/
CURSOR c1 IS
SELECT rowid
FROM igs_en_cpd_ext_all
WHERE igs_en_cpd_ext_id = x_igs_en_cpd_ext_id;
insert_row (
x_rowid,
x_igs_en_cpd_ext_id,
x_enrolment_cat,
x_enr_method_type,
x_s_student_comm_type,
x_step_order_num,
x_s_enrolment_step_type,
x_notification_flag,
x_s_rule_call_cd,
x_rul_sequence_number,
x_mode,
x_stud_audit_lim
);
update_row (
x_rowid,
x_igs_en_cpd_ext_id,
x_enrolment_cat,
x_enr_method_type,
x_s_student_comm_type,
x_step_order_num,
x_s_enrolment_step_type,
x_notification_flag,
x_s_rule_call_cd,
x_rul_sequence_number,
x_mode,
x_stud_audit_lim
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*
|| Created By : [email protected]
|| Created On : 22-JUN-2001
|| Purpose : Handles the DELETE DML logic for the table.
|| Known 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_cpd_ext_all
WHERE rowid = x_rowid;
p_action => 'DELETE',
x_rowid => X_ROWID
);
END delete_row;