git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
73
Data/BulkLoad/EFT/Nominations/plsql/cg$bir_parameters.trg
Normal file
73
Data/BulkLoad/EFT/Nominations/plsql/cg$bir_parameters.trg
Normal file
@@ -0,0 +1,73 @@
|
||||
CREATE OR REPLACE TRIGGER EFT_NOM.cg$BIR_PARAMETERS
|
||||
|
||||
BEFORE INSERT ON PARAMETERS FOR EACH ROW
|
||||
DECLARE
|
||||
cg$rec cg$PARAMETERS.cg$row_type;
|
||||
cg$ind cg$PARAMETERS.cg$ind_type;
|
||||
BEGIN
|
||||
-- Application_logic Pre-Before-Insert-row <<Start>>
|
||||
-- Application_logic Pre-Before-Insert-row << End >>
|
||||
|
||||
-- Load cg$rec/cg$ind values from new
|
||||
|
||||
cg$rec.CREATED_BY := :new.CREATED_BY;
|
||||
IF (:new.CREATED_BY IS NULL) THEN
|
||||
cg$ind.CREATED_BY := FALSE;
|
||||
ELSE
|
||||
cg$ind.CREATED_BY := TRUE;
|
||||
END IF;
|
||||
cg$rec.PARS_ID := :new.PARS_ID;
|
||||
cg$ind.PARS_ID := TRUE;
|
||||
cg$rec.CODE := :new.CODE;
|
||||
cg$ind.CODE := TRUE;
|
||||
cg$rec.NAME := :new.NAME;
|
||||
cg$ind.NAME := TRUE;
|
||||
cg$rec.CATE_ID := :new.CATE_ID;
|
||||
cg$ind.CATE_ID := TRUE;
|
||||
cg$rec.CREATED_ON := :new.CREATED_ON;
|
||||
IF (:new.CREATED_ON IS NULL) THEN
|
||||
cg$ind.CREATED_ON := FALSE;
|
||||
ELSE
|
||||
cg$ind.CREATED_ON := TRUE;
|
||||
END IF;
|
||||
|
||||
if not (cg$PARAMETERS.called_from_package) then
|
||||
cg$PARAMETERS.validate_arc(cg$rec);
|
||||
cg$PARAMETERS.validate_domain(cg$rec);
|
||||
|
||||
cg$PARAMETERS.ins(cg$rec, cg$ind, FALSE);
|
||||
cg$PARAMETERS.called_from_package := FALSE;
|
||||
end if;
|
||||
|
||||
cg$PARAMETERS.cg$table(cg$PARAMETERS.idx).CREATED_BY := cg$rec.CREATED_BY;
|
||||
cg$PARAMETERS.cg$tableind(cg$PARAMETERS.idx).CREATED_BY := cg$ind.CREATED_BY;
|
||||
|
||||
cg$PARAMETERS.cg$table(cg$PARAMETERS.idx).PARS_ID := cg$rec.PARS_ID;
|
||||
cg$PARAMETERS.cg$tableind(cg$PARAMETERS.idx).PARS_ID := cg$ind.PARS_ID;
|
||||
|
||||
cg$PARAMETERS.cg$table(cg$PARAMETERS.idx).CODE := cg$rec.CODE;
|
||||
cg$PARAMETERS.cg$tableind(cg$PARAMETERS.idx).CODE := cg$ind.CODE;
|
||||
|
||||
cg$PARAMETERS.cg$table(cg$PARAMETERS.idx).NAME := cg$rec.NAME;
|
||||
cg$PARAMETERS.cg$tableind(cg$PARAMETERS.idx).NAME := cg$ind.NAME;
|
||||
|
||||
cg$PARAMETERS.cg$table(cg$PARAMETERS.idx).CATE_ID := cg$rec.CATE_ID;
|
||||
cg$PARAMETERS.cg$tableind(cg$PARAMETERS.idx).CATE_ID := cg$ind.CATE_ID;
|
||||
|
||||
cg$PARAMETERS.cg$table(cg$PARAMETERS.idx).CREATED_ON := cg$rec.CREATED_ON;
|
||||
cg$PARAMETERS.cg$tableind(cg$PARAMETERS.idx).CREATED_ON := cg$ind.CREATED_ON;
|
||||
|
||||
cg$PARAMETERS.idx := cg$PARAMETERS.idx + 1;
|
||||
|
||||
:new.CREATED_BY := cg$rec.CREATED_BY;
|
||||
:new.PARS_ID := cg$rec.PARS_ID;
|
||||
:new.CODE := cg$rec.CODE;
|
||||
:new.NAME := cg$rec.NAME;
|
||||
:new.CATE_ID := cg$rec.CATE_ID;
|
||||
:new.CREATED_ON := cg$rec.CREATED_ON;
|
||||
|
||||
-- Application_logic Post-Before-Insert-row <<Start>>
|
||||
-- Application_logic Post-Before-Insert-row << End >>
|
||||
END;
|
||||
/
|
||||
|
||||
Reference in New Issue
Block a user