1: package body PA_PROJ_STRUCTURE_TYPES_PKG as
2: /*$Header: PAXPSTTB.pls 120.1 2005/08/19 17:18:23 mwasowic noship $*/
3:
4: -- API name : insert_row
5: -- Type : Table Handlers
35: , X_ATTRIBUTE14 VARCHAR2
36: , X_ATTRIBUTE15 VARCHAR2
37: )
38: IS
39: cursor c is select rowid from pa_proj_structure_types
40: where proj_structure_type_id = X_PROJ_STRUCTURE_TYPE_ID;
41: cursor c2 is select pa_proj_structure_types_s.nextval from sys.dual;
42: BEGIN
43: if (X_PROJ_STRUCTURE_TYPE_ID IS NULL) then
37: )
38: IS
39: cursor c is select rowid from pa_proj_structure_types
40: where proj_structure_type_id = X_PROJ_STRUCTURE_TYPE_ID;
41: cursor c2 is select pa_proj_structure_types_s.nextval from sys.dual;
42: BEGIN
43: if (X_PROJ_STRUCTURE_TYPE_ID IS NULL) then
44: open c2;
45: fetch c2 into X_PROJ_STRUCTURE_TYPE_ID;
45: fetch c2 into X_PROJ_STRUCTURE_TYPE_ID;
46: close c2;
47: end if;
48:
49: INSERT INTO PA_PROJ_STRUCTURE_TYPES(
50: PROJ_STRUCTURE_TYPE_ID
51: ,PROJ_ELEMENT_ID
52: ,STRUCTURE_TYPE_ID
53: ,CREATION_DATE
147: , X_ATTRIBUTE15 VARCHAR2
148: )
149: IS
150: BEGIN
151: UPDATE PA_PROJ_STRUCTURE_TYPES
152: SET
153: PROJ_STRUCTURE_TYPE_ID = X_PROJ_STRUCTURE_TYPE_ID
154: , PROJ_ELEMENT_ID = X_PROJ_ELEMENT_ID
155: , STRUCTURE_TYPE_ID = X_STRUCTURE_TYPE_ID
196: X_ROWID VARCHAR2
197: )
198: IS
199: BEGIN
200: DELETE FROM PA_PROJ_STRUCTURE_TYPES
201: WHERE ROWID = X_ROWID;
202:
203: if (SQL%NOTFOUND) then
204: Raise NO_DATA_FOUND;
205: end if;
206: END;
207:
208:
209: end PA_PROJ_STRUCTURE_TYPES_PKG;