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_ssn_txt IN VARCHAR2 ,
x_given_name_txt IN VARCHAR2 ,
x_sur_name_txt IN VARCHAR2 ,
x_birth_date IN DATE ,
x_address_txt IN VARCHAR2 ,
x_city_txt IN VARCHAR2 ,
x_zip_txt IN VARCHAR2 ,
x_gender_txt IN VARCHAR2 ,
x_email_id_txt IN VARCHAR2 ,
x_email_id_match IN NUMBER ,
x_gender_match IN NUMBER
) AS
/*
|| Created By : vivuyyur
|| Created On : 03-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 IGF_AP_MATCH_DETAILS
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 igf_ap_match_details
WHERE amd_id = x_amd_id
FOR UPDATE NOWAIT;
SELECT rowid
FROM igf_ap_match_details
WHERE ((apm_id = x_apm_id));
x_last_update_date IN DATE ,
x_last_updated_by IN NUMBER ,
x_last_update_login IN NUMBER ,
x_ssn_txt IN VARCHAR2 ,
x_given_name_txt IN VARCHAR2 ,
x_sur_name_txt IN VARCHAR2 ,
x_birth_date IN DATE ,
x_address_txt IN VARCHAR2 ,
x_city_txt IN VARCHAR2 ,
x_zip_txt IN VARCHAR2 ,
x_gender_txt IN VARCHAR2 ,
x_email_id_txt IN VARCHAR2 ,
x_email_id_match IN NUMBER ,
x_gender_match IN NUMBER
) AS
/*
|| Created By : vivuyyur
|| Created On : 03-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_amd_id,
x_apm_id,
x_person_id,
x_ssn_match,
x_given_name_match,
x_surname_match,
x_dob_match,
x_address_match,
x_city_match,
x_zip_match,
x_match_score,
x_record_status,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_ssn_txt,
x_given_name_txt,
x_sur_name_txt,
x_birth_date,
x_address_txt,
x_city_txt,
x_zip_txt,
x_gender_txt,
x_email_id_txt,
x_email_id_match,
x_gender_match
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation(
new_references.amd_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_parent_existance;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
-- Call all the procedures related to Before Insert.
IF ( get_pk_for_validation (
new_references.amd_id
)
) THEN
fnd_message.set_name('IGS','IGS_GE_RECORD_ALREADY_EXISTS');
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_amd_id IN OUT NOCOPY NUMBER,
x_apm_id IN NUMBER,
x_person_id IN NUMBER,
x_ssn_match IN NUMBER,
x_given_name_match IN NUMBER,
x_surname_match IN NUMBER,
x_dob_match IN NUMBER,
x_address_match IN NUMBER,
x_city_match IN NUMBER,
x_zip_match IN NUMBER,
x_match_score IN NUMBER,
x_record_status IN VARCHAR2,
x_mode IN VARCHAR2,
x_ssn_txt IN VARCHAR2 ,
x_given_name_txt IN VARCHAR2 ,
x_sur_name_txt IN VARCHAR2 ,
x_birth_date IN DATE ,
x_address_txt IN VARCHAR2 ,
x_city_txt IN VARCHAR2 ,
x_zip_txt IN VARCHAR2 ,
x_gender_txt IN VARCHAR2 ,
x_email_id_txt IN VARCHAR2 ,
x_email_id_match IN NUMBER ,
x_gender_match IN NUMBER
) AS
/*
|| Created By : vivuyyur
|| Created On : 03-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 igf_ap_match_details
WHERE amd_id = x_amd_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 igf_ap_match_details_s.NEXTVAL
INTO x_amd_id
FROM dual;
p_action => 'INSERT',
x_rowid => x_rowid,
x_amd_id => x_amd_id,
x_apm_id => x_apm_id,
x_person_id => x_person_id,
x_ssn_match => x_ssn_match,
x_given_name_match => x_given_name_match,
x_surname_match => x_surname_match,
x_dob_match => x_dob_match,
x_address_match => x_address_match,
x_city_match => x_city_match,
x_zip_match => x_zip_match,
x_match_score => x_match_score,
x_record_status => x_record_status,
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_ssn_txt => x_ssn_txt,
x_given_name_txt => x_given_name_txt,
x_sur_name_txt => x_sur_name_txt,
x_birth_date => x_birth_date,
x_address_txt => x_address_txt,
x_city_txt => x_city_txt,
x_zip_txt => x_zip_txt,
x_gender_txt => x_gender_txt,
x_email_id_txt => x_email_id_txt,
x_email_id_match => x_email_id_match,
x_gender_match => x_gender_match
);
INSERT INTO igf_ap_match_details (
amd_id,
apm_id,
person_id,
ssn_match,
given_name_match,
surname_match,
dob_match,
address_match,
city_match,
zip_match,
match_score,
record_status,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
ssn_txt,
given_name_txt,
sur_name_txt,
birth_date,
address_txt,
city_txt,
zip_txt,
gender_txt,
email_id_txt,
email_id_match,
gender_match
) VALUES (
new_references.amd_id,
new_references.apm_id,
new_references.person_id,
new_references.ssn_match,
new_references.given_name_match,
new_references.surname_match,
new_references.dob_match,
new_references.address_match,
new_references.city_match,
new_references.zip_match,
new_references.match_score,
new_references.record_status,
x_last_update_date,
x_last_updated_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
new_references.ssn_txt,
new_references.given_name_txt,
new_references.sur_name_txt,
new_references.birth_date,
new_references.address_txt,
new_references.city_txt,
new_references.zip_txt,
new_references.gender_txt,
new_references.email_id_txt,
new_references.email_id_match,
new_references.gender_match
);
END insert_row;
SELECT
apm_id,
person_id,
ssn_match,
given_name_match,
surname_match,
dob_match,
address_match,
city_match,
zip_match,
match_score,
record_status,
ssn_txt,
given_name_txt,
sur_name_txt,
birth_date,
address_txt,
city_txt,
zip_txt,
gender_txt,
email_id_txt,
email_id_match,
gender_match
FROM igf_ap_match_details
WHERE rowid = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name('FND', 'FORM_RECORD_DELETED');
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_amd_id IN NUMBER,
x_apm_id IN NUMBER,
x_person_id IN NUMBER,
x_ssn_match IN NUMBER,
x_given_name_match IN NUMBER,
x_surname_match IN NUMBER,
x_dob_match IN NUMBER,
x_address_match IN NUMBER,
x_city_match IN NUMBER,
x_zip_match IN NUMBER,
x_match_score IN NUMBER,
x_record_status IN VARCHAR2,
x_mode IN VARCHAR2,
x_ssn_txt IN VARCHAR2 ,
x_given_name_txt IN VARCHAR2 ,
x_sur_name_txt IN VARCHAR2 ,
x_birth_date IN DATE ,
x_address_txt IN VARCHAR2 ,
x_city_txt IN VARCHAR2 ,
x_zip_txt IN VARCHAR2 ,
x_gender_txt IN VARCHAR2 ,
x_email_id_txt IN VARCHAR2 ,
x_email_id_match IN NUMBER ,
x_gender_match IN NUMBER
) AS
/*
|| Created By : vivuyyur
|| Created On : 03-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_amd_id => x_amd_id,
x_apm_id => x_apm_id,
x_person_id => x_person_id,
x_ssn_match => x_ssn_match,
x_given_name_match => x_given_name_match,
x_surname_match => x_surname_match,
x_dob_match => x_dob_match,
x_address_match => x_address_match,
x_city_match => x_city_match,
x_zip_match => x_zip_match,
x_match_score => x_match_score,
x_record_status => x_record_status,
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_ssn_txt => x_ssn_txt,
x_given_name_txt => x_given_name_txt,
x_sur_name_txt => x_sur_name_txt,
x_birth_date => x_birth_date,
x_address_txt => x_address_txt,
x_city_txt => x_city_txt,
x_zip_txt => x_zip_txt,
x_gender_txt => x_gender_txt,
x_email_id_txt => x_email_id_txt,
x_email_id_match => x_email_id_match,
x_gender_match => x_gender_match
);
UPDATE igf_ap_match_details
SET
apm_id = new_references.apm_id,
person_id = new_references.person_id,
ssn_match = new_references.ssn_match,
given_name_match = new_references.given_name_match,
surname_match = new_references.surname_match,
dob_match = new_references.dob_match,
address_match = new_references.address_match,
city_match = new_references.city_match,
zip_match = new_references.zip_match,
match_score = new_references.match_score,
record_status = new_references.record_status,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login,
ssn_txt = new_references.ssn_txt,
given_name_txt = new_references.given_name_txt,
sur_name_txt = new_references.sur_name_txt,
birth_date = new_references.birth_date,
address_txt = new_references.address_txt,
city_txt = new_references.city_txt,
zip_txt = new_references.zip_txt,
gender_txt = new_references.gender_txt,
email_id_txt = new_references.email_id_txt,
email_id_match = new_references.email_id_match,
gender_match = new_references.gender_match
WHERE 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 igf_ap_match_details
WHERE amd_id = x_amd_id;
insert_row (
x_rowid,
x_amd_id,
x_apm_id,
x_person_id,
x_ssn_match,
x_given_name_match,
x_surname_match,
x_dob_match,
x_address_match,
x_city_match,
x_zip_match,
x_match_score,
x_record_status,
x_mode,
x_ssn_txt,
x_given_name_txt,
x_sur_name_txt,
x_birth_date ,
x_address_txt,
x_city_txt ,
x_zip_txt ,
x_gender_txt ,
x_email_id_txt ,
x_email_id_match,
x_gender_match
);
update_row (
x_rowid,
x_amd_id,
x_apm_id,
x_person_id,
x_ssn_match,
x_given_name_match,
x_surname_match,
x_dob_match,
x_address_match,
x_city_match,
x_zip_match,
x_match_score,
x_record_status,
x_mode ,
x_ssn_txt,
x_given_name_txt,
x_sur_name_txt,
x_birth_date ,
x_address_txt,
x_city_txt ,
x_zip_txt ,
x_gender_txt ,
x_email_id_txt ,
x_email_id_match,
x_gender_match
);
PROCEDURE delete_row (
x_rowid IN VARCHAR2
) AS
/*
|| Created By : vivuyyur
|| Created On : 03-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 igf_ap_match_details
WHERE rowid = x_rowid;
END delete_row;