git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@50874 248e525c-4dfb-0310-94bc-949c084e9493

This commit is contained in:
andrew.gilmore
2012-03-19 11:57:19 +00:00
parent 2a0f4900c3
commit 0e9ca75d77
1587 changed files with 500863 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
CREATE OR REPLACE TRIGGER "EFT_NOM".cg$BIR_CONTACT_DETAILS
BEFORE INSERT ON CONTACT_DETAILS FOR EACH ROW
DECLARE
cg$rec cg$CONTACT_DETAILS.cg$row_type;
cg$ind cg$CONTACT_DETAILS.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.CODE_ID := :new.CODE_ID;
cg$ind.CODE_ID := TRUE;
cg$rec.DESCRIPTION := :new.DESCRIPTION;
cg$ind.DESCRIPTION := 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$CONTACT_DETAILS.called_from_package) then
cg$CONTACT_DETAILS.validate_arc(cg$rec);
cg$CONTACT_DETAILS.validate_domain(cg$rec);
cg$CONTACT_DETAILS.ins(cg$rec, cg$ind, FALSE);
cg$CONTACT_DETAILS.called_from_package := FALSE;
end if;
cg$CONTACT_DETAILS.cg$table(cg$CONTACT_DETAILS.idx).CREATED_BY := cg$rec.CREATED_BY;
cg$CONTACT_DETAILS.cg$tableind(cg$CONTACT_DETAILS.idx).CREATED_BY := cg$ind.CREATED_BY;
cg$CONTACT_DETAILS.cg$table(cg$CONTACT_DETAILS.idx).CODE_ID := cg$rec.CODE_ID;
cg$CONTACT_DETAILS.cg$tableind(cg$CONTACT_DETAILS.idx).CODE_ID := cg$ind.CODE_ID;
cg$CONTACT_DETAILS.cg$table(cg$CONTACT_DETAILS.idx).DESCRIPTION := cg$rec.DESCRIPTION;
cg$CONTACT_DETAILS.cg$tableind(cg$CONTACT_DETAILS.idx).DESCRIPTION := cg$ind.DESCRIPTION;
cg$CONTACT_DETAILS.cg$table(cg$CONTACT_DETAILS.idx).CREATED_ON := cg$rec.CREATED_ON;
cg$CONTACT_DETAILS.cg$tableind(cg$CONTACT_DETAILS.idx).CREATED_ON := cg$ind.CREATED_ON;
cg$CONTACT_DETAILS.idx := cg$CONTACT_DETAILS.idx + 1;
:new.CREATED_BY := cg$rec.CREATED_BY;
:new.CODE_ID := cg$rec.CODE_ID;
:new.DESCRIPTION := cg$rec.DESCRIPTION;
:new.CREATED_ON := cg$rec.CREATED_ON;
-- Application_logic Post-Before-Insert-row <<Start>>
-- Application_logic Post-Before-Insert-row << End >>
END;
/