The following lines contain the word 'select', 'insert', 'update' or 'delete':
x_logical_delete_dt IN DATE DEFAULT NULL,
x_action_dt IN DATE DEFAULT NULL,
x_exam_cal_type IN VARCHAR2 DEFAULT NULL,
x_exam_ci_sequence_number IN NUMBER DEFAULT NULL,
x_creation_date IN DATE DEFAULT NULL,
x_created_by IN NUMBER DEFAULT NULL,
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,
x_grading_schema_cd IN VARCHAR2 DEFAULT NULL,
x_gs_version_number IN NUMBER DEFAULT NULL,
x_release_date IN DATE DEFAULT NULL,
x_description IN VARCHAR2 DEFAULT NULL,
x_unit_ass_item_group_id IN VARCHAR2 DEFAULT NULL,
x_midterm_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_midterm_weight_qty IN NUMBER DEFAULT NULL,
x_final_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_final_weight_qty IN NUMBER DEFAULT NULL
) AS
CURSOR cur_old_ref_values IS
SELECT *
FROM igs_as_unitass_item_all
WHERE ROWID = x_rowid;
AND (p_action NOT IN ('INSERT', 'VALIDATE_INSERT')) THEN
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
new_references.logical_delete_dt := x_logical_delete_dt;
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;
PROCEDURE beforerowinsertupdate1 (
p_inserting IN BOOLEAN DEFAULT FALSE,
p_updating IN BOOLEAN DEFAULT FALSE,
p_deleting IN BOOLEAN DEFAULT FALSE
) AS
v_message_name VARCHAR2 (30);
IF p_inserting
OR p_updating THEN
--
-- Validate assessment item exists
IF igs_as_val_uai.assp_val_ai_exists (
new_references.ass_id,
v_message_name
) = FALSE THEN
fnd_message.set_name ('IGS', v_message_name);
IF p_inserting THEN
--
-- If calendar type is closed, then prevent inserts.
IF igs_as_val_uai.crsp_val_uo_cal_type (
new_references.cal_type,
v_message_name
) = FALSE THEN
fnd_message.set_name ('IGS', v_message_name);
END beforerowinsertupdate1;
PROCEDURE beforerowinsertupdate2 (
p_inserting IN BOOLEAN DEFAULT FALSE,
p_updating IN BOOLEAN DEFAULT FALSE,
p_deleting IN BOOLEAN DEFAULT FALSE
) AS
CURSOR c_ci (
cp_cal_type igs_ca_inst.cal_type%TYPE,
cp_seq_number igs_ca_inst.sequence_number%TYPE
) IS
SELECT start_dt,
end_dt
FROM igs_ca_inst
WHERE cal_type = cp_cal_type
AND sequence_number = cp_seq_number;
IF p_inserting THEN
-- Temporary code to set the start/end date - to be replaced
-- with a database routine rather than an embedded cursor
-- Start and end date are carried down from UOP for sorting
-- purposes.
FOR v_ci_rec IN c_ci (
new_references.cal_type,
new_references.ci_sequence_number
) LOOP
new_references.ci_start_dt := v_ci_rec.start_dt;
IF p_inserting
OR p_updating THEN
-- Always update the action date when p_inserting/p_updating/p_deleting
-- a UAI. This enable mechanism for knowing when an item needs to
-- be added to a student.
-- Updates only pertain to changes for locn, um and ucl.
-- Please IGS_GE_NOTE that p_deleting a UAI is only a logical delete and
-- therefore really an update.
IF (NVL (new_references.dflt_item_ind, 'x') <>
NVL (old_references.dflt_item_ind, 'x')
OR NVL (
new_references.logical_delete_dt,
igs_ge_date.igsdate ('1900/01/01')
) <> NVL (
old_references.logical_delete_dt,
igs_ge_date.igsdate ('1900/01/01')
)
) THEN
IF NVL (old_references.action_dt, igs_ge_date.igsdate ('1900/01/01')) =
igs_ge_date.igsdate ('1900/01/01') THEN
new_references.action_dt := SYSDATE;
END beforerowinsertupdate2;
PROCEDURE afterrowinsertupdate3 (
p_inserting IN BOOLEAN DEFAULT FALSE,
p_updating IN BOOLEAN DEFAULT FALSE,
p_deleting IN BOOLEAN DEFAULT FALSE
) AS
v_message_name VARCHAR2 (30);
IF p_inserting
OR p_updating THEN
-- w.r.t Bug # 1956374 procedure assp_val_ai_exmnbl reference is changed
IF igs_as_val_aiem.assp_val_ai_exmnbl (
new_references.ass_id,
v_message_name
) = TRUE THEN
--
-- Validate that the reference number id unique within a UOP
IF igs_as_val_uai.assp_val_uai_uniqref (
new_references.unit_cd,
new_references.version_number,
new_references.cal_type,
new_references.ci_sequence_number,
new_references.sequence_number,
new_references.REFERENCE,
new_references.ass_id,
v_message_name
) = FALSE THEN
fnd_message.set_name ('IGS', v_message_name);
new_references.logical_delete_dt,
igs_ge_date.igsdate ('1900/01/01')
) = igs_ge_date.igsdate ('1900/01/01') THEN
-- Validate that the reference number id unique within a UOP
IF igs_as_val_uai.assp_val_uai_opt_ref (
new_references.unit_cd,
new_references.version_number,
new_references.cal_type,
new_references.ci_sequence_number,
new_references.sequence_number,
new_references.REFERENCE,
new_references.ass_id,
igs_as_gen_001.assp_get_ai_a_type (new_references.ass_id),
v_message_name
) = FALSE THEN
fnd_message.set_name ('IGS', v_message_name);
END afterrowinsertupdate3;
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_as_unitass_item_all
WHERE unit_ass_item_id = x_unit_ass_item_id
FOR UPDATE NOWAIT;
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE unit_cd = x_unit_cd
AND version_number = x_version_number
AND cal_type = x_cal_type
AND ci_sequence_number = x_ci_sequence_number
AND ass_id = x_ass_id
AND sequence_number = x_sequence_number
AND ((l_rowid IS NULL)
OR (ROWID <> l_rowid)
);
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE ass_id = x_ass_id;
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE exam_cal_type = x_cal_type;
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE grading_schema_cd = x_grading_schema_cd
AND version_number = x_version_number;
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE exam_cal_type = x_cal_type
AND exam_ci_sequence_number = x_sequence_number;
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE unit_cd = x_unit_cd
AND version_number = x_version_number
AND cal_type = x_cal_type
AND ci_sequence_number = x_ci_sequence_number;
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE unit_ass_item_group_id = x_unit_ass_item_group_id;
x_logical_delete_dt IN DATE DEFAULT NULL,
x_action_dt IN DATE DEFAULT NULL,
x_exam_cal_type IN VARCHAR2 DEFAULT NULL,
x_exam_ci_sequence_number IN NUMBER DEFAULT NULL,
x_creation_date IN DATE DEFAULT NULL,
x_created_by IN NUMBER DEFAULT NULL,
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,
x_grading_schema_cd IN VARCHAR2 DEFAULT NULL,
x_gs_version_number IN NUMBER DEFAULT NULL,
x_release_date IN DATE DEFAULT NULL,
x_description IN VARCHAR2 DEFAULT NULL,
x_unit_ass_item_group_id IN VARCHAR2 DEFAULT NULL,
x_midterm_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_midterm_weight_qty IN NUMBER DEFAULT NULL,
x_final_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_final_weight_qty IN NUMBER DEFAULT NULL
) AS
BEGIN
set_column_values (
p_action,
x_rowid,
x_unit_ass_item_id,
x_unit_cd,
x_version_number,
x_cal_type,
x_ci_sequence_number,
x_ass_id,
x_sequence_number,
x_ci_start_dt,
x_ci_end_dt,
x_unit_class,
x_unit_mode,
x_location_cd,
x_due_dt,
x_reference,
x_dflt_item_ind,
x_logical_delete_dt,
x_action_dt,
x_exam_cal_type,
x_exam_ci_sequence_number,
x_creation_date,
x_created_by,
x_last_update_date,
x_last_updated_by,
x_last_update_login,
x_org_id,
x_grading_schema_cd,
x_gs_version_number,
x_release_date,
x_description,
x_unit_ass_item_group_id,
x_midterm_mandatory_type_code,
x_midterm_weight_qty,
x_final_mandatory_type_code,
x_final_weight_qty
);
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to Before Insert.
beforerowinsertupdate1 (p_inserting => TRUE);
beforerowinsertupdate2 (p_inserting => TRUE);
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to Before Update.
beforerowinsertupdate1 (p_updating => TRUE);
beforerowinsertupdate2 (p_updating => TRUE);
ELSIF (p_action = 'DELETE') THEN
-- Call all the procedures related to Before Delete.
NULL;
ELSIF (p_action = 'VALIDATE_INSERT') THEN
IF get_pk_for_validation (new_references.unit_ass_item_id) THEN
fnd_message.set_name ('IGS', 'IGS_GE_MULTI_ORG_DUP_REC');
ELSIF (p_action = 'VALIDATE_UPDATE') THEN
check_constraints;
ELSIF (p_action = 'VALIDATE_DELETE') THEN
NULL;
IF (p_action = 'INSERT') THEN
-- Call all the procedures related to After Insert.
afterrowinsertupdate3 (p_inserting => TRUE);
ELSIF (p_action = 'UPDATE') THEN
-- Call all the procedures related to After Update.
afterrowinsertupdate3 (p_updating => TRUE);
PROCEDURE insert_row (
x_rowid IN OUT NOCOPY VARCHAR2,
x_unit_ass_item_id IN OUT NOCOPY NUMBER,
x_unit_cd IN VARCHAR2,
x_version_number IN NUMBER,
x_cal_type IN VARCHAR2,
x_ci_sequence_number IN NUMBER,
x_ass_id IN NUMBER,
x_sequence_number IN NUMBER,
x_ci_start_dt IN DATE,
x_ci_end_dt IN DATE,
x_unit_class IN VARCHAR2,
x_unit_mode IN VARCHAR2,
x_location_cd IN VARCHAR2,
x_due_dt IN DATE,
x_reference IN VARCHAR2,
x_dflt_item_ind IN VARCHAR2,
x_logical_delete_dt IN DATE,
x_action_dt IN DATE,
x_exam_cal_type IN VARCHAR2,
x_exam_ci_sequence_number IN NUMBER,
x_mode IN VARCHAR2 DEFAULT 'R',
x_org_id IN NUMBER,
x_grading_schema_cd IN VARCHAR2,
x_gs_version_number IN NUMBER,
x_release_date IN DATE,
x_description IN VARCHAR2,
x_unit_ass_item_group_id IN VARCHAR2 DEFAULT NULL,
x_midterm_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_midterm_weight_qty IN NUMBER DEFAULT NULL,
x_final_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_final_weight_qty IN NUMBER DEFAULT NULL
) AS
CURSOR c IS
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE unit_cd = x_unit_cd
AND version_number = x_version_number
AND cal_type = x_cal_type
AND ci_sequence_number = x_ci_sequence_number
AND ass_id = x_ass_id
AND sequence_number = x_sequence_number;
x_last_update_date DATE;
x_last_updated_by NUMBER;
x_last_update_login NUMBER;
x_program_update_date DATE;
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;
x_program_update_date := NULL;
x_program_update_date := SYSDATE;
p_action => 'INSERT',
x_rowid => x_rowid,
x_action_dt => x_action_dt,
x_unit_ass_item_id => x_unit_ass_item_id,
x_ass_id => x_ass_id,
x_cal_type => x_cal_type,
x_ci_end_dt => x_ci_end_dt,
x_ci_sequence_number => x_ci_sequence_number,
x_ci_start_dt => x_ci_start_dt,
x_dflt_item_ind => NVL (x_dflt_item_ind, 'Y'),
x_due_dt => x_due_dt,
x_exam_cal_type => x_exam_cal_type,
x_exam_ci_sequence_number => x_exam_ci_sequence_number,
x_location_cd => x_location_cd,
x_logical_delete_dt => x_logical_delete_dt,
x_reference => x_reference,
x_sequence_number => x_sequence_number,
x_unit_cd => x_unit_cd,
x_unit_class => x_unit_class,
x_unit_mode => x_unit_mode,
x_version_number => x_version_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_org_id => igs_ge_gen_003.get_org_id,
x_grading_schema_cd => x_grading_schema_cd,
x_gs_version_number => x_gs_version_number,
x_release_date => x_release_date,
x_description => x_description,
x_unit_ass_item_group_id => x_unit_ass_item_group_id,
x_midterm_mandatory_type_code => x_midterm_mandatory_type_code,
x_midterm_weight_qty => x_midterm_weight_qty,
x_final_mandatory_type_code => x_final_mandatory_type_code,
x_final_weight_qty => x_final_weight_qty
);
SELECT igs_as_unitass_item_s.NEXTVAL
INTO x_unit_ass_item_id
FROM DUAL;
INSERT INTO igs_as_unitass_item_all
(unit_ass_item_id, unit_cd,
version_number, cal_type,
ci_sequence_number, ass_id,
sequence_number, ci_start_dt,
ci_end_dt, unit_class,
unit_mode, location_cd,
due_dt, REFERENCE,
dflt_item_ind, logical_delete_dt,
action_dt, exam_cal_type,
exam_ci_sequence_number, org_id,
grading_schema_cd,
gs_version_number, release_date,
creation_date, created_by, last_update_date,
last_updated_by, last_update_login, request_id,
program_id, program_application_id, program_update_date,
description,
unit_ass_item_group_id,
midterm_mandatory_type_code,
midterm_weight_qty,
final_mandatory_type_code,
final_weight_qty)
VALUES (x_unit_ass_item_id, new_references.unit_cd,
new_references.version_number, new_references.cal_type,
new_references.ci_sequence_number, new_references.ass_id,
new_references.sequence_number, new_references.ci_start_dt,
new_references.ci_end_dt, new_references.unit_class,
new_references.unit_mode, new_references.location_cd,
new_references.due_dt, new_references.REFERENCE,
new_references.dflt_item_ind, new_references.logical_delete_dt,
new_references.action_dt, new_references.exam_cal_type,
new_references.exam_ci_sequence_number, new_references.org_id,
new_references.grading_schema_cd,
new_references.gs_version_number, new_references.release_date,
x_last_update_date, x_last_updated_by, x_last_update_date,
x_last_updated_by, x_last_update_login, x_request_id,
x_program_id, x_program_application_id, x_program_update_date,
new_references.description,
new_references.unit_ass_item_group_id,
new_references.midterm_mandatory_type_code,
new_references.midterm_weight_qty,
new_references.final_mandatory_type_code,
new_references.final_weight_qty
);
after_dml (p_action => 'INSERT', x_rowid => x_rowid);
END insert_row;
x_logical_delete_dt IN DATE,
x_action_dt IN DATE,
x_exam_cal_type IN VARCHAR2,
x_exam_ci_sequence_number IN NUMBER,
x_grading_schema_cd IN VARCHAR2,
x_gs_version_number IN NUMBER,
x_release_date IN DATE,
x_description IN VARCHAR2,
x_unit_ass_item_group_id IN VARCHAR2 DEFAULT NULL,
x_midterm_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_midterm_weight_qty IN NUMBER DEFAULT NULL,
x_final_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_final_weight_qty IN NUMBER DEFAULT NULL
) AS
CURSOR c1 IS
SELECT unit_ass_item_id,
ci_start_dt,
ci_end_dt,
due_dt,
REFERENCE,
dflt_item_ind,
logical_delete_dt,
action_dt,
exam_cal_type,
exam_ci_sequence_number,
grading_schema_cd,
gs_version_number,
release_date,
description,
unit_ass_item_group_id,
midterm_mandatory_type_code,
midterm_weight_qty,
final_mandatory_type_code,
final_weight_qty
FROM igs_as_unitass_item_all
WHERE ROWID = x_rowid
FOR UPDATE NOWAIT;
fnd_message.set_name ('FND', 'FORM_RECORD_DELETED');
AND ((TRUNC (tlinfo.logical_delete_dt) = TRUNC (x_logical_delete_dt))
OR ((tlinfo.logical_delete_dt IS NULL)
AND (x_logical_delete_dt IS NULL)
)
)
AND ((TRUNC (tlinfo.action_dt) = TRUNC (x_action_dt))
OR ((tlinfo.action_dt IS NULL)
AND (x_action_dt IS NULL)
)
)
AND ((tlinfo.exam_cal_type = x_exam_cal_type)
OR ((tlinfo.exam_cal_type IS NULL)
AND (x_exam_cal_type IS NULL)
)
)
AND ((tlinfo.exam_ci_sequence_number = x_exam_ci_sequence_number)
OR ((tlinfo.exam_ci_sequence_number IS NULL)
AND (x_exam_ci_sequence_number IS NULL)
)
)
AND ((tlinfo.grading_schema_cd = x_grading_schema_cd)
OR ((tlinfo.grading_schema_cd IS NULL)
AND (x_grading_schema_cd IS NULL)
)
)
AND ((tlinfo.gs_version_number = x_gs_version_number)
OR ((tlinfo.gs_version_number IS NULL)
AND (x_gs_version_number IS NULL)
)
)
AND ((TRUNC(tlinfo.release_date) = TRUNC(x_release_date))
OR ((tlinfo.release_date IS NULL)
AND (x_release_date IS NULL)
)
)
/* AND ((tlinfo.description = x_description)
OR ((tlinfo.description IS NULL)
AND (x_description IS NULL)
)
)*/
AND ((tlinfo.unit_ass_item_group_id = x_unit_ass_item_group_id)
OR ((tlinfo.unit_ass_item_group_id IS NULL)
AND (x_unit_ass_item_group_id IS NULL)
)
)
AND ((tlinfo.midterm_mandatory_type_code = x_midterm_mandatory_type_code)
OR ((tlinfo.midterm_mandatory_type_code IS NULL)
AND (x_midterm_mandatory_type_code IS NULL)
)
)
AND ((tlinfo.midterm_weight_qty = x_midterm_weight_qty)
OR ((tlinfo.midterm_weight_qty IS NULL)
AND (x_midterm_weight_qty IS NULL)
)
)
AND ((tlinfo.final_mandatory_type_code = x_final_mandatory_type_code)
OR ((tlinfo.final_mandatory_type_code IS NULL)
AND (x_final_mandatory_type_code IS NULL)
)
)
AND ((tlinfo.final_weight_qty = x_final_weight_qty)
OR ((tlinfo.final_weight_qty IS NULL)
AND (x_final_weight_qty IS NULL)
)
)
) THEN
NULL;
PROCEDURE update_row (
x_rowid IN VARCHAR2,
x_unit_ass_item_id IN NUMBER,
x_unit_cd IN VARCHAR2,
x_version_number IN NUMBER,
x_cal_type IN VARCHAR2,
x_ci_sequence_number IN NUMBER,
x_ass_id IN NUMBER,
x_sequence_number IN NUMBER,
x_ci_start_dt IN DATE,
x_ci_end_dt IN DATE,
x_unit_class IN VARCHAR2,
x_unit_mode IN VARCHAR2,
x_location_cd IN VARCHAR2,
x_due_dt IN DATE,
x_reference IN VARCHAR2,
x_dflt_item_ind IN VARCHAR2,
x_logical_delete_dt IN DATE,
x_action_dt IN DATE,
x_exam_cal_type IN VARCHAR2,
x_exam_ci_sequence_number IN NUMBER,
x_mode IN VARCHAR2 DEFAULT 'R',
x_grading_schema_cd IN VARCHAR2,
x_gs_version_number IN NUMBER,
x_release_date IN DATE,
x_description IN VARCHAR2,
x_unit_ass_item_group_id IN VARCHAR2 DEFAULT NULL,
x_midterm_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_midterm_weight_qty IN NUMBER DEFAULT NULL,
x_final_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_final_weight_qty IN NUMBER DEFAULT NULL
) AS
x_last_update_date DATE;
x_last_updated_by NUMBER;
x_last_update_login NUMBER;
x_program_update_date DATE;
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_action_dt => x_action_dt,
x_ass_id => x_ass_id,
x_cal_type => x_cal_type,
x_ci_end_dt => x_ci_end_dt,
x_ci_sequence_number => x_ci_sequence_number,
x_ci_start_dt => x_ci_start_dt,
x_dflt_item_ind => x_dflt_item_ind,
x_due_dt => x_due_dt,
x_exam_cal_type => x_exam_cal_type,
x_exam_ci_sequence_number => x_exam_ci_sequence_number,
x_location_cd => x_location_cd,
x_logical_delete_dt => x_logical_delete_dt,
x_reference => x_reference,
x_sequence_number => x_sequence_number,
x_unit_cd => x_unit_cd,
x_unit_class => x_unit_class,
x_unit_mode => x_unit_mode,
x_version_number => x_version_number,
x_grading_schema_cd => x_grading_schema_cd,
x_gs_version_number => x_gs_version_number,
x_release_date => x_release_date,
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_description => x_description,
x_unit_ass_item_group_id => x_unit_ass_item_group_id,
x_midterm_mandatory_type_code => x_midterm_mandatory_type_code,
x_midterm_weight_qty => x_midterm_weight_qty,
x_final_mandatory_type_code => x_final_mandatory_type_code,
x_final_weight_qty => x_final_weight_qty
);
x_program_update_date := old_references.program_update_date;
x_program_update_date := SYSDATE;
UPDATE igs_as_unitass_item_all
SET ci_start_dt = new_references.ci_start_dt,
ci_end_dt = new_references.ci_end_dt,
unit_class = new_references.unit_class,
unit_mode = new_references.unit_mode,
location_cd = new_references.location_cd,
due_dt = new_references.due_dt,
REFERENCE = new_references.REFERENCE,
dflt_item_ind = new_references.dflt_item_ind,
logical_delete_dt = new_references.logical_delete_dt,
action_dt = new_references.action_dt,
exam_cal_type = new_references.exam_cal_type,
exam_ci_sequence_number = new_references.exam_ci_sequence_number,
grading_schema_cd = new_references.grading_schema_cd,
gs_version_number = new_references.gs_version_number,
release_date = new_references.release_date,
last_update_date = x_last_update_date,
last_updated_by = x_last_updated_by,
last_update_login = x_last_update_login,
request_id = x_request_id,
program_id = x_program_id,
program_application_id = x_program_application_id,
program_update_date = x_program_update_date,
description = x_description,
unit_ass_item_group_id = x_unit_ass_item_group_id,
midterm_mandatory_type_code = x_midterm_mandatory_type_code,
midterm_weight_qty = x_midterm_weight_qty,
final_mandatory_type_code = x_final_mandatory_type_code,
final_weight_qty = x_final_weight_qty
WHERE ROWID = x_rowid;
after_dml (p_action => 'UPDATE', x_rowid => x_rowid);
END update_row;
x_logical_delete_dt IN DATE,
x_action_dt IN DATE,
x_exam_cal_type IN VARCHAR2,
x_exam_ci_sequence_number IN NUMBER,
x_mode IN VARCHAR2 DEFAULT 'R',
x_org_id IN NUMBER,
x_grading_schema_cd IN VARCHAR2,
x_gs_version_number IN NUMBER,
x_release_date IN DATE,
x_description IN VARCHAR2,
x_unit_ass_item_group_id IN VARCHAR2 DEFAULT NULL,
x_midterm_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_midterm_weight_qty IN NUMBER DEFAULT NULL,
x_final_mandatory_type_code IN VARCHAR2 DEFAULT NULL,
x_final_weight_qty IN NUMBER DEFAULT NULL
) AS
CURSOR c1 IS
SELECT ROWID
FROM igs_as_unitass_item_all
WHERE unit_cd = x_unit_cd
AND version_number = x_version_number
AND cal_type = x_cal_type
AND ci_sequence_number = x_ci_sequence_number
AND ass_id = x_ass_id
AND sequence_number = x_sequence_number;
insert_row (
x_rowid,
x_unit_ass_item_id,
x_unit_cd,
x_version_number,
x_cal_type,
x_ci_sequence_number,
x_ass_id,
x_sequence_number,
x_ci_start_dt,
x_ci_end_dt,
x_unit_class,
x_unit_mode,
x_location_cd,
x_due_dt,
x_reference,
x_dflt_item_ind,
x_logical_delete_dt,
x_action_dt,
x_exam_cal_type,
x_exam_ci_sequence_number,
x_mode,
x_org_id,
x_grading_schema_cd,
x_gs_version_number,
x_release_date,
x_description,
x_unit_ass_item_group_id,
x_midterm_mandatory_type_code,
x_midterm_weight_qty,
x_final_mandatory_type_code,
x_final_weight_qty
);
update_row (
x_rowid,
x_unit_ass_item_id,
x_unit_cd,
x_version_number,
x_cal_type,
x_ci_sequence_number,
x_ass_id,
x_sequence_number,
x_ci_start_dt,
x_ci_end_dt,
x_unit_class,
x_unit_mode,
x_location_cd,
x_due_dt,
x_reference,
x_dflt_item_ind,
x_logical_delete_dt,
x_action_dt,
x_exam_cal_type,
x_exam_ci_sequence_number,
x_mode,
x_grading_schema_cd,
x_gs_version_number,
x_release_date,
x_description,
x_unit_ass_item_group_id,
x_midterm_mandatory_type_code,
x_midterm_weight_qty,
x_final_mandatory_type_code,
x_final_weight_qty
);
PROCEDURE delete_row (x_rowid IN VARCHAR2) AS
BEGIN
before_dml (p_action => 'DELETE', x_rowid => x_rowid);
DELETE FROM igs_as_unitass_item_all
WHERE ROWID = x_rowid;
after_dml (p_action => 'DELETE', x_rowid => x_rowid);
END delete_row;