-- $Header: whdev/2.0/owb/shiphome/owb/reposasst/upg/partition.sql /main/2 2010/12/20 01:00:01 dawsun Exp $ -- Create sql in-place upgrade patch for partition enhancement in owb 11.2.0.3. -- -- Note: PLEASE connect as OWBSYS before execute the file. -- SET SERVEROUTPUT ON SET LINESIZE 500 -- ########################################################################## DECLARE -- Outer block for utility functions/variables BUGBUG: Should these be packagized (uprop_util) -- ########################################################################## SCRIPTID CONSTANT VARCHAR2(40) := 'bug 8437739'; -- For output logging EOL CONSTANT VARCHAR2(01) := CHR(10); -- new line TRACEON CONSTANT BOOLEAN := TRUE; -- Provide function level trace output OUTINITED BOOLEAN := FALSE; -- Flag indicating output has been enabled PROPERTYTYPE_CORE NUMBER:= 0; PROPERTYTYPE_LOGICAL NUMBER:= 1; PROPERTYTYPE_PHYSICAL NUMBER:= 2; PROPERTYTYPE_CONFIGURATION NUMBER:= 2; PROPERTYTYPE_USERDEFINED NUMBER:= 3; -- Record definitions for the various views -- Handy sql to make record definitions (some hand editing required (in sqlworksheet anyway) -- ========================================================================== TYPE CMPPrimitiveType IS RECORD ( -- ========================================================================== WORKSPACEID CMPPrimitiveType_r.WORKSPACEID%TYPE DEFAULT 1 -- NUMBER(9,0) 1 ,DELETIONPARENT CMPPrimitiveType_r.DELETIONPARENT%TYPE DEFAULT null -- NUMBER(9,0) 2 ,AGGREGATEDSIGNATURE CMPPrimitiveType_r.AGGREGATEDSIGNATURE%TYPE DEFAULT null --sysdate -- TIMESTAMP(6) 3 ,CLASSNAME CMPPrimitiveType_r.CLASSNAME%TYPE DEFAULT 'CMPPrimitiveType' -- VARCHAR2(255) 4 ,COMPLETED CMPPrimitiveType_r.COMPLETED%TYPE DEFAULT 1 -- CHAR(1) 5 ,CREATEDBY CMPPrimitiveType_r.CREATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 6 ,CREATIONTIMESTAMP CMPPrimitiveType_r.CREATIONTIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 7 ,CUSTOMERDELETABLE CMPPrimitiveType_r.CUSTOMERDELETABLE%TYPE DEFAULT 1 -- CHAR(1) 8 ,CUSTOMERRENAMABLE CMPPrimitiveType_r.CUSTOMERRENAMABLE%TYPE DEFAULT 0 -- CHAR(1) 9 ,DELETEINOVERRIDE CMPPrimitiveType_r.DELETEINOVERRIDE%TYPE DEFAULT 0 -- CHAR(1) 10 ,DESCRIPTION CMPPrimitiveType_r.DESCRIPTION%TYPE DEFAULT null --DEFINITIONKEY -- VARCHAR2(4000) 11 ,EDITABLE CMPPrimitiveType_r.EDITABLE%TYPE DEFAULT 1 -- CHAR(1) 12 ,ELEMENTID CMPPrimitiveType_r.ELEMENTID%TYPE DEFAULT null --ELEMENTID -- NUMBER(9,0) 13 ,IMPORTED CMPPrimitiveType_r.IMPORTED%TYPE DEFAULT 0 -- CHAR(1) 14 ,LOGICALNAME CMPPrimitiveType_r.LOGICALNAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 15 ,METADATASIGNATURE CMPPrimitiveType_r.METADATASIGNATURE%TYPE DEFAULT null --METADATASIGNATURE -- VARCHAR2(255) 16 ,NAME CMPPrimitiveType_r.NAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 17 ,NOTE CMPPrimitiveType_r.NOTE%TYPE DEFAULT null -- VARCHAR2(4000) 18 ,NOTM CMPPrimitiveType_r.NOTM%TYPE DEFAULT 0 -- NUMBER(9,0) 19 ,OVERRIDEATTRIBUTES CMPPrimitiveType_r.OVERRIDEATTRIBUTES%TYPE DEFAULT 0 -- CHAR(1) 20 ,OVERRIDECHILDREN CMPPrimitiveType_r.OVERRIDECHILDREN%TYPE DEFAULT 0 -- CHAR(1) 21 ,OVERRIDEROLES CMPPrimitiveType_r.OVERRIDEROLES%TYPE DEFAULT 0 -- CHAR(1) 22 ,PERSISTENT CMPPrimitiveType_r.PERSISTENT%TYPE DEFAULT 1 -- CHAR(1) 23 ,SEEDED CMPPrimitiveType_r.SEEDED%TYPE DEFAULT 0 -- CHAR(1) 24 ,STRONGTYPENAME CMPPrimitiveType_r.STRONGTYPENAME%TYPE DEFAULT null -- VARCHAR2(255) 25 ,UOID CMPPrimitiveType_r.UOID%TYPE DEFAULT null --UOID -- VARCHAR2(40) 26 ,UPDATEDBY CMPPrimitiveType_r.UPDATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 27 ,UPDATETIMESTAMP CMPPrimitiveType_r.UPDATETIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 28 ,ICONOBJECT CMPPrimitiveType_r.ICONOBJECT%TYPE DEFAULT null -- NUMBER(9,0) 29 ,EDITORCLASSNAME CMPPrimitiveType_r.EDITORCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 30 ,PROPERTYSHEETCLASSNAME CMPPrimitiveType_r.PROPERTYSHEETCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 31 ,WIZARDCLASSNAME CMPPrimitiveType_r.WIZARDCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 32 ,COMPARATOR CMPPrimitiveType_r.COMPARATOR%TYPE DEFAULT 'oracle.wh.repos.impl.domain.comparator.PrimitiveValueComparator' -- VARCHAR2(255) 33 ,OWNINGMODEL CMPPrimitiveType_r.OWNINGMODEL%TYPE DEFAULT null -- NUMBER(9,0) 34 ,ACLCONTAINER CMPPrimitiveType_r.ACLCONTAINER%TYPE DEFAULT null -- NUMBER(9,0) 35 ,VALIDATIONRESULT CMPPrimitiveType_r.VALIDATIONRESULT%TYPE DEFAULT null -- NUMBER(9,0) 36 ,OWNINGFOLDER CMPPrimitiveType_r.OWNINGFOLDER%TYPE DEFAULT null -- NUMBER(9,0) 37 ,POSITION CMPPrimitiveType_r.POSITION%TYPE DEFAULT 0 -- NUMBER(9,0) 38 ,FORMATOR CMPPrimitiveType_r.FORMATOR%TYPE DEFAULT null -- VARCHAR2(255) 39 ); -- ========================================================================== TYPE CMPAnonymousDomain IS RECORD ( -- ========================================================================== WORKSPACEID CMPAnonymousDomain_r.WORKSPACEID%TYPE DEFAULT 1 -- NUMBER(9,0) 1 ,DELETIONPARENT CMPAnonymousDomain_r.DELETIONPARENT%TYPE DEFAULT null -- NUMBER(9,0) 2 ,AGGREGATEDSIGNATURE CMPAnonymousDomain_r.AGGREGATEDSIGNATURE%TYPE DEFAULT null -- TIMESTAMP(6) 3 ,CLASSNAME CMPAnonymousDomain_r.CLASSNAME%TYPE DEFAULT 'CMPAnonymousDomain' -- VARCHAR2(255) 4 ,COMPLETED CMPAnonymousDomain_r.COMPLETED%TYPE DEFAULT 1 -- CHAR(1) 5 ,CREATEDBY CMPAnonymousDomain_r.CREATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 6 ,CREATIONTIMESTAMP CMPAnonymousDomain_r.CREATIONTIMESTAMP%TYPE DEFAULT null -- DATE 7 ,CUSTOMERDELETABLE CMPAnonymousDomain_r.CUSTOMERDELETABLE%TYPE DEFAULT 1 -- CHAR(1) 8 ,CUSTOMERRENAMABLE CMPAnonymousDomain_r.CUSTOMERRENAMABLE%TYPE DEFAULT 0 -- CHAR(1) 9 ,DELETEINOVERRIDE CMPAnonymousDomain_r.DELETEINOVERRIDE%TYPE DEFAULT 0 -- CHAR(1) 10 ,DESCRIPTION CMPAnonymousDomain_r.DESCRIPTION%TYPE DEFAULT null --DEFINITIONKEY -- VARCHAR2(4000) 11 ,EDITABLE CMPAnonymousDomain_r.EDITABLE%TYPE DEFAULT 1 -- CHAR(1) 12 ,ELEMENTID CMPAnonymousDomain_r.ELEMENTID%TYPE DEFAULT null --ELEMENTID -- NUMBER(9,0) 13 ,IMPORTED CMPAnonymousDomain_r.IMPORTED%TYPE DEFAULT 0 -- CHAR(1) 14 ,LOGICALNAME CMPAnonymousDomain_r.LOGICALNAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 15 ,METADATASIGNATURE CMPAnonymousDomain_r.METADATASIGNATURE%TYPE DEFAULT null --METADATASIGNATURE -- VARCHAR2(255) 16 ,NAME CMPAnonymousDomain_r.NAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 17 ,NOTE CMPAnonymousDomain_r.NOTE%TYPE DEFAULT null -- VARCHAR2(4000) 18 ,NOTM CMPAnonymousDomain_r.NOTM%TYPE DEFAULT 1 -- NUMBER(9,0) 19 ,OVERRIDEATTRIBUTES CMPAnonymousDomain_r.OVERRIDEATTRIBUTES%TYPE DEFAULT 0 -- CHAR(1) 20 ,OVERRIDECHILDREN CMPAnonymousDomain_r.OVERRIDECHILDREN%TYPE DEFAULT 0 -- CHAR(1) 21 ,OVERRIDEROLES CMPAnonymousDomain_r.OVERRIDEROLES%TYPE DEFAULT 0 -- CHAR(1) 22 ,PERSISTENT CMPAnonymousDomain_r.PERSISTENT%TYPE DEFAULT 1 -- CHAR(1) 23 ,SEEDED CMPAnonymousDomain_r.SEEDED%TYPE DEFAULT 0 -- CHAR(1) 24 ,STRONGTYPENAME CMPAnonymousDomain_r.STRONGTYPENAME%TYPE DEFAULT null -- VARCHAR2(255) 25 ,UOID CMPAnonymousDomain_r.UOID%TYPE DEFAULT null --UOID -- VARCHAR2(40) 26 ,UPDATEDBY CMPAnonymousDomain_r.UPDATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 27 ,UPDATETIMESTAMP CMPAnonymousDomain_r.UPDATETIMESTAMP%TYPE DEFAULT null -- DATE 28 ,ICONOBJECT CMPAnonymousDomain_r.ICONOBJECT%TYPE DEFAULT null -- NUMBER(9,0) 29 ,EDITORCLASSNAME CMPAnonymousDomain_r.EDITORCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 30 ,PROPERTYSHEETCLASSNAME CMPAnonymousDomain_r.PROPERTYSHEETCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 31 ,WIZARDCLASSNAME CMPAnonymousDomain_r.WIZARDCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 32 ,COMPARATOR CMPAnonymousDomain_r.COMPARATOR%TYPE DEFAULT 'oracle.wh.repos.impl.domain.comparator.PrimitiveValueComparator' -- VARCHAR2(255) 33 ,OWNINGMODEL CMPAnonymousDomain_r.OWNINGMODEL%TYPE DEFAULT null -- NUMBER(9,0) 34 ,CHOOSER CMPAnonymousDomain_r.CHOOSER%TYPE DEFAULT null -- VARCHAR2(255) 35 ,DATATYPEAGSG CMPAnonymousDomain_r.DATATYPEAGSG%TYPE DEFAULT null -- TIMESTAMP(6) 36 ,DATATYPEFQN CMPAnonymousDomain_r.DATATYPEFQN%TYPE DEFAULT null -- VARCHAR2(4000) 37 ,DATATYPELUPD CMPAnonymousDomain_r.DATATYPELUPD%TYPE DEFAULT null -- TIMESTAMP(6) 38 ,DATATYPEUOID CMPAnonymousDomain_r.DATATYPEUOID%TYPE DEFAULT null -- VARCHAR2(40) 39 ,USERCHOICEALLOWED CMPAnonymousDomain_r.USERCHOICEALLOWED%TYPE DEFAULT 0 -- CHAR(1) 40 ,VALUEINTERPRETER CMPAnonymousDomain_r.VALUEINTERPRETER%TYPE DEFAULT null -- VARCHAR2(255) 41 ,DATATYPE CMPAnonymousDomain_r.DATATYPE%TYPE DEFAULT null -- NUMBER(9,0) 42 ,ACLCONTAINER CMPAnonymousDomain_r.ACLCONTAINER%TYPE DEFAULT null -- NUMBER(9,0) 43 ,VALIDATIONRESULT CMPAnonymousDomain_r.VALIDATIONRESULT%TYPE DEFAULT null -- NUMBER(9,0) 44 ,OWNINGFOLDER CMPAnonymousDomain_r.OWNINGFOLDER%TYPE DEFAULT null -- NUMBER(9,0) 45 ,POSITION CMPAnonymousDomain_r.POSITION%TYPE DEFAULT 0 -- NUMBER(9,0) 46 ); -- ========================================================================== TYPE CMPPrimitiveModelAttribute IS RECORD ( -- ========================================================================== WORKSPACEID CMPPrimitiveModelAttribute_r.WORKSPACEID%TYPE DEFAULT 1 -- NUMBER(9,0) 1 ,DELETIONPARENT CMPPrimitiveModelAttribute_r.DELETIONPARENT%TYPE DEFAULT null -- NUMBER(9,0) 2 ,AGGREGATEDSIGNATURE CMPPrimitiveModelAttribute_r.AGGREGATEDSIGNATURE%TYPE DEFAULT null --sysdate -- TIMESTAMP(6) 3 ,CLASSNAME CMPPrimitiveModelAttribute_r.CLASSNAME%TYPE DEFAULT 'CMPPrimitiveModelAttribute' -- VARCHAR2(255) 4 ,COMPLETED CMPPrimitiveModelAttribute_r.COMPLETED%TYPE DEFAULT 1 -- CHAR(1) 5 ,CREATEDBY CMPPrimitiveModelAttribute_r.CREATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 6 ,CREATIONTIMESTAMP CMPPrimitiveModelAttribute_r.CREATIONTIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 7 ,CUSTOMERDELETABLE CMPPrimitiveModelAttribute_r.CUSTOMERDELETABLE%TYPE DEFAULT 1 -- CHAR(1) 8 ,CUSTOMERRENAMABLE CMPPrimitiveModelAttribute_r.CUSTOMERRENAMABLE%TYPE DEFAULT 0 -- CHAR(1) 9 ,DELETEINOVERRIDE CMPPrimitiveModelAttribute_r.DELETEINOVERRIDE%TYPE DEFAULT 0 -- CHAR(1) 10 ,DESCRIPTION CMPPrimitiveModelAttribute_r.DESCRIPTION%TYPE DEFAULT null --DEFINITIONKEY -- VARCHAR2(4000) 11 ,EDITABLE CMPPrimitiveModelAttribute_r.EDITABLE%TYPE DEFAULT 1 -- CHAR(1) 12 ,ELEMENTID CMPPrimitiveModelAttribute_r.ELEMENTID%TYPE DEFAULT null --ELEMENTID -- NUMBER(9,0) 13 ,IMPORTED CMPPrimitiveModelAttribute_r.IMPORTED%TYPE DEFAULT 0 -- CHAR(1) 14 ,LOGICALNAME CMPPrimitiveModelAttribute_r.LOGICALNAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 15 ,METADATASIGNATURE CMPPrimitiveModelAttribute_r.METADATASIGNATURE%TYPE DEFAULT null --METADATASIGNATURE -- VARCHAR2(255) 16 ,NAME CMPPrimitiveModelAttribute_r.NAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 17 ,NOTE CMPPrimitiveModelAttribute_r.NOTE%TYPE DEFAULT null -- VARCHAR2(4000) 18 ,NOTM CMPPrimitiveModelAttribute_r.NOTM%TYPE DEFAULT 0 -- NUMBER(9,0) 19 ,OVERRIDEATTRIBUTES CMPPrimitiveModelAttribute_r.OVERRIDEATTRIBUTES%TYPE DEFAULT 0 -- CHAR(1) 20 ,OVERRIDECHILDREN CMPPrimitiveModelAttribute_r.OVERRIDECHILDREN%TYPE DEFAULT 0 -- CHAR(1) 21 ,OVERRIDEROLES CMPPrimitiveModelAttribute_r.OVERRIDEROLES%TYPE DEFAULT 0 -- CHAR(1) 22 ,PERSISTENT CMPPrimitiveModelAttribute_r.PERSISTENT%TYPE DEFAULT 1 -- CHAR(1) 23 ,SEEDED CMPPrimitiveModelAttribute_r.SEEDED%TYPE DEFAULT 0 -- CHAR(1) 24 ,STRONGTYPENAME CMPPrimitiveModelAttribute_r.STRONGTYPENAME%TYPE DEFAULT null -- VARCHAR2(255) 25 ,UOID CMPPrimitiveModelAttribute_r.UOID%TYPE DEFAULT null --UOID -- VARCHAR2(40) 26 ,UPDATEDBY CMPPrimitiveModelAttribute_r.UPDATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 27 ,UPDATETIMESTAMP CMPPrimitiveModelAttribute_r.UPDATETIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 28 ,ICONOBJECT CMPPrimitiveModelAttribute_r.ICONOBJECT%TYPE DEFAULT null -- NUMBER(9,0) 29 ,EDITORCLASSNAME CMPPrimitiveModelAttribute_r.EDITORCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 30 ,PROPERTYSHEETCLASSNAME CMPPrimitiveModelAttribute_r.PROPERTYSHEETCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 31 ,WIZARDCLASSNAME CMPPrimitiveModelAttribute_r.WIZARDCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 32 ,ATTRIBUTETYPEAGSG CMPPrimitiveModelAttribute_r.ATTRIBUTETYPEAGSG%TYPE DEFAULT null -- TIMESTAMP(6) 33 ,ATTRIBUTETYPEFQN CMPPrimitiveModelAttribute_r.ATTRIBUTETYPEFQN%TYPE DEFAULT null -- VARCHAR2(4000) 34 ,ATTRIBUTETYPELUPD CMPPrimitiveModelAttribute_r.ATTRIBUTETYPELUPD%TYPE DEFAULT null -- TIMESTAMP(6) 35 ,ATTRIBUTETYPEUOID CMPPrimitiveModelAttribute_r.ATTRIBUTETYPEUOID%TYPE DEFAULT null -- VARCHAR2(40) 36 ,HASNAME CMPPrimitiveModelAttribute_r.HASNAME%TYPE DEFAULT '0' -- CHAR(1) 37 ,ATTRIBUTETYPE CMPPrimitiveModelAttribute_r.ATTRIBUTETYPE%TYPE DEFAULT null -- NUMBER(9,0) 38 ,MODELATTRIBUTEOWNER CMPPrimitiveModelAttribute_r.MODELATTRIBUTEOWNER%TYPE DEFAULT null -- NUMBER(9,0) 39 ,FIRSTCLASSOBJECT CMPPrimitiveModelAttribute_r.FIRSTCLASSOBJECT%TYPE DEFAULT null -- NUMBER(9,0) 40 ,POSITION CMPPrimitiveModelAttribute_r.POSITION%TYPE DEFAULT 0 -- NUMBER(9,0) 41 ,VALUE CMPPrimitiveModelAttribute_r.VALUE%TYPE DEFAULT null -- VARCHAR2(4000) 42 ); -- ========================================================================== TYPE CMPPropertySetDefinition IS RECORD ( -- ========================================================================== WORKSPACEID CMPPropertySetDefinition_r.WORKSPACEID%TYPE DEFAULT 1 -- NUMBER(9,0) 1 ,DELETIONPARENT CMPPropertySetDefinition_r.DELETIONPARENT%TYPE DEFAULT null -- NUMBER(9,0) 2 ,AGGREGATEDSIGNATURE CMPPropertySetDefinition_r.AGGREGATEDSIGNATURE%TYPE DEFAULT null --sysdate -- TIMESTAMP(6) 3 ,CLASSNAME CMPPropertySetDefinition_r.CLASSNAME%TYPE DEFAULT 'CMPPropertySetDefinition' -- VARCHAR2(255) 4 ,COMPLETED CMPPropertySetDefinition_r.COMPLETED%TYPE DEFAULT 1 -- CHAR(1) 5 ,CREATEDBY CMPPropertySetDefinition_r.CREATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 6 ,CREATIONTIMESTAMP CMPPropertySetDefinition_r.CREATIONTIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 7 ,CUSTOMERDELETABLE CMPPropertySetDefinition_r.CUSTOMERDELETABLE%TYPE DEFAULT 1 -- CHAR(1) 8 ,CUSTOMERRENAMABLE CMPPropertySetDefinition_r.CUSTOMERRENAMABLE%TYPE DEFAULT 0 -- CHAR(1) 9 ,DELETEINOVERRIDE CMPPropertySetDefinition_r.DELETEINOVERRIDE%TYPE DEFAULT 0 -- CHAR(1) 10 ,DESCRIPTION CMPPropertySetDefinition_r.DESCRIPTION%TYPE DEFAULT null --DEFINITIONKEY -- VARCHAR2(4000) 11 ,EDITABLE CMPPropertySetDefinition_r.EDITABLE%TYPE DEFAULT 1 -- CHAR(1) 12 ,ELEMENTID CMPPropertySetDefinition_r.ELEMENTID%TYPE DEFAULT null --ELEMENTID -- NUMBER(9,0) 13 ,IMPORTED CMPPropertySetDefinition_r.IMPORTED%TYPE DEFAULT 0 -- CHAR(1) 14 ,LOGICALNAME CMPPropertySetDefinition_r.LOGICALNAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 15 ,METADATASIGNATURE CMPPropertySetDefinition_r.METADATASIGNATURE%TYPE DEFAULT null --METADATASIGNATURE -- VARCHAR2(255) 16 ,NAME CMPPropertySetDefinition_r.NAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 17 ,NOTE CMPPropertySetDefinition_r.NOTE%TYPE DEFAULT null -- VARCHAR2(4000) 18 ,NOTM CMPPropertySetDefinition_r.NOTM%TYPE DEFAULT 0 -- NUMBER(9,0) 19 ,OVERRIDEATTRIBUTES CMPPropertySetDefinition_r.OVERRIDEATTRIBUTES%TYPE DEFAULT 0 -- CHAR(1) 20 ,OVERRIDECHILDREN CMPPropertySetDefinition_r.OVERRIDECHILDREN%TYPE DEFAULT 0 -- CHAR(1) 21 ,OVERRIDEROLES CMPPropertySetDefinition_r.OVERRIDEROLES%TYPE DEFAULT 0 -- CHAR(1) 22 ,PERSISTENT CMPPropertySetDefinition_r.PERSISTENT%TYPE DEFAULT 1 -- CHAR(1) 23 ,SEEDED CMPPropertySetDefinition_r.SEEDED%TYPE DEFAULT 0 -- CHAR(1) 24 ,STRONGTYPENAME CMPPropertySetDefinition_r.STRONGTYPENAME%TYPE DEFAULT null -- VARCHAR2(255) 25 ,UOID CMPPropertySetDefinition_r.UOID%TYPE DEFAULT null --UOID -- VARCHAR2(40) 26 ,UPDATEDBY CMPPropertySetDefinition_r.UPDATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 27 ,UPDATETIMESTAMP CMPPropertySetDefinition_r.UPDATETIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 28 ,ICONOBJECT CMPPropertySetDefinition_r.ICONOBJECT%TYPE DEFAULT null -- NUMBER(9,0) 29 ,EDITORCLASSNAME CMPPropertySetDefinition_r.EDITORCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 30 ,PROPERTYSHEETCLASSNAME CMPPropertySetDefinition_r.PROPERTYSHEETCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 31 ,WIZARDCLASSNAME CMPPropertySetDefinition_r.WIZARDCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 32 ,FIRSTCLASSOBJECT CMPPropertySetDefinition_r.FIRSTCLASSOBJECT%TYPE DEFAULT null --FIRSTCLASSOBJECT -- NUMBER(9,0) 33 ,POSITION CMPPropertySetDefinition_r.POSITION%TYPE DEFAULT 0 --POSITION -- NUMBER(9,0) 34 ,PROPERTYTYPE CMPPropertySetDefinition_r.PROPERTYTYPE%TYPE DEFAULT PROPERTYTYPE_PHYSICAL --PROPERTYTYPE -- NUMBER(9,0) 35 ,OWNINGCLASSDEFINITION CMPPropertySetDefinition_r.OWNINGCLASSDEFINITION%TYPE DEFAULT 0 --OWNINGCLASSDEFINITION -- NUMBER(9,0) 36 ,OVERRIDEE CMPPropertySetDefinition_r.OVERRIDEE%TYPE DEFAULT null --OVERRIDEE -- NUMBER(9,0) 37 ,PARENTPROPERTYSET CMPPropertySetDefinition_r.PARENTPROPERTYSET%TYPE DEFAULT null --PARENTPROPERTYSET -- NUMBER(9,0) 38 ,SUPERPROPERTYSET CMPPropertySetDefinition_r.SUPERPROPERTYSET%TYPE DEFAULT null --SUPERPROPERTYSET -- NUMBER(9,0) 39 ); -- ========================================================================== TYPE CMPPropertyDefinition IS RECORD ( -- ========================================================================== WORKSPACEID CMPPropertyDefinition_r.WORKSPACEID%TYPE DEFAULT 1 -- NUMBER(9,0) 1 ,DELETIONPARENT CMPPropertyDefinition_r.DELETIONPARENT%TYPE DEFAULT null -- NUMBER(9,0) 2 ,AGGREGATEDSIGNATURE CMPPropertyDefinition_r.AGGREGATEDSIGNATURE%TYPE DEFAULT null --sysdate -- TIMESTAMP(6) 3 ,CLASSNAME CMPPropertyDefinition_r.CLASSNAME%TYPE DEFAULT 'CMPPropertyDefinition' -- VARCHAR2(255) 4 ,COMPLETED CMPPropertyDefinition_r.COMPLETED%TYPE DEFAULT 1 -- CHAR(1) 5 ,CREATEDBY CMPPropertyDefinition_r.CREATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 6 ,CREATIONTIMESTAMP CMPPropertyDefinition_r.CREATIONTIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 7 ,CUSTOMERDELETABLE CMPPropertyDefinition_r.CUSTOMERDELETABLE%TYPE DEFAULT 1 -- CHAR(1) 8 ,CUSTOMERRENAMABLE CMPPropertyDefinition_r.CUSTOMERRENAMABLE%TYPE DEFAULT 0 -- CHAR(1) 9 ,DELETEINOVERRIDE CMPPropertyDefinition_r.DELETEINOVERRIDE%TYPE DEFAULT 0 -- CHAR(1) 10 ,DESCRIPTION CMPPropertyDefinition_r.DESCRIPTION%TYPE DEFAULT null --DEFINITIONKEY -- VARCHAR2(4000) 11 ,EDITABLE CMPPropertyDefinition_r.EDITABLE%TYPE DEFAULT 1 -- CHAR(1) 12 ,ELEMENTID CMPPropertyDefinition_r.ELEMENTID%TYPE DEFAULT null --ELEMENTID -- NUMBER(9,0) 13 ,IMPORTED CMPPropertyDefinition_r.IMPORTED%TYPE DEFAULT 0 -- CHAR(1) 14 ,LOGICALNAME CMPPropertyDefinition_r.LOGICALNAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 15 ,METADATASIGNATURE CMPPropertyDefinition_r.METADATASIGNATURE%TYPE DEFAULT null --METADATASIGNATURE -- VARCHAR2(255) 16 ,NAME CMPPropertyDefinition_r.NAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 17 ,NOTE CMPPropertyDefinition_r.NOTE%TYPE DEFAULT null -- VARCHAR2(4000) 18 ,NOTM CMPPropertyDefinition_r.NOTM%TYPE DEFAULT 0 -- NUMBER(9,0) 19 ,OVERRIDEATTRIBUTES CMPPropertyDefinition_r.OVERRIDEATTRIBUTES%TYPE DEFAULT 0 -- CHAR(1) 20 ,OVERRIDECHILDREN CMPPropertyDefinition_r.OVERRIDECHILDREN%TYPE DEFAULT 0 -- CHAR(1) 21 ,OVERRIDEROLES CMPPropertyDefinition_r.OVERRIDEROLES%TYPE DEFAULT 0 -- CHAR(1) 22 ,PERSISTENT CMPPropertyDefinition_r.PERSISTENT%TYPE DEFAULT 1 -- CHAR(1) 23 ,SEEDED CMPPropertyDefinition_r.SEEDED%TYPE DEFAULT 0 -- CHAR(1) 24 ,STRONGTYPENAME CMPPropertyDefinition_r.STRONGTYPENAME%TYPE DEFAULT null -- VARCHAR2(255) 25 ,UOID CMPPropertyDefinition_r.UOID%TYPE DEFAULT null --UOID -- VARCHAR2(40) 26 ,UPDATEDBY CMPPropertyDefinition_r.UPDATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 27 ,UPDATETIMESTAMP CMPPropertyDefinition_r.UPDATETIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 28 ,ICONOBJECT CMPPropertyDefinition_r.ICONOBJECT%TYPE DEFAULT null -- NUMBER(9,0) 29 ,EDITORCLASSNAME CMPPropertyDefinition_r.EDITORCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 30 ,PROPERTYSHEETCLASSNAME CMPPropertyDefinition_r.PROPERTYSHEETCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 31 ,WIZARDCLASSNAME CMPPropertyDefinition_r.WIZARDCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 32 ,FIRSTCLASSOBJECT CMPPropertyDefinition_r.FIRSTCLASSOBJECT%TYPE DEFAULT null --FIRSTCLASSOBJECT -- NUMBER(9,0) 33 ,POSITION CMPPropertyDefinition_r.POSITION%TYPE DEFAULT 0 --POSITION -- NUMBER(9,0) 34 ,ADVANCED CMPPropertyDefinition_r.ADVANCED%TYPE DEFAULT 0 -- CHAR(1) 35 ,CONTRIBUTETOSIGNATURE CMPPropertyDefinition_r.CONTRIBUTETOSIGNATURE%TYPE DEFAULT 1 --CONTRIBUTETOSIGNATURE-- CHAR(1) 36 ,CUSTOMEDITOR CMPPropertyDefinition_r.CUSTOMEDITOR%TYPE DEFAULT null -- VARCHAR2(255) 37 ,DEFAULTVALUE CMPPropertyDefinition_r.DEFAULTVALUE%TYPE DEFAULT null -- VARCHAR2(4000) 38 ,DEFINITIONKEY CMPPropertyDefinition_r.DEFINITIONKEY%TYPE DEFAULT null --DEFINITIONKEY -- VARCHAR2(255) 39 ,DYNAMICDEFAULT CMPPropertyDefinition_r.DYNAMICDEFAULT%TYPE DEFAULT null -- VARCHAR2(255) 40 ,EXPORTCONTROL CMPPropertyDefinition_r.EXPORTCONTROL%TYPE DEFAULT 0 -- NUMBER(9,0) 41 ,HIDDEN CMPPropertyDefinition_r.HIDDEN%TYPE DEFAULT 0 -- CHAR(1) 42 ,INPLACEEDITOR CMPPropertyDefinition_r.INPLACEEDITOR%TYPE DEFAULT null -- VARCHAR2(255) 43 ,ISPUBLISHEDTOPUBLICAPI CMPPropertyDefinition_r.ISPUBLISHEDTOPUBLICAPI%TYPE DEFAULT 1 -- CHAR(1) 44 ,ISROLE CMPPropertyDefinition_r.ISROLE%TYPE DEFAULT 0 -- CHAR(1) 45 ,NAMECHECKED CMPPropertyDefinition_r.NAMECHECKED%TYPE DEFAULT 0 -- CHAR(1) 46 ,OVERRIDE CMPPropertyDefinition_r.OVERRIDE%TYPE DEFAULT 0 -- CHAR(1) 47 ,PASSWORD CMPPropertyDefinition_r.PASSWORD%TYPE DEFAULT 0 -- CHAR(1) 48 ,PROPERTYREADONLY CMPPropertyDefinition_r.PROPERTYREADONLY%TYPE DEFAULT 0 -- CHAR(1) 49 ,PROPERTYTYPE CMPPropertyDefinition_r.PROPERTYTYPE%TYPE DEFAULT null --propertyset type -- NUMBER(9,0) 50 ,TRANSLATABLE CMPPropertyDefinition_r.TRANSLATABLE%TYPE DEFAULT 0 -- CHAR(1) 51 ,USERCHOICEALLOWED CMPPropertyDefinition_r.USERCHOICEALLOWED%TYPE DEFAULT 0 -- CHAR(1) 52 ,TYPE CMPPropertyDefinition_r.TYPE%TYPE DEFAULT null --datatype id -- NUMBER(9,0) 53 ,OVERRIDEE CMPPropertyDefinition_r.OVERRIDEE%TYPE DEFAULT null -- NUMBER(9,0) 54 ,PROPERTYGROUPDEFINITION CMPPropertyDefinition_r.PROPERTYGROUPDEFINITION%TYPE DEFAULT null --property group -- NUMBER(9,0) 55 ,OWNINGPROPERTYSETDEFINITION CMPPropertyDefinition_r.OWNINGPROPERTYSETDEFINITION%TYPE DEFAULT null --propertyset -- NUMBER(9,0) 56 ); -- ========================================================================== TYPE CMPPropertyGroupDefinition IS RECORD ( -- ========================================================================== WORKSPACEID CMPPropertyGroupDefinition_r.WORKSPACEID%TYPE DEFAULT 1 -- NUMBER(9,0) 1 ,DELETIONPARENT CMPPropertyGroupDefinition_r.DELETIONPARENT%TYPE DEFAULT null -- NUMBER(9,0) 2 ,AGGREGATEDSIGNATURE CMPPropertyGroupDefinition_r.AGGREGATEDSIGNATURE%TYPE DEFAULT null --sysdate -- TIMESTAMP(6) 3 ,CLASSNAME CMPPropertyGroupDefinition_r.CLASSNAME%TYPE DEFAULT 'CMPPropertyGroupDefinition' -- VARCHAR2(255) 4 ,COMPLETED CMPPropertyGroupDefinition_r.COMPLETED%TYPE DEFAULT 1 -- CHAR(1) 5 ,CREATEDBY CMPPropertyGroupDefinition_r.CREATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 6 ,CREATIONTIMESTAMP CMPPropertyGroupDefinition_r.CREATIONTIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 7 ,CUSTOMERDELETABLE CMPPropertyGroupDefinition_r.CUSTOMERDELETABLE%TYPE DEFAULT 1 -- CHAR(1) 8 ,CUSTOMERRENAMABLE CMPPropertyGroupDefinition_r.CUSTOMERRENAMABLE%TYPE DEFAULT 0 -- CHAR(1) 9 ,DELETEINOVERRIDE CMPPropertyGroupDefinition_r.DELETEINOVERRIDE%TYPE DEFAULT 0 -- CHAR(1) 10 ,DESCRIPTION CMPPropertyGroupDefinition_r.DESCRIPTION%TYPE DEFAULT null -- VARCHAR2(4000) 11 ,EDITABLE CMPPropertyGroupDefinition_r.EDITABLE%TYPE DEFAULT 1 -- CHAR(1) 12 ,ELEMENTID CMPPropertyGroupDefinition_r.ELEMENTID%TYPE DEFAULT null --ELEMENTID -- NUMBER(9,0) 13 ,IMPORTED CMPPropertyGroupDefinition_r.IMPORTED%TYPE DEFAULT 0 -- CHAR(1) 14 ,LOGICALNAME CMPPropertyGroupDefinition_r.LOGICALNAME%TYPE DEFAULT null --DEFINITIONKEY -- VARCHAR2(1000) 15 ,METADATASIGNATURE CMPPropertyGroupDefinition_r.METADATASIGNATURE%TYPE DEFAULT null --METADATASIGNATURE -- VARCHAR2(255) 16 ,NAME CMPPropertyGroupDefinition_r.NAME%TYPE DEFAULT null --NAME -- VARCHAR2(1000) 17 ,NOTE CMPPropertyGroupDefinition_r.NOTE%TYPE DEFAULT null -- VARCHAR2(4000) 18 ,NOTM CMPPropertyGroupDefinition_r.NOTM%TYPE DEFAULT 0 -- NUMBER(9,0) 19 ,OVERRIDEATTRIBUTES CMPPropertyGroupDefinition_r.OVERRIDEATTRIBUTES%TYPE DEFAULT 0 -- CHAR(1) 20 ,OVERRIDECHILDREN CMPPropertyGroupDefinition_r.OVERRIDECHILDREN%TYPE DEFAULT 0 -- CHAR(1) 21 ,OVERRIDEROLES CMPPropertyGroupDefinition_r.OVERRIDEROLES%TYPE DEFAULT 0 -- CHAR(1) 22 ,PERSISTENT CMPPropertyGroupDefinition_r.PERSISTENT%TYPE DEFAULT 1 -- CHAR(1) 23 ,SEEDED CMPPropertyGroupDefinition_r.SEEDED%TYPE DEFAULT 0 -- CHAR(1) 24 ,STRONGTYPENAME CMPPropertyGroupDefinition_r.STRONGTYPENAME%TYPE DEFAULT null -- VARCHAR2(255) 25 ,UOID CMPPropertyGroupDefinition_r.UOID%TYPE DEFAULT null --UOID -- VARCHAR2(40) 26 ,UPDATEDBY CMPPropertyGroupDefinition_r.UPDATEDBY%TYPE DEFAULT 'OWBSYS' -- VARCHAR2(40) 27 ,UPDATETIMESTAMP CMPPropertyGroupDefinition_r.UPDATETIMESTAMP%TYPE DEFAULT null --sysdate -- DATE 28 ,ICONOBJECT CMPPropertyGroupDefinition_r.ICONOBJECT%TYPE DEFAULT null -- NUMBER(9,0) 29 ,EDITORCLASSNAME CMPPropertyGroupDefinition_r.EDITORCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 30 ,PROPERTYSHEETCLASSNAME CMPPropertyGroupDefinition_r.PROPERTYSHEETCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 31 ,WIZARDCLASSNAME CMPPropertyGroupDefinition_r.WIZARDCLASSNAME%TYPE DEFAULT null -- VARCHAR2(255) 32 ,FIRSTCLASSOBJECT CMPPropertyGroupDefinition_r.FIRSTCLASSOBJECT%TYPE DEFAULT null --FIRSTCLASSOBJECT -- NUMBER(9,0) 33 ,POSITION CMPPropertyGroupDefinition_r.POSITION%TYPE DEFAULT 0 --POSITION -- NUMBER(9,0) 34 ,DEFINITIONKEY CMPPropertyGroupDefinition_r.DEFINITIONKEY%TYPE DEFAULT null -- VARCHAR2(255) 35 ,HIDDEN CMPPropertyGroupDefinition_r.HIDDEN%TYPE DEFAULT 0 -- CHAR(1) 36 ,TYPE CMPPropertyGroupDefinition_r.TYPE%TYPE DEFAULT null -- NUMBER(9,0) 37 ,PROPERTYGROUPOWNER CMPPropertyGroupDefinition_r.PROPERTYGROUPOWNER%TYPE DEFAULT null --property set -- NUMBER(9,0) 38 ); -- ************************************************************************** -- ************************************************************************** -- Useful functions/procedures -- ************************************************************************** -- ************************************************************************** -- ========================================================================== -- put message to output (uses DBMS_OUTPUT) PROCEDURE put(msg VARCHAR2) IS -- ========================================================================== BEGIN IF NOT OUTINITED THEN OUTINITED := TRUE; DBMS_OUTPUT.ENABLE(200000); put('DBMS_OUTPUT Enabled.'); END IF; IF (LENGTH(msg) + LENGTH(SCRIPTID) + 2) > 255 THEN -- 10.1 database can't handle messages with length > 255 --DBMS_OUTPUT.put_line('Message length > 255'); --DBMS_OUTPUT.put_line(SUBSTR(msg, 0, 255)); -- Break the string up into lines or 255-byte chunks DECLARE l_msg_line VARCHAR2(255); l_eol_index NUMBER; l_curr_index NUMBER; l_msg_len NUMBER := LENGTH(msg); l_loop_index NUMBER := 0; BEGIN DBMS_OUTPUT.PUT_LINE(SCRIPTID || ':'); l_eol_index := 1; l_curr_index := 1; l_loop_index := 0; WHILE (l_curr_index < l_msg_len AND l_loop_index < 10) LOOP l_eol_index := INSTR(msg, EOL, l_curr_index); --DBMS_OUTPUT.put_line('l_eol_index = ' || TO_CHAR(l_eol_index)); IF (l_eol_index <= 0) OR (l_eol_index - l_curr_index) > 255 THEN l_msg_line := SUBSTR(msg, l_curr_index, 255); l_curr_index := l_curr_index + 255; ELSE l_msg_line := SUBSTR(msg, l_curr_index, l_eol_index - l_curr_index); l_curr_index := l_eol_index + 1; END IF; DBMS_OUTPUT.PUT_LINE(l_msg_line); l_loop_index := l_loop_index + 1; END LOOP; EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE(SQLERRM); END; ELSE DBMS_OUTPUT.put_line(SCRIPTID || ': ' || msg); END IF; END; -- ========================================================================== -- put message to output controlled by TRACEON variable (uses put) PROCEDURE putTrace(msg VARCHAR2) IS -- ========================================================================== BEGIN IF TRACEON THEN put(msg); END IF; END; -- ========================================================================== -- return next element id for new objects FUNCTION getNextElementId RETURN NUMBER -- ========================================================================== IS l_id NUMBER; BEGIN SELECT cwmseq.nextval INTO l_id FROM DUAL; RETURN l_id; END; -- ========================================================================== -- similar to Object.toString() in Java - return a string representation of the record FUNCTION toString( pdef CMPPropertyDefinition ) RETURN VARCHAR2 -- ========================================================================== IS l_str VARCHAR2(255) := '(CMPPropertyDefinition)' || pdef.NAME || '/id=' || pdef.ELEMENTID || '/definitionKey=' || pdef.DEFINITIONKEY || '/propertyGroupId=' || pdef.PROPERTYGROUPDEFINITION || '/propertySetId=' || pdef.OWNINGPROPERTYSETDEFINITION || '/metadataSignature=' || pdef.METADATASIGNATURE ; BEGIN RETURN l_str; END; -- ========================================================================== FUNCTION getPlatformIdByName( p_platformName VARCHAR2 ) RETURN NUMBER -- ========================================================================== IS p_id NUMBER(9,0); BEGIN SELECT ELEMENTID INTO p_id FROM CMPPlatform_r WHERE WORKSPACEID=1 AND NAME=p_platformName; RETURN p_id; END; -- ========================================================================== FUNCTION getClassIdByName( p_platformId NUMBER, p_className VARCHAR2 ) RETURN NUMBER -- ========================================================================== IS p_classId NUMBER(9,0); BEGIN SELECT ELEMENTID INTO p_classId FROM CMPClassDefinition_r WHERE NAME=p_className AND OWNINGFOLDER=p_platformId; RETURN p_classId; EXCEPTION WHEN NO_DATA_FOUND THEN BEGIN RETURN null; END; -- NO_DATA_FOUND END; -- ========================================================================== FUNCTION getPropertySetId( p_classId NUMBER, p_propertyType NUMBER, p_definitionKey VARCHAR2 ) RETURN NUMBER -- ========================================================================== IS p_propertySetId NUMBER(9,0); BEGIN SELECT ELEMENTID INTO p_propertySetId FROM CMPPropertySetDefinition_r WHERE FIRSTCLASSOBJECT=p_classId AND PROPERTYTYPE=p_propertyType AND LOGICALNAME LIKE '%:'||p_definitionKey||':%'; RETURN p_propertySetId; EXCEPTION WHEN NO_DATA_FOUND THEN BEGIN RETURN null; END; -- NO_DATA_FOUND END; -- ========================================================================== FUNCTION getPropertyGroupId( p_propertySetId NUMBER, p_definitionKey VARCHAR2 ) RETURN NUMBER -- ========================================================================== IS p_propertyGroupId NUMBER(9,0); BEGIN SELECT ELEMENTID INTO p_propertyGroupId FROM CMPPropertyGroupDefinition_r WHERE PROPERTYGROUPOWNER=p_propertySetId AND LOGICALNAME=p_definitionKey; RETURN p_propertyGroupId; EXCEPTION WHEN NO_DATA_FOUND THEN BEGIN RETURN null; END; -- NO_DATA_FOUND END; -- ========================================================================== -- CMPPropertySetDefinition FUNCTION newCMPPropertySetDefinition( description IN VARCHAR2 DEFAULT null ,logicalName IN VARCHAR2 DEFAULT null ,metadataSignature IN VARCHAR2 DEFAULT null ,name IN VARCHAR2 DEFAULT null ,firstClassObject IN NUMBER DEFAULT 0 ,propertyType IN NUMBER DEFAULT 0 ,owningClassDefinition IN NUMBER DEFAULT null ,parentPropertySet IN NUMBER DEFAULT null ) RETURN CMPPropertySetDefinition -- ========================================================================== IS psdef CMPPropertySetDefinition; BEGIN psdef.AGGREGATEDSIGNATURE := SYSDATE; psdef.CREATIONTIMESTAMP := SYSDATE; psdef.DESCRIPTION := description; psdef.ELEMENTID := getNextElementId; psdef.LOGICALNAME := logicalName; psdef.METADATASIGNATURE := metadataSignature; psdef.NAME := name; psdef.UOID := RAWTOHEX(SYS_GUID()); psdef.UPDATETIMESTAMP := SYSDATE; psdef.FIRSTCLASSOBJECT := firstClassObject; psdef.PROPERTYTYPE := propertyType; psdef.OWNINGCLASSDEFINITION := owningClassDefinition; psdef.PARENTPROPERTYSET := parentPropertySet; RETURN psdef; END newCMPPropertySetDefinition; -- ========================================================================== PROCEDURE AddCMPPropertySetDefinition( psdef IN OUT CMPPropertySetDefinition ) -- ========================================================================== IS l_count NUMBER := 0; l_str VARCHAR2(4000); BEGIN select count(1) into l_count from CMPPropertySetDefinition_r where name = psdef.NAME and logicalname=psdef.LOGICALNAME and owningClassDefinition=psdef.OWNINGCLASSDEFINITION and propertyType=psdef.PROPERTYTYPE and workspaceid=psdef.WORKSPACEID; If l_count = 1 then put('Found PropertySetDefinition with name ''' || psdef.NAME ||'''. Will Retrieve it from Repository.' || EOL); l_str := 'select * from CMPPropertySetDefinition_r where name = ''' || psdef.NAME || ''' and logicalname=''' || psdef.LOGICALNAME || ''' and owningClassDefinition=' || psdef.OWNINGCLASSDEFINITION || ' and propertyType=' || psdef.PROPERTYTYPE || ' and workspaceid=' || psdef.WORKSPACEID; EXECUTE IMMEDIATE l_str INTO psdef; else If l_count = 0 then put('Add PropertySetDefinition with name ''' || psdef.NAME ||'''.' || EOL); insert into CMPPropertySetDefinition_r VALUES psdef; else put('Error! Found ' || l_count || ' PropertySetDefinitions with same name ''' || psdef.NAME || '''!' || EOL); end if; end if; END; -- ========================================================================== -- CMPPropertyDefinition -- ========================================================================== FUNCTION newCMPPropertyDefinition( definitionKey IN VARCHAR2 DEFAULT null ,elementId IN NUMBER DEFAULT 0 ,name IN VARCHAR2 DEFAULT null ,metadataSignature IN VARCHAR2 DEFAULT null ,uoid IN VARCHAR2 DEFAULT null ,firstClassObjectId IN NUMBER DEFAULT null ,position IN NUMBER DEFAULT 0 ,contributeToSignature IN VARCHAR DEFAULT null ,propertyTypeId IN NUMBER DEFAULT null ,datatypeId IN NUMBER DEFAULT 0 ,propertyGroupId IN NUMBER DEFAULT 0 ,propertySetId IN NUMBER DEFAULT 0 ) RETURN CMPPropertyDefinition -- ========================================================================== IS pdef CMPPropertyDefinition; BEGIN pdef.AGGREGATEDSIGNATURE := SYSDATE; pdef.CREATIONTIMESTAMP := SYSDATE; pdef.DESCRIPTION := definitionKey; pdef.ELEMENTID := elementId; pdef.LOGICALNAME := name; pdef.METADATASIGNATURE := metadataSignature; pdef.NAME := name; pdef.UOID := uoid; pdef.UPDATETIMESTAMP := SYSDATE; pdef.FIRSTCLASSOBJECT := firstClassObjectId; pdef.POSITION := position; pdef.CONTRIBUTETOSIGNATURE := contributeToSignature; pdef.DEFINITIONKEY := definitionKey; pdef.PROPERTYTYPE := propertyTypeId; pdef.TYPE := datatypeId; pdef.PROPERTYGROUPDEFINITION := propertyGroupId; pdef.OWNINGPROPERTYSETDEFINITION := propertySetId; RETURN pdef; END newCMPPropertyDefinition; -- ========================================================================== PROCEDURE AddCMPPropertyDefinition( pdef IN OUT CMPPropertyDefinition ) -- ========================================================================== IS l_count NUMBER := 0; l_str VARCHAR2(4000); BEGIN select count(1) into l_count from CMPPropertyDefinition_r where name = pdef.NAME and logicalname=pdef.LOGICALNAME and firstclassobject=pdef.FIRSTCLASSOBJECT and definitionkey=pdef.DEFINITIONKEY and propertyType=pdef.PROPERTYTYPE and owningPropertySetDefinition=pdef.OWNINGPROPERTYSETDEFINITION and workspaceid=pdef.WORKSPACEID; If l_count = 1 then put('Found PropertyDefinition with name ''' || pdef.NAME ||'''. Will Retrieve it from Repository.' || EOL); l_str := 'select * from CMPPropertyDefinition_r where name = ''' || pdef.NAME || ''' and logicalname=''' || pdef.LOGICALNAME || ''' and firstclassobject=' || pdef.FIRSTCLASSOBJECT || ' and definitionkey=''' || pdef.DEFINITIONKEY || ''' and propertyType=' || pdef.PROPERTYTYPE || ' and owningPropertySetDefinition=' || pdef.OWNINGPROPERTYSETDEFINITION || ' and workspaceid=' || pdef.WORKSPACEID; EXECUTE IMMEDIATE l_str INTO pdef; else If l_count = 0 then put('Add PropertyDefinition with name ''' || pdef.NAME ||'''.' || EOL); insert into CMPPropertyDefinition_r VALUES pdef; else put('Error! Found ' || l_count || ' PropertyDefinitions with same name ''' || pdef.NAME || '''!' || EOL); end if; end if; END; -- ========================================================================== -- toString CMPPropertyGroupDefinition FUNCTION toSPropertyGroupDefinition(pType CMPPropertyGroupDefinition) RETURN VARCHAR2 IS -- ========================================================================== l_str VARCHAR2(4000); BEGIN l_str := 'CMPPropertyGroupDefinition [ '; if (pType.NAME is not null) then l_str := l_str || '[NAME: ' || pType.NAME || '] '; end if; if (pType.LOGICALNAME is not null) then l_str := l_str || '[LOGICALNAME: ' || pType.LOGICALNAME || '] '; end if; if (pType.ELEMENTID is not null) then l_str := l_str || '[ELEMENTID: ' || pType.ELEMENTID || '] '; end if; if (pType.UOID is not null) then l_str := l_str || '[UOID: ' || pType.UOID || '] '; end if; if (pType.POSITION is not null) then l_str := l_str || '[POSITION: ' || pType.POSITION || '] '; end if; if (pType.DEFINITIONKEY is not null) then l_str := l_str || '[DEFINITIONKEY: ' || pType.DEFINITIONKEY || '] '; end if; if (pType.PROPERTYGROUPOWNER is not null) then l_str := l_str || '[PROPERTYGROUPOWNER: ' || pType.PROPERTYGROUPOWNER || '] '; end if; if (pType.FIRSTCLASSOBJECT is not null) then l_str := l_str || '[FIRSTCLASSOBJECT: ' || pType.FIRSTCLASSOBJECT || '] '; end if; l_str := l_str || ']'; return l_str; END toSPropertyGroupDefinition; -- ========================================================================== -- NewCMPPropertyGroupdefinition FUNCTION newCMPPropertyGroupDefinition( definitionKey IN VARCHAR2 DEFAULT null ,name IN VARCHAR2 DEFAULT null ,metadataSignature IN VARCHAR2 DEFAULT null ,firstClassObjectId IN NUMBER DEFAULT null ,position IN NUMBER DEFAULT 0 ,propertySetId IN NUMBER DEFAULT 0 ) RETURN CMPPropertyGroupdefinition -- ========================================================================== IS pgdef CMPPropertyGroupdefinition; BEGIN pgdef.AGGREGATEDSIGNATURE := SYSDATE; pgdef.CREATIONTIMESTAMP := SYSDATE; pgdef.ELEMENTID := getNextElementId; pgdef.LOGICALNAME := definitionKey; pgdef.METADATASIGNATURE := metadataSignature; pgdef.NAME := name; pgdef.UOID := RAWTOHEX(SYS_GUID()); pgdef.UPDATETIMESTAMP := SYSDATE; pgdef.FIRSTCLASSOBJECT := firstClassObjectId; pgdef.POSITION := position; pgdef.PROPERTYGROUPOWNER := propertySetId; RETURN pgdef; END newCMPPropertyGroupDefinition; -- ========================================================================== PROCEDURE AddCMPPropertyGroupDefinition( pgdeg IN OUT CMPPropertyGroupDefinition ) -- ========================================================================== IS l_count NUMBER := 0; l_str VARCHAR2(4000); BEGIN select count(1) into l_count from CMPPropertyGroupDefinition_r where name = pgdeg.NAME and logicalname=pgdeg.LOGICALNAME and firstclassobject=pgdeg.FIRSTCLASSOBJECT and propertyGroupOwner=pgdeg.PROPERTYGROUPOWNER and workspaceid=pgdeg.WORKSPACEID; If l_count = 1 then l_str := 'select * from CMPPropertyGroupDefinition_r where name = ''' || pgdeg.NAME || ''' and logicalname=''' || pgdeg.LOGICALNAME || ''' and firstclassobject=' || pgdeg.FIRSTCLASSOBJECT || ' and propertyGroupOwner=' || pgdeg.propertyGroupOwner || ' and workspaceid=' || pgdeg.WORKSPACEID; EXECUTE IMMEDIATE l_str INTO pgdeg; putTrace('Found ' || toSPropertyGroupdefinition(pgdeg) || EOL); else If l_count = 0 then insert into CMPPropertyGroupDefinition_r VALUES pgdeg; putTrace('Inserted ' || toSPropertyGroupdefinition(pgdeg) || EOL); else putTrace('Error! Found ' || l_count || ' PropertyGroupDefinitions with same name ''' || pgdeg.NAME || '''!' || EOL); end if; end if; END; -- ========================================================================== FUNCTION getCMPPropertyDefinition( definitionKey IN VARCHAR2 DEFAULT null ,name IN VARCHAR2 DEFAULT null ,propertyTypeId IN NUMBER DEFAULT null ,datatypeId IN NUMBER DEFAULT null ,propertyGroupId IN NUMBER DEFAULT null ,propertySetId IN NUMBER DEFAULT null ) RETURN CMPPropertyDefinition -- ========================================================================== IS pdef CMPPropertyDefinition; l_str VARCHAR2(4000); BEGIN l_str := 'SELECT * FROM CMPPropertyDefinition_r WHERE 1=1'; if (definitionKey is not null) then l_str := l_str || ' and DEFINITIONKEY=''' || definitionKey || ''''; end if; if (name is not null) then l_str := l_str || ' and NAME=''' || name || ''''; end if; if (propertyTypeId is not null) then l_str := l_str || ' and PROPERTYTYPE=' || propertyTypeId; end if; if (datatypeId is not null) then l_str := l_str || ' and TYPE=' || datatypeId; end if; if (propertyGroupId is not null) then l_str := l_str || ' and PROPERTYGROUPDEFINITION=' || propertyGroupId; end if; if (propertySetId is not null) then l_str := l_str || ' and OWNINGPROPERTYSETDEFINITION=' || propertySetId; end if; EXECUTE IMMEDIATE l_str INTO pdef; put('Found (' || toString(pdef) || ')' || EOL); RETURN pdef; EXCEPTION WHEN NO_DATA_FOUND THEN BEGIN put ('Not found -->' || l_str || EOL); RETURN null; END; -- NO_DATA_FOUND /* should not happen. Developers have to pass in the correct params that have only one record. WHEN TOO_MANY_ROWS THEN BEGIN put ('Too many rows -->' || l_str); RETURN null; END;*/ RETURN pdef; END getCMPPropertyDefinition; -- ========================================================================== FUNCTION getCMPPrimitiveType( logicalName IN VARCHAR2 DEFAULT null ,name IN VARCHAR2 DEFAULT null ,owningModel IN NUMBER DEFAULT null ,owningFolder IN NUMBER DEFAULT null ) RETURN CMPPrimitiveType -- ========================================================================== IS ptype CMPPrimitiveType; l_str VARCHAR2(4000); BEGIN l_str := 'SELECT * FROM CMPPrimitiveType_r WHERE 1=1'; if (logicalName is not null) then l_str := l_str || ' and LOGICALNAME=''' || logicalName || ''''; end if; if (name is not null) then l_str := l_str || ' and NAME=''' || name || ''''; end if; if (owningModel is not null) then l_str := l_str || ' and OWNINGMODEL=' || owningModel; end if; if (owningFolder is not null) then l_str := l_str || ' and OWNINGFOLDER=' || owningFolder; end if; EXECUTE IMMEDIATE l_str INTO ptype; RETURN ptype; EXCEPTION WHEN NO_DATA_FOUND THEN BEGIN putTrace ('Not found -->' || l_str || EOL); RETURN null; END; RETURN ptype; END getCMPPrimitiveType; -- ========================================================================== -- Get ElementID of PrimitiveType from name. -- Valid values for parameter p_name: Timestamp, String, Double, Integer, -- Long, Boolean, Date, Float FUNCTION getPrimitiveTypeId( p_name IN VARCHAR2 ) RETURN NUMBER -- ========================================================================== IS ptype CMPPrimitiveType; BEGIN ptype := getCMPPrimitiveType( null,--logicalName p_name,--name null,--owningModel null--owningFolder ); RETURN ptype.ELEMENTID; END; -- ========================================================================== FUNCTION getStringDatatypeId RETURN NUMBER -- ========================================================================== IS p_datatypeId NUMBER(9,0); BEGIN p_datatypeId := getPrimitiveTypeId('String'); RETURN p_datatypeId; END; -- ========================================================================== FUNCTION getIntegerDatatypeId RETURN NUMBER -- ========================================================================== IS p_datatypeId NUMBER(9,0); BEGIN p_datatypeId := getPrimitiveTypeId('Integer'); RETURN p_datatypeId; END; -- ========================================================================== FUNCTION getBooleanDatatypeId RETURN NUMBER -- ========================================================================== IS p_datatypeId NUMBER(9,0); BEGIN p_datatypeId := getPrimitiveTypeId('Boolean'); RETURN p_datatypeId; END; -- ========================================================================== FUNCTION getCMPAnonymousDomain( logicalName IN VARCHAR2 DEFAULT null ,name IN VARCHAR2 DEFAULT null ,owningModel IN NUMBER DEFAULT null ,owningFolder IN NUMBER DEFAULT null ,dataTypeFqn IN VARCHAR2 DEFAULT null ,dataType IN NUMBER DEFAULT null ) RETURN CMPAnonymousDomain -- ========================================================================== IS adom CMPAnonymousDomain; l_str VARCHAR2(4000); BEGIN l_str := 'SELECT * FROM CMPAnonymousDomain_r WHERE 1=1'; if (logicalName is not null) then l_str := l_str || ' and LOGICALNAME=''' || logicalName || ''''; end if; if (name is not null) then l_str := l_str || ' and NAME=''' || name || ''''; end if; if (owningModel is not null) then l_str := l_str || ' and OWNINGMODEL=' || owningModel; end if; if (owningFolder is not null) then l_str := l_str || ' and OWNINGFOLDER=' || owningFolder; end if; if (dataTypeFqn is not null) then l_str := l_str || ' and DATATYPEFQN=''' || dataTypeFqn || ''''; end if; if (dataType is not null) then l_str := l_str || ' and DATATYPE=' || dataType; end if; EXECUTE IMMEDIATE l_str INTO adom; RETURN adom; EXCEPTION WHEN NO_DATA_FOUND THEN BEGIN putTrace ('Not found -->' || l_str || EOL); RETURN null; END; RETURN adom; END getCMPAnonymousDomain; -- ========================================================================== -- CMPAnonymousDomai FUNCTION newCMPAnonymousDomain( name IN VARCHAR2 DEFAULT null ,metadataSignature IN VARCHAR2 DEFAULT null ) RETURN CMPAnonymousDomain -- ========================================================================== IS pdef CMPAnonymousDomain; BEGIN pdef.AGGREGATEDSIGNATURE := SYSDATE; pdef.classname := 'CMPAnonymousDomain'; pdef.CREATIONTIMESTAMP := SYSDATE; pdef.DESCRIPTION := null; pdef.ELEMENTID := getNextElementId; pdef.LOGICALNAME := name; pdef.METADATASIGNATURE := metadataSignature; pdef.NAME := name; pdef.UOID := RAWTOHEX(SYS_GUID()); pdef.UPDATETIMESTAMP := SYSDATE; pdef.comparator := 'oracle.wh.repos.impl.domain.comparator.PrimitiveValueComparator'; pdef.datatypeagsg := sysdate; RETURN pdef; END newCMPAnonymousDomain; -- ========================================================================== PROCEDURE AddCMPAnonymousDomain( pdef IN OUT CMPAnonymousDomain ) -- ========================================================================== IS l_count NUMBER := 0; l_str VARCHAR2(4000); BEGIN select count(1) into l_count from CMPAnonymousDomain_r where name = pdef.NAME and logicalname=pdef.LOGICALNAME and workspaceid=pdef.WORKSPACEID; If l_count = 1 then put('Found PropertyDefinition with name ''' || pdef.NAME ||'''. Will Retrieve it from Repository.' || EOL); l_str := 'select * from CMPAnonymousDomain_r where name = ''' || pdef.NAME || ''' and logicalname=''' || pdef.LOGICALNAME || ''' and workspaceid=' || pdef.WORKSPACEID; EXECUTE IMMEDIATE l_str INTO pdef; else If l_count = 0 then put('Add PropertyDefinition with name ''' || pdef.NAME ||'''.' || EOL); insert into CMPAnonymousDomain_r VALUES pdef; else put('Error! Found ' || l_count || ' PropertyDefinitions with same name ''' || pdef.NAME || '''!' || EOL); end if; end if; END; -- ========================================================================== -- toString CMPPrimitiveModelAttribute FUNCTION toSPrimitiveModelAttribute(pType CMPPrimitiveModelAttribute) RETURN VARCHAR2 IS -- ========================================================================== l_str VARCHAR2(4000); BEGIN l_str := 'CMPPrimitiveModelAttribute [ '; if (pType.NAME is not null) then l_str := l_str || '[NAME: ' || pType.NAME || '] '; end if; if (pType.LOGICALNAME is not null) then l_str := l_str || '[LOGICALNAME: ' || pType.LOGICALNAME || '] '; end if; if (pType.ELEMENTID is not null) then l_str := l_str || '[ELEMENTID: ' || pType.ELEMENTID || '] '; end if; if (pType.UOID is not null) then l_str := l_str || '[UOID: ' || pType.UOID || '] '; end if; if (pType.ATTRIBUTETYPEFQN is not null) then l_str := l_str || '[ATTRIBUTETYPEFQN: ' || pType.ATTRIBUTETYPEFQN || '] '; end if; if (pType.ATTRIBUTETYPE is not null) then l_str := l_str || '[ATTRIBUTETYPE: ' || pType.ATTRIBUTETYPE || '] '; end if; if (pType.MODELATTRIBUTEOWNER is not null) then l_str := l_str || '[MODELATTRIBUTEOWNER: ' || pType.MODELATTRIBUTEOWNER || '] '; end if; if (pType.FIRSTCLASSOBJECT is not null) then l_str := l_str || '[FIRSTCLASSOBJECT: ' || pType.FIRSTCLASSOBJECT || '] '; end if; if (pType.POSITION is not null) then l_str := l_str || '[POSITION: ' || pType.POSITION || '] '; end if; if (pType.VALUE is not null) then l_str := l_str || '[VALUE: ' || pType.VALUE || '] '; end if; l_str := l_str || ']'; return l_str; END toSPrimitiveModelAttribute; -- ============================================================================= FUNCTION newCMPPrimitiveModelAttribute2( logicalName IN VARCHAR2 DEFAULT null ,metadataSignature IN VARCHAR2 DEFAULT null ,name IN VARCHAR2 DEFAULT null ,attributeTypeFqn IN VARCHAR2 DEFAULT null ,modelAttributeOwner IN NUMBER DEFAULT 0 ,firstClassObject IN NUMBER DEFAULT 0 ,value IN VARCHAR2 DEFAULT null ) RETURN CMPPrimitiveModelAttribute -- ========================================================================== IS ptype CMPPrimitiveModelAttribute; BEGIN ptype.AGGREGATEDSIGNATURE := SYSDATE; ptype.CREATIONTIMESTAMP := SYSDATE; ptype.ELEMENTID := getNextElementId; ptype.LOGICALNAME := logicalName; ptype.METADATASIGNATURE := metadataSignature; ptype.NAME := name; ptype.UOID := RAWTOHEX(SYS_GUID()); ptype.UPDATETIMESTAMP := SYSDATE; ptype.ATTRIBUTETYPEFQN := attributeTypeFqn; ptype.MODELATTRIBUTEOWNER := modelAttributeOwner; ptype.FIRSTCLASSOBJECT := firstClassObject; ptype.VALUE := value; putTrace('Created ' || toSPrimitiveModelAttribute(ptype) || EOL); RETURN ptype; END newCMPPrimitiveModelAttribute2; -- ========================================================================== -- NewCMPPrimitiveModelAttribute FUNCTION newCMPPrimitiveModelAttribute( logicalName IN VARCHAR2 DEFAULT null ,metadataSignature IN VARCHAR2 DEFAULT null ,name IN VARCHAR2 DEFAULT null ,attributeTypeFqn IN VARCHAR2 DEFAULT null ,primitiveType IN CMPPrimitiveType DEFAULT null ,modelAttributeOwner IN NUMBER DEFAULT 0 ,firstClassObject IN NUMBER DEFAULT 0 ,value IN VARCHAR2 DEFAULT null ) RETURN CMPPrimitiveModelAttribute -- ========================================================================== IS ptype CMPPrimitiveModelAttribute; BEGIN ptype.AGGREGATEDSIGNATURE := SYSDATE; ptype.CREATIONTIMESTAMP := SYSDATE; ptype.ELEMENTID := getNextElementId; ptype.LOGICALNAME := logicalName; ptype.METADATASIGNATURE := metadataSignature; ptype.NAME := name; ptype.UOID := RAWTOHEX(SYS_GUID()); ptype.UPDATETIMESTAMP := SYSDATE; ptype.ATTRIBUTETYPEAGSG := primitiveType.AGGREGATEDSIGNATURE; ptype.ATTRIBUTETYPEFQN := attributeTypeFqn; ptype.ATTRIBUTETYPELUPD := primitiveType.UPDATETIMESTAMP; ptype.ATTRIBUTETYPEUOID := primitiveType.UOID; ptype.ATTRIBUTETYPE := primitiveType.ELEMENTID; ptype.MODELATTRIBUTEOWNER := modelAttributeOwner; ptype.FIRSTCLASSOBJECT := firstClassObject; ptype.VALUE := value; putTrace('Created ' || toSPrimitiveModelAttribute(ptype) || EOL); RETURN ptype; END newCMPPrimitiveModelAttribute; -- ========================================================================== PROCEDURE AddCMPPrimitiveModelAttribute( ptype IN OUT CMPPrimitiveModelAttribute ) -- ========================================================================== IS l_count NUMBER := 0; l_str VARCHAR2(4000); BEGIN select count(1) into l_count from CMPPrimitiveModelAttribute_r where name = ptype.NAME and attributeType=ptype.ATTRIBUTETYPE and modelAttributeOwner=ptype.MODELATTRIBUTEOWNER and workspaceid=ptype.WORKSPACEID and firstClassObject=ptype.FIRSTCLASSOBJECT; If l_count = 1 then l_str := 'select * from CMPPrimitiveModelAttribute_r where name = ''' || ptype.NAME || ''' and attributeType=' || ptype.ATTRIBUTETYPE || ' and modelAttributeOwner=' || ptype.MODELATTRIBUTEOWNER || ' and workspaceid=' || ptype.WORKSPACEID || ' and firstClassObject=' || ptype.FIRSTCLASSOBJECT; EXECUTE IMMEDIATE l_str INTO ptype; putTrace('Found ' || toSPrimitiveModelAttribute(ptype) || EOL); else If l_count = 0 then insert into CMPPrimitiveModelAttribute_r VALUES ptype; putTrace('Inserted ' || toSPrimitiveModelAttribute(ptype) || EOL); else putTrace('Error! Found ' || l_count || ' PrimitiveModelAttributes with same name ''' || ptype.NAME || '''!' || EOL); end if; end if; END; -- ########################################################################## -- ########################################################################## BEGIN -- Outer block - utility functions/variables now defined -- ########################################################################## -- ########################################################################## -- ======================================================= DECLARE -- Inner block for utility function/variable usage -- aka 'user' declarations -- ======================================================= pdef CMPPropertyDefinition := null; platformId NUMBER; genericPlatformId NUMBER; classId NUMBER; propertySetId NUMBER; psdef CMPPropertySetDefinition := null; propertyGroupId NUMBER; pgdef CMPPropertyGroupDefinition := null; strDatatypeId NUMBER; primitiveType CMPPrimitiveType; primitiveModelAttribute CMPPrimitiveModelAttribute; primitiveModelAttribute_0 CMPPrimitiveModelAttribute; padef CMPAnonymousDomain; -- ======================================================= BEGIN -- ======================================================= -- ======================================================= -- oracle/wh/repos/impl/relational/CMPPartition.up.xml -- ======================================================= -- up.xml-> platformId := getPlatformIdByName('ORACLE'); genericPlatformId := getPlatformIdByName('GENERIC'); -- up.xml-> name='oracle.wh.repos.impl.relational.CMPPartition' -- up.xml-> > classId := getClassIdByName(platformId,'oracle.wh.repos.impl.relational.CMPPartition'); -- up.xml-> Position='0' -- up.xml-> definitionKey='8i.PARTITIONS' -- up.xml-> name='DEFAULT' -- up.xml-> propertyType='physical' -- up.xml-> > propertySetId := getPropertySetId(classId, PROPERTYTYPE_PHYSICAL, '8i.PARTITIONS'); -- up.xml-> Position='2' -- up.xml-> definitionKey='8i.PARTITIONS.STORAGESPACE' -- up.xml-> name='STORAGE_SPACE' -- up.xml-> > propertyGroupId := getPropertyGroupId(propertySetId, '8i.PARTITIONS.STORAGESPACE'); -- up.xml-> Position='10' -- up.xml-> dataType='String' -- up.xml-> definitionKey='8i.PARTITIONS.MAXSIZE' -- up.xml-> description='Specify the maximum size of the storage element. Use K, M, G, T, P, E to specify size. Specify UNLIMITED if you do not want to limit the disk space of the storage element.' -- up.xml-> exportControl='public' -- up.xml-> initValue='' -- up.xml-> isPassword='false' -- up.xml-> isTranslatable='false' -- up.xml-> name='MAXSIZE' -- up.xml-> > put('CMPPartition.up.xml -> 8i.PARTITIONS.MAXSIZE'); strDatatypeId := getStringDatatypeId; pdef := getCMPPropertyDefinition( '8i.PARTITIONS.MAXSIZE', --definitionKey null, --name null, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); if (pdef.ELEMENTID is null) then begin put('Add attribute 8i.PARTITIONS.MAXSIZE' || EOL); pdef := newCMPPropertyDefinition( '8i.PARTITIONS.MAXSIZE', --definitionKey getNextElementId, --elementId 'MAXSIZE', --name '139b399028c303248fb78d5547052c42', --metadataSignature RAWTOHEX(SYS_GUID()), --UOID classId, --firstClassObjectId 10, --position 1, --contributeToSignature PROPERTYTYPE_PHYSICAL, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); INSERT INTO CMPPropertyDefinition_r VALUES pdef; end; else put('Exist record ->' || toString(pdef) || EOL); end if; -- up.xml-> Position='11' -- up.xml-> choices=',KEEP,NONE,DEFAULT' -- up.xml-> dataType='String' -- up.xml-> definitionKey='8i.PARTITIONS.FLASH_CACHE' -- up.xml-> description='This property lets you override the automatic buffer cache policy and specify how specific schema objects are cached in flash memory. Specify KEEP if you want the schema object buffers to remain cached in the flash cache as long as the flash cache is large enough. Specify NONE to ensure that the schema object buffers are never cached in the flash cache. Specify DEFAULT if you want the schema object buffers to be written to the flash cache when they are aged out of main memory, and then be aged out of the flash cache with the standard buffer cache replacement algorithm.' -- up.xml-> exportControl='public' -- up.xml-> initValue='' -- up.xml-> isPassword='false' -- up.xml-> isTranslatable='false' -- up.xml-> name='FLASH_CACHE' -- up.xml-> > put('CMPPartition.up.xml -> 8i.PARTITIONS.FLASH_CACHE'); pdef := getCMPPropertyDefinition( '8i.PARTITIONS.FLASH_CACHE', --definitionKey null, --name null, --propertyTypeId null, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); if (pdef.ELEMENTID is null) then begin primitiveType := getCMPPrimitiveType( 'String',--logicalName 'String',--name genericPlatformId,--owningModel genericPlatformId--owningFolder ); padef := newCMPAnonymousDomain('FLASH_CACHE', '9da6bde04705ad97a8c97570a4c0ef63'); padef.DATATYPEFQN := 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPPrimitiveType\String'; padef.datatype := getPrimitiveTypeId('String'); padef.DATATYPEUOID := primitiveType.UOID; padef.OWNINGMODEL := getPlatformIdByname('GENERIC'); padef.OWNINGFOLDER := getPlatformIdByname('GENERIC'); padef.VALUEINTERPRETER := null; padef.chooser := null; AddCMPAnonymousDomain(padef); primitiveModelAttribute_0 := newCMPPrimitiveModelAttribute2( 'DOMAIN_VALUES',--logicalName '2d05e6a5cd06240e32c827025271ea85',--metadataSignature 'DOMAIN_VALUES',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\FLASH_CACHE',--attributeTypeFqn padef.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject null --value ); primitiveModelAttribute_0.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute_0.attributetype := padef.elementid; primitiveModelAttribute_0.attributetypeuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute_0); primitiveModelAttribute := newCMPPrimitiveModelAttribute2( 'DEFAULT',--logicalName '4ea082b7592f7d3a0b35b06512da9bde',--metadataSignature 'DEFAULT',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\FLASH_CACHE',--attributeTypeFqn primitiveModelAttribute_0.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject 'DEFAULT' --value ); primitiveModelAttribute.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute.attributetype := padef.elementid; primitiveModelAttribute.attributetypeuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute); primitiveModelAttribute := newCMPPrimitiveModelAttribute2( 'NONE',--logicalName 'f6ed454f8f6b9213718625786f327935',--metadataSignature 'NONE',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\FLASH_CACHE',--attributeTypeFqn primitiveModelAttribute_0.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject 'NONE' --value ); primitiveModelAttribute.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute.attributetype := padef.elementid; primitiveModelAttribute.attributetypeuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute); primitiveModelAttribute := newCMPPrimitiveModelAttribute2( 'NULL',--logicalName 'f0ca90e35dbd5733cac8a55d387bd36f',--metadataSignature 'NULL',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\FLASH_CACHE',--attributeTypeFqn primitiveModelAttribute_0.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject null --value ); primitiveModelAttribute.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute.attributetype := padef.elementid; primitiveModelAttribute.attributetypeuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute); primitiveModelAttribute := newCMPPrimitiveModelAttribute2( 'KEEP',--logicalName '0b5cf380a474ad21615380e7eac3f209',--metadataSignature 'KEEP',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\FLASH_CACHE',--attributeTypeFqn primitiveModelAttribute_0.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject 'KEEP' --value ); primitiveModelAttribute.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute.attributetype := padef.elementid; primitiveModelAttribute.attributeTYPEuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute); strDatatypeId := getStringDatatypeId; pdef := newCMPPropertyDefinition( '8i.PARTITIONS.FLASH_CACHE', --definitionKey getNextElementId, --elementId 'FLASH_CACHE', --name '7b11bbf8b0f8e73a2638798bd3dc2a72', --metadataSignature RAWTOHEX(SYS_GUID()), --UOID classId, --firstClassObjectId 11, --position 1, --contributeToSignature PROPERTYTYPE_PHYSICAL, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); pdef.TYPE := padef.ELEMENTID; -- Hook up!!!!!! INSERT INTO CMPPropertyDefinition_r VALUES pdef; end; else put('Exist record ->' || toString(pdef) || EOL); end if; -- ======================================================= -- oracle/wh/repos/impl/relational/CMPWBTable.up.xml -- ======================================================= -- up.xml-> platformId := getPlatformIdByName('ORACLE'); genericPlatformId := getPlatformIdByName('GENERIC'); -- up.xml-> name='oracle.wh.repos.impl.relational.CMPWBTable' -- up.xml-> > classId := getClassIdByName(platformId,'oracle.wh.repos.impl.relational.CMPWBTable'); -- up.xml-> Position='1' -- up.xml-> propertyType='logical' -- up.xml-> > propertySetId := getPropertySetId(classId, PROPERTYTYPE_LOGICAL, 'DEFAULT'); if (propertySetId is null) then begin psdef := newCMPPropertySetDefinition( null, --description '1'||':'||'ORACLE'||':'||'DEFAULT'||':'||'0', --logicalName 'eecfd67c9c0db008bafeb566ed612e66', --metadataSignature 'LOGICAL'||':'||'DEFAULT', --name classId, --firstClassObject PROPERTYTYPE_LOGICAL, --propertyType classId, --owningClassDefinition null ); AddCMPPropertySetDefinition(psdef); propertySetId := psdef.ELEMENTID; end; else put('Exist propertySetId ->' || propertySetId || EOL); end if; -- up.xml-> Position='0' -- up.xml-> definitionKey='8i.TABLES.PARTITIONLOGICAL' -- up.xml-> name='PARTITIONLOGICAL' -- up.xml-> > propertyGroupId := getPropertyGroupId(propertySetId, '8i.TABLES.PARTITIONLOGICAL'); if (propertyGroupId is null) then begin pgdef := newCMPPropertyGroupDefinition( '8i.TABLES.PARTITIONLOGICAL',--definitionKey 'PARTITIONLOGICAL',--name '8d0675275b1e0848c9d63960a5df5b7d',--metadataSignature classId,--firstClassObjectId 0,--position propertySetId--propertySetId ); AddCMPPropertyGroupDefinition(pgdef); propertyGroupId := pgdef.ELEMENTID; end; else put('Exist propertyGroupId ->' || propertyGroupId || EOL); end if; -- up.xml-> Position='0' -- up.xml-> choices=',SYSTEM,SYSTEM BY QUANTITY,REFERENCE' -- up.xml-> dataType='String' -- up.xml-> definitionKey='8i.TABLES.PARTITIONLOGICAL.NON_KEY_PARTITIONING_TYPE' -- up.xml-> description='If set, existing Partition Key(s) for other partitioning methods will be ignored even if not dropped.' -- up.xml-> exportControl='public' -- up.xml-> initValue='' -- up.xml-> isHidden='true' -- up.xml-> isPassword='false' -- up.xml-> isTranslatable='true' -- up.xml-> name='NON_KEY_PARTITIONING_TYPE' -- up.xml-> > put('CMPWBTable.up.xml -> 8i.TABLES.PARTITIONLOGICAL.NON_KEY_PARTITIONING_TYPE'); pdef := getCMPPropertyDefinition( '8i.TABLES.PARTITIONLOGICAL.NON_KEY_PARTITIONING_TYPE', --definitionKey null, --name null, --propertyTypeId null, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); if (pdef.ELEMENTID is null) then begin primitiveType := getCMPPrimitiveType( 'String',--logicalName 'String',--name genericPlatformId,--owningModel genericPlatformId--owningFolder ); padef := newCMPAnonymousDomain('NON_KEY_PARTITIONING_TYPE', 'de78d184500ba80c5dbaec3b6783dc02'); padef.DATATYPEFQN := 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPPrimitiveType\String'; padef.datatype := getPrimitiveTypeId('String'); padef.DATATYPEUOID := primitiveType.UOID; padef.OWNINGMODEL := getPlatformIdByname('GENERIC'); padef.OWNINGFOLDER := getPlatformIdByname('GENERIC'); padef.VALUEINTERPRETER := null; padef.chooser := null; AddCMPAnonymousDomain(padef); primitiveModelAttribute_0 := newCMPPrimitiveModelAttribute2( 'DOMAIN_VALUES',--logicalName '2d05e6a5cd06240e32c827025271ea85',--metadataSignature 'DOMAIN_VALUES',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\NON_KEY_PARTITIONING_TYPE',--attributeTypeFqn padef.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject null --value ); primitiveModelAttribute_0.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute_0.attributetype := padef.elementid; primitiveModelAttribute_0.attributetypeuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute_0); primitiveModelAttribute := newCMPPrimitiveModelAttribute2( 'SYSTEM BY QUANTITY',--logicalName '4b68481fa7e250dd3eb976a1c6f2ca54',--metadataSignature 'SYSTEM BY QUANTITY',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\NON_KEY_PARTITIONING_TYPE',--attributeTypeFqn primitiveModelAttribute_0.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject 'SYSTEM BY QUANTITY' --value ); primitiveModelAttribute.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute.attributetype := padef.elementid; primitiveModelAttribute.attributetypeuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute); primitiveModelAttribute := newCMPPrimitiveModelAttribute2( 'SYSTEM',--logicalName 'de56a114a8ab037db4c95bee64192da3',--metadataSignature 'SYSTEM',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\NON_KEY_PARTITIONING_TYPE',--attributeTypeFqn primitiveModelAttribute_0.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject 'SYSTEM' --value ); primitiveModelAttribute.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute.attributetype := padef.elementid; primitiveModelAttribute.attributetypeuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute); primitiveModelAttribute := newCMPPrimitiveModelAttribute2( 'NULL',--logicalName 'f0ca90e35dbd5733cac8a55d387bd36f',--metadataSignature 'NULL',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\NON_KEY_PARTITIONING_TYPE',--attributeTypeFqn primitiveModelAttribute_0.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject null --value ); primitiveModelAttribute.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute.attributetype := padef.elementid; primitiveModelAttribute.attributetypeuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute); primitiveModelAttribute := newCMPPrimitiveModelAttribute2( 'REFERENCE',--logicalName '73fc9112e2a896b8b6f1b35fdce7b14f',--metadataSignature 'REFERENCE',--name 'OMB//\oracle.wh.repos.impl.platform.CMPPlatform\GENERIC\oracle.wh.repos.impl.domain.CMPAnonymousDomain\NON_KEY_PARTITIONING_TYPE',--attributeTypeFqn primitiveModelAttribute_0.ELEMENTID,--modelAttributeOwner padef.ELEMENTID,--firstClassObject 'REFERENCE' --value ); primitiveModelAttribute.attributetypeagsg := padef.AGGREGATEDSIGNATURE; primitiveModelAttribute.attributetype := padef.elementid; primitiveModelAttribute.attributeTYPEuoid := padef.uoid; AddCMPPrimitiveModelAttribute(primitiveModelAttribute); strDatatypeId := getStringDatatypeId; pdef := newCMPPropertyDefinition( '8i.TABLES.PARTITIONLOGICAL.NON_KEY_PARTITIONING_TYPE', --definitionKey getNextElementId, --elementId 'NON_KEY_PARTITIONING_TYPE', --name '1d00bd81df0c43eb8d5c2b92e5e31775', --metadataSignature RAWTOHEX(SYS_GUID()), --UOID classId, --firstClassObjectId 0, --position 1, --contributeToSignature PROPERTYTYPE_LOGICAL, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); pdef.TYPE := padef.ELEMENTID; -- Hook up!!!!!! pdef.HIDDEN := 1; -- isHidden=true INSERT INTO CMPPropertyDefinition_r VALUES pdef; end; else put('Exist record ->' || toString(pdef) || EOL); end if; -- up.xml-> Position='1' -- up.xml-> choices='' -- up.xml-> dataType='String' -- up.xml-> definitionKey='8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT' -- up.xml-> description='The constraint name for Reference Partition.' -- up.xml-> exportControl='public' -- up.xml-> initValue='' -- up.xml-> isHidden='true' -- up.xml-> isPassword='false' -- up.xml-> isTranslatable='true' -- up.xml-> name='PARTITION_BY_REFERENCE_CONSTRAINT' -- up.xml-> > put('CMPWBTable.up.xml -> 8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT'); strDatatypeId := getStringDatatypeId; pdef := getCMPPropertyDefinition( '8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT', --definitionKey null, --name null, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); if (pdef.ELEMENTID is null) then begin put('Add attribute 8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT' || EOL); pdef := newCMPPropertyDefinition( '8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT', --definitionKey getNextElementId, --elementId 'PARTITION_BY_REFERENCE_CONSTRAINT', --name 'd5525bffe43a1531fd7d61bf43fb5694', --metadataSignature RAWTOHEX(SYS_GUID()), --UOID classId, --firstClassObjectId 1, --position 1, --contributeToSignature PROPERTYTYPE_LOGICAL, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); pdef.HIDDEN := 1; -- isHidden=true INSERT INTO CMPPropertyDefinition_r VALUES pdef; end; else put('Exist record ->' || toString(pdef) || EOL); end if; -- up.xml-> Position='2' -- up.xml-> choices='' -- up.xml-> dataType='String' -- up.xml-> definitionKey='8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT' -- up.xml-> description='The count for System Partition.' -- up.xml-> exportControl='public' -- up.xml-> initValue='' -- up.xml-> isHidden='true' -- up.xml-> isPassword='false' -- up.xml-> isTranslatable='true' -- up.xml-> name='PARTITION_BY_SYSTEM_COUNT' -- up.xml-> > put('CMPWBTable.up.xml -> 8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT'); strDatatypeId := getStringDatatypeId; pdef := getCMPPropertyDefinition( '8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT', --definitionKey null, --name null, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); if (pdef.ELEMENTID is null) then begin put('Add attribute 8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT' || EOL); pdef := newCMPPropertyDefinition( '8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT', --definitionKey getNextElementId, --elementId 'PARTITION_BY_SYSTEM_COUNT', --name '7ba487b85e0efe522f42c8283ac04cae', --metadataSignature RAWTOHEX(SYS_GUID()), --UOID classId, --firstClassObjectId 2, --position 1, --contributeToSignature PROPERTYTYPE_LOGICAL, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); pdef.HIDDEN := 1; -- isHidden=true INSERT INTO CMPPropertyDefinition_r VALUES pdef; end; else put('Exist record ->' || toString(pdef) || EOL); end if; -- ======================================================= -- oracle/wh/repos/impl/relational/CMPWBMaterializedView.up.xml -- ======================================================= -- up.xml-> platformId := getPlatformIdByName('ORACLE'); genericPlatformId := getPlatformIdByName('GENERIC'); -- up.xml-> name='oracle.wh.repos.impl.relational.CMPWBMaterializedView' -- up.xml-> > classId := getClassIdByName(platformId,'oracle.wh.repos.impl.relational.CMPWBMaterializedView'); -- up.xml-> Position='3' -- up.xml-> propertyType='logical' -- up.xml-> > propertySetId := getPropertySetId(classId, PROPERTYTYPE_LOGICAL, 'DEFAULT'); if (propertySetId is null) then begin psdef := newCMPPropertySetDefinition( null, --description '1'||':'||'ORACLE'||':'||'DEFAULT'||':'||'0', --logicalName 'eecfd67c9c0db008bafeb566ed612e66', --metadataSignature 'LOGICAL'||':'||'DEFAULT', --name classId, --firstClassObject PROPERTYTYPE_LOGICAL, --propertyType classId, --owningClassDefinition null ); AddCMPPropertySetDefinition(psdef); propertySetId := psdef.ELEMENTID; end; else put('Exist propertySetId ->' || propertySetId || EOL); end if; -- up.xml-> Position='0' -- up.xml-> definitionKey='9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL' -- up.xml-> name='PARTITIONLOGICAL' -- up.xml-> > propertyGroupId := getPropertyGroupId(propertySetId, '9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL'); if (propertyGroupId is null) then begin pgdef := newCMPPropertyGroupDefinition( '9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL',--definitionKey 'PARTITIONLOGICAL',--name 'cd235e8a7cd00e1e2ba3400f6feb042c',--metadataSignature classId,--firstClassObjectId 0,--position propertySetId--propertySetId ); AddCMPPropertyGroupDefinition(pgdef); propertyGroupId := pgdef.ELEMENTID; end; else put('Exist propertyGroupId ->' || propertyGroupId || EOL); end if; -- up.xml-> Position='0' -- up.xml-> choices=',SYSTEM,SYSTEM BY QUANTITY,REFERENCE' -- up.xml-> dataType='String' -- up.xml-> definitionKey='9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.NON_KEY_PARTITIONING_TYPE' -- up.xml-> description='If set, existing Partition Key(s) for other partitioning methods will be ignored even if not dropped.' -- up.xml-> exportControl='public' -- up.xml-> initValue='' -- up.xml-> isHidden='true' -- up.xml-> isPassword='false' -- up.xml-> isTranslatable='true' -- up.xml-> name='NON_KEY_PARTITIONING_TYPE' -- up.xml-> > put('CMPWBMaterializedView.up.xml -> 9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.NON_KEY_PARTITIONING_TYPE'); pdef := getCMPPropertyDefinition( '9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.NON_KEY_PARTITIONING_TYPE', --definitionKey null, --name null, --propertyTypeId null, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); if (pdef.ELEMENTID is null) then begin padef := getCMPAnonymousDomain('NON_KEY_PARTITIONING_TYPE', 'NON_KEY_PARTITIONING_TYPE'); strDatatypeId := getStringDatatypeId; pdef := newCMPPropertyDefinition( '9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.NON_KEY_PARTITIONING_TYPE', --definitionKey getNextElementId, --elementId 'NON_KEY_PARTITIONING_TYPE', --name 'a84b93f8765ff6dddba7406b679ad23e', --metadataSignature RAWTOHEX(SYS_GUID()), --UOID classId, --firstClassObjectId 0, --position 1, --contributeToSignature PROPERTYTYPE_LOGICAL, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); pdef.TYPE := padef.ELEMENTID; -- Hook up!!!!!! pdef.HIDDEN := 1; -- isHidden=true INSERT INTO CMPPropertyDefinition_r VALUES pdef; end; else put('Exist record ->' || toString(pdef) || EOL); end if; -- up.xml-> Position='1' -- up.xml-> choices='' -- up.xml-> dataType='String' -- up.xml-> definitionKey='9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT' -- up.xml-> description='The constraint name for Reference Partition.' -- up.xml-> exportControl='public' -- up.xml-> initValue='' -- up.xml-> isHidden='true' -- up.xml-> isPassword='false' -- up.xml-> isTranslatable='true' -- up.xml-> name='PARTITION_BY_REFERENCE_CONSTRAINT' -- up.xml-> > put('CMPWBMaterializedView.up.xml -> 9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT'); strDatatypeId := getStringDatatypeId; pdef := getCMPPropertyDefinition( '9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT', --definitionKey null, --name null, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); if (pdef.ELEMENTID is null) then begin put('Add attribute 9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT' || EOL); pdef := newCMPPropertyDefinition( '9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_REFERENCE_CONSTRAINT', --definitionKey getNextElementId, --elementId 'PARTITION_BY_REFERENCE_CONSTRAINT', --name 'd419242d757c6ae2a016bb3d96a57973', --metadataSignature RAWTOHEX(SYS_GUID()), --UOID classId, --firstClassObjectId 1, --position 1, --contributeToSignature PROPERTYTYPE_LOGICAL, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); pdef.HIDDEN := 1; -- isHidden=true INSERT INTO CMPPropertyDefinition_r VALUES pdef; end; else put('Exist record ->' || toString(pdef) || EOL); end if; -- up.xml-> Position='2' -- up.xml-> choices='' -- up.xml-> dataType='String' -- up.xml-> definitionKey='8i.TABLES.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT' -- up.xml-> description='The count for System Partition.' -- up.xml-> exportControl='public' -- up.xml-> initValue='' -- up.xml-> isHidden='true' -- up.xml-> isPassword='false' -- up.xml-> isTranslatable='true' -- up.xml-> name='PARTITION_BY_SYSTEM_COUNT' -- up.xml-> > put('CMPWBMaterializedView.up.xml -> 9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT'); strDatatypeId := getStringDatatypeId; pdef := getCMPPropertyDefinition( '9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT', --definitionKey null, --name null, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); if (pdef.ELEMENTID is null) then begin put('Add attribute 9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT' || EOL); pdef := newCMPPropertyDefinition( '9i.MATERIALIZEDVIEWS.PARTITIONLOGICAL.PARTITION_BY_SYSTEM_COUNT', --definitionKey getNextElementId, --elementId 'PARTITION_BY_SYSTEM_COUNT', --name '5fe3f0dcdf2fd20d38eb486310db83bd', --metadataSignature RAWTOHEX(SYS_GUID()), --UOID classId, --firstClassObjectId 2, --position 1, --contributeToSignature PROPERTYTYPE_LOGICAL, --propertyTypeId strDatatypeId, --datatypeId propertyGroupId, --propertyGroupId propertySetId --propertySetId ); pdef.HIDDEN := 1; -- isHidden=true INSERT INTO CMPPropertyDefinition_r VALUES pdef; end; else put('Exist record ->' || toString(pdef) || EOL); end if; -- ======================================================= END; -- Inner block for utility function/variable usage -- ======================================================= -- ########################################################################## END; -- Outer block for utility functions/variables -- ########################################################################## /