Rem drv: <create type="types"/>
Rem
Rem $Header: emcore/source/oracle/sysman/emdrep/sql/core/latest/gccompliance/gccompliance_types.sql rbali_oneoff_updated/1 2025/03/14 06:41:14 rbali Exp $
Rem
Rem gccompliance_types.sql
Rem
Rem Copyright (c) 2010, 2025, Oracle and/or its affiliates. 
Rem All rights reserved.

Rem BEGIN EMRU_FILE_METADATA
Rem EMRU_SOURCE_FILE:emcore/source/oracle/sysman/emdrep/sql/core/latest/gccompliance/gccompliance_types.sql
Rem EMRU_UNIX_DELIVERABLES:
Rem emcore/source/oracle/sysman/emdrep/sql/core/latest/gccompliance/gccompliance_types.sql

Rem EMRU_FILE_POSTINSTALL:<!!! enter the view based location of the executable file. If there is NONE leave as-is !!!>
Rem EMRU_GENERIC_FLAG:NONE
Rem END EMRU_FILE_METADATA

Rem
Rem    NAME
Rem      gccompliance_types.sql - <one-line expansion of the name>
Rem
Rem    DESCRIPTION
Rem      <short description of component this file declares/defines>
Rem
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    gbafna      02/03/25 - 
Rem    gbafna      01/07/25 - make synonyms noneditionable
Rem    rnadidar    02/11/15 - cut over to EBR
Rem    phzhou      08/23/12 - Bug 14357530 - EMSQL-ID:50VNTTJ94861P CPU+IO
Rem                           TIME/EXEC OF 2.61 EXCEEDS 1.5S FOR UI SQL
Rem    suvmalho    04/02/10 - Created
Rem

-- Included the content of the following files
-- @&EM_SQL_ROOT/core/11.2.0.1/gccompliance/gccompliance_types.sql
-- @&EM_SQL_ROOT/core/12.1.0.2/gccompliance/gccompliance_types.sql

ALTER SESSION SET CURRENT_SCHEMA=SYSMAN_TYPES;

CREATE OR REPLACE TYPE EM_CS_NODE_INFO AS OBJECT
(
        ROOT_CS_GUID RAW(16),
        RQS_GUID RAW (16),
        NODE_GUID RAW (16),
        NODE_TYPE NUMBER (1,0) -- 1 - ICS/CS, 2- RF, 3- RULE
);
/

grant execute on EM_CS_NODE_INFO to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CS_NODE_INFO');
END;
/


CREATE OR REPLACE TYPE EM_CS_NODE_ARRAY IS TABLE OF EM_CS_NODE_INFO;
/

grant execute on EM_CS_NODE_ARRAY to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CS_NODE_ARRAY');
END;
/

CREATE OR REPLACE TYPE EM_CSG_NODE_INFO AS OBJECT
(
        NODE_GUID RAW (16),
        NODE_TYPE NUMBER (1,0) --  1 - CSG, 2- SUBGROUP, 3-CS
);
/

grant execute on EM_CSG_NODE_INFO to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CSG_NODE_INFO');
END;
/

CREATE OR REPLACE TYPE EM_CSG_NODE_ARRAY IS TABLE OF EM_CSG_NODE_INFO;
/

grant execute on EM_CSG_NODE_ARRAY to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CSG_NODE_ARRAY');
END;
/

ALTER SESSION SET CURRENT_SCHEMA=SYSMAN;


CREATE OR REPLACE  TYPE EM_POST_UPDATE_LIST IS TABLE OF NUMBER(2);
/


CREATE OR REPLACE TYPE EM_CS_ASSOC_EDIT_VERSION AS OBJECT
(
        RQS_GUID RAW (16),
        NODE_GUID RAW (16),
        NODE_TYPE NUMBER (1,0), -- 1 - ICS/CS, 2- RF, 3- RULE
        EDIT_VERSION NUMBER,
        CRITICAL_EDIT_VERSION NUMBER,
        TARGET_GUID RAW(16)
);
/

CREATE OR REPLACE TYPE EM_CS_ASSOC_EDIT_VERSION_ARR IS TABLE OF EM_CS_ASSOC_EDIT_VERSION;
/


CREATE OR REPLACE TYPE EM_RULE_VERSION AS OBJECT
(
        RULE_GUID RAW (16),
        EDIT_VERSION NUMBER,
        CRITICAL_EDIT_VERSION NUMBER
);
/

CREATE OR REPLACE TYPE EM_RULE_VERSION_ARRAY IS TABLE OF EM_RULE_VERSION;
/


CREATE OR REPLACE TYPE EM_CS_HIERARCHY_OP AS OBJECT
(
        NODE_GUID RAW (16),
        NODE_TYPE NUMBER (1,0) -- 1 - ICS/CS, 2- RF, 3- RULE
)NOT FINAL;
/

CREATE OR REPLACE TYPE EM_CS_HIER_ADD_NODE UNDER EM_CS_HIERARCHY_OP
(
        POSITION      NUMBER,
        PARENT_GUID   RAW(16),
        PARENT_TYPE   NUMBER
);
/

CREATE OR REPLACE TYPE EM_CS_HIER_MOVE_NODE UNDER EM_CS_HIERARCHY_OP
(
        OLD_POSITION      NUMBER,
        OLD_PARENT_GUID   RAW(16),
        NEW_POSITION      NUMBER,
        NEW_PARENT_GUID   RAW(16)
);
/

CREATE OR REPLACE TYPE EM_CS_HIER_REM_NODE UNDER EM_CS_HIERARCHY_OP
(
        POSITION      NUMBER,
        PARENT_GUID   RAW(16)
);
/

CREATE OR REPLACE TYPE EM_CS_HIERARCHY_OP_ARR IS TABLE OF EM_CS_HIERARCHY_OP;
/


CREATE OR REPLACE TYPE EM_COMPLIANCE_ASSOC_OP AS OBJECT
(
        ROOT_CS_GUID      RAW(16),
        ROOT_TARGET_GUID  RAW(16)
)NOT FINAL;
/

CREATE OR REPLACE TYPE EM_COMPLIANCE_ADD_ASSOC UNDER EM_COMPLIANCE_ASSOC_OP
(
);
/

CREATE OR REPLACE TYPE EM_COMPLIANCE_REM_ASSOC UNDER EM_COMPLIANCE_ASSOC_OP
(
);
/

CREATE OR REPLACE TYPE EM_COMPLIANCE_EDIT_ASSOC UNDER EM_COMPLIANCE_ASSOC_OP
(
        RULE_GUID     RAW(16),
        RQS_GUID      RAW(16),
        RULE_TYPE     NUMBER(1),
        TARGET_GUID   RAW(16),
        STATUS        NUMBER(2)
);
/

CREATE OR REPLACE TYPE EM_COMPLIANCE_ASSOC_OP_ARR IS TABLE OF EM_COMPLIANCE_ASSOC_OP;
/


CREATE OR REPLACE TYPE EM_CS_STRING_ARRAY AS TABLE OF VARCHAR2(64);
/


CREATE OR REPLACE TYPE EM_CS_NUMBER_ARRAY AS TABLE OF NUMBER;
/


CREATE OR REPLACE TYPE EM_CSG_EVAL_SUMM_ROW AS OBJECT
(
        CSG_GUID RAW(16),
        CSG_INAME VARCHAR2(128),
        CSG_DNAME VARCHAR2(128),
        AUTHOR  VARCHAR2(256),
        VERSION NUMBER,
        LIFECYCLE_STATUS NUMBER,
        CRIT_VIOLATIONS NUMBER,
        WARN_VIOLATIONS NUMBER,
        MWARN_VIOLATIONS NUMBER,
        CRIT_EVALS  NUMBER,
        WARN_EVALS  NUMBER,
        COMPLIANT_EVALS  NUMBER,
        COMPLIANCE_SCORE NUMBER(3),
	csg_dname_nls NVARCHAR2(1000),
	csg_dname_nlsid VARCHAR2(256)
);
/


CREATE OR REPLACE TYPE EM_CSG_EVAL_SUMM AS TABLE OF EM_CSG_EVAL_SUMM_ROW;
/


CREATE OR REPLACE TYPE EM_CSG_SG_EVAL AS OBJECT
(
        COMPLIANCE_SCORE NUMBER,
        CRIT_VIOLATIONS NUMBER,
        WARN_VIOLATIONS NUMBER,
        MWARN_VIOLATIONS NUMBER,
        CRIT_EVALS  NUMBER,
        WARN_EVALS  NUMBER,
        COMPLIANT_EVALS  NUMBER,
        NUMERATOR NUMBER,
        DENOMINATOR NUMBER

);
/


CREATE OR REPLACE TYPE EM_CSG_EVAL_BY_TARGET_ROW AS OBJECT
(
        ROOT_TARGET_GUID RAW(16),
        TARGET_GUID RAW(16),
        ROOT_TARGET_NAME VARCHAR2(256),
        ROOT_TARGET_TYPE VARCHAR2(128),
        TARGET_NAME VARCHAR2(256),
        TARGET_TYPE VARCHAR2(128),
        CRIT_VIOLATIONS NUMBER,
        WARN_VIOLATIONS NUMBER,
        MWARN_VIOLATIONS NUMBER,
        COMPLIANCE_SCORE NUMBER(3),
        NUMERATOR NUMBER,
        DENOMINATOR NUMBER
);
/

CREATE OR REPLACE TYPE EM_CSG_EVAL_BY_TARGET AS TABLE OF EM_CSG_EVAL_BY_TARGET_ROW;
/


CREATE OR REPLACE TYPE cs_eval_summ_row AS OBJECT 
(
        cs_guid                  RAW(16),
        cs_dname                 VARCHAR2(128),
        cs_iname                 VARCHAR2(128),
        version                  NUMBER,
        author 			 VARCHAR2(256),
        lifecycle_status         NUMBER,
        type_display_name        VARCHAR2(128),
        crit_violations          NUMBER,
        warn_violations          NUMBER,
        mwarn_violations         NUMBER,
        compliant_targets        NUMBER,
        critical_targets         NUMBER,
        warning_targets          NUMBER,
        compliance_score         NUMBER,
        target_name              VARCHAR2(256),
        target_type              VARCHAR2(64),
	cs_dname_nls NVARCHAR2(1000),
	cs_dname_nlsid VARCHAR2(256)
);
/

CREATE OR REPLACE TYPE cs_eval_summ AS TABLE OF cs_eval_summ_row;
/


CREATE OR REPLACE TYPE EM_CSG_EVAL_SUMM_TREND_ROW AS OBJECT
(
        CSG_GUID RAW(16),
        CSG_INAME VARCHAR2(128),
        CSG_DNAME VARCHAR2(128),
        AUTHOR  VARCHAR2(256),
        VERSION NUMBER,
        LIFECYCLE_STATUS NUMBER,
        AVG_VIOLATIONS NUMBER,
        TOTAL_EVALS NUMBER,
        COMPLIANCE_SCORE NUMBER(3),
        NUM_EVALS_0_20 NUMBER,
        NUM_EVALS_20_40 NUMBER,
        NUM_EVALS_40_60 NUMBER,
        NUM_EVALS_60_80 NUMBER,
        NUM_EVALS_80_100 NUMBER,
        SNAPSHOT_TS DATE
);
/


CREATE OR REPLACE TYPE EM_CSG_EVAL_SUMM_TREND AS TABLE OF EM_CSG_EVAL_SUMM_TREND_ROW;
/


CREATE OR REPLACE TYPE EM_ASSOCIABLE_CS_ROW AS OBJECT
(
        CS_GUID RAW(16),
        CS_INAME VARCHAR2(128),
        CS_DNAME VARCHAR2(128),
        AUTHOR  VARCHAR2(256),
        VERSION NUMBER,
        LIFECYCLE_STATUS NUMBER,
        SYSTEM_TYPE NUMBER,
        TARGET_GUID RAW(16)
);
/


CREATE OR REPLACE TYPE EM_ASSOCIABLE_CS AS TABLE OF EM_ASSOCIABLE_CS_ROW;
/

CREATE OR REPLACE TYPE EM_RULETEST_PARAMS AS OBJECT
(
    PARAM_NAME         VARCHAR2(64),
    PARAM_TYPE         NUMBER(1),
    PARAM_VALUE        VARCHAR2(64)
);
/

CREATE OR REPLACE TYPE EM_RULETEST_PARAMS_ARR IS TABLE OF EM_RULETEST_PARAMS; 
/

ALTER SESSION SET CURRENT_SCHEMA=SYSMAN_TYPES;


CREATE OR REPLACE TYPE EM_CS_NODE IS OBJECT (
    NODE_GUID       RAW (16),
    NODE_TYPE       NUMBER (1,0), -- 1 - ICS/CS, 2- RF, 3- RULE
    OP_TYPE         NUMBER (2,0),
    ROOT_CS_GUID    RAW(16),
    RQS_GUID        RAW(16),
    RULE_TYPE       NUMBER(1,0),
    
    STATIC FUNCTION NEW(
        P_NODE_GUID       IN RAW,
        P_NODE_TYPE       IN NUMBER,
        P_OP_TYPE         IN NUMBER DEFAULT 0,
        P_ROOT_CS_GUID    IN RAW,
        P_RQS_GUID        IN RAW,
        P_RULE_TYPE       IN NUMBER DEFAULT 0
    )RETURN EM_CS_NODE
);
/

grant execute on EM_CS_NODE to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CS_NODE');
END;
/

CREATE OR REPLACE TYPE EM_CS_NODE_TABLE IS VARRAY(5000) OF EM_CS_NODE;
/

grant execute on EM_CS_NODE_TABLE to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CS_NODE_TABLE');
END;
/

CREATE OR REPLACE TYPE EM_CS_ASSOC_NODE IS OBJECT (
    ROOT_CS_GUID       RAW (16),
    ROOT_TARGET_GUID   RAW(16),
    OP_TYPE            NUMBER (2,0),
    TARGET_GUID        RAW(16),
    RULE_GUID          RAW(16),
    RQS_GUID           RAW(16),
    RULE_TYPE          NUMBER(1,0),
    
    STATIC FUNCTION NEW(
        P_ROOT_CS_GUID       IN RAW,
        P_ROOT_TARGET_GUID   IN RAW,
        P_OP_TYPE            IN NUMBER,
        P_TARGET_GUID        IN RAW DEFAULT NULL,
        P_RULE_GUID          IN RAW DEFAULT NULL,
        P_RQS_GUID           IN RAW DEFAULT NULL,
        P_RULE_TYPE          IN NUMBER DEFAULT 0
    )  RETURN EM_CS_ASSOC_NODE
);
/

grant execute on EM_CS_ASSOC_NODE to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CS_ASSOC_NODE');
END;
/

CREATE OR REPLACE TYPE EM_CS_ASSOC_NODE_TABLE IS TABLE OF EM_CS_ASSOC_NODE;
/

grant execute on EM_CS_ASSOC_NODE_TABLE to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CS_ASSOC_NODE_TABLE');
END;
/

ALTER SESSION SET CURRENT_SCHEMA=SYSMAN;

CREATE OR REPLACE TYPE cs_eval_popup_summ_row AS OBJECT
(
    root_cs_guid             RAW(16),
    target_name              VARCHAR2(256),
    compliance_score         NUMBER,
    last_evaluation_date     DATE,
    compliance_score_level   NUMBER,
    crit_violations          NUMBER,
    root_target_guid         RAW(16),        
    warn_violations          NUMBER,
    mwarn_violations         NUMBER,
    target_type VARCHAR2(256)
        
);
/


CREATE OR REPLACE TYPE cs_eval_popup_summ AS TABLE OF cs_eval_popup_summ_row;
/

CREATE OR REPLACE TYPE grp_region_member_summ_row AS OBJECT
(
    crit_violations          NUMBER,            
    warn_violations          NUMBER,
    mwarn_violations         NUMBER,
    compliance_score         NUMBER,
    member_target_guid       RAW(16),
    member_target_name       VARCHAR2(256),
    member_type_display_name VARCHAR2(256),
    member_target_type   VARCHAR2(256)
        
);
/

CREATE OR REPLACE TYPE grp_region_member_summ AS TABLE OF grp_region_member_summ_row;
/

CREATE OR REPLACE TYPE grp_rgn_tgt_ovw_summ_row AS OBJECT
(
    cs_guid                  RAW(16),
    cs_dname                 VARCHAR2(256),
    cs_iname                 VARCHAR2(256),
    author                   VARCHAR2(256),
    version                  NUMBER,
    crit_violations          NUMBER,            
    warn_violations          NUMBER,
    mwarn_violations         NUMBER,
    compliance_score         NUMBER,
    target_guid              RAW(16),
    target_type              VARCHAR2(256),
    target_name          VARCHAR2(256),
    cs_dname_nlsid VARCHAR2(256)
        
);
/

CREATE OR REPLACE TYPE grp_rgn_tgt_ovw_summ AS TABLE OF grp_rgn_tgt_ovw_summ_row;
/

CREATE OR REPLACE  TYPE EM_COMPLIANCE_GUID_LIST IS TABLE OF RAW(16);
/

CREATE OR REPLACE TYPE EM_CS_ASSOC_PU AS OBJECT
(
    CS_GUID            RAW (16),
    RULE_GUID          RAW (16) 
);
/

CREATE OR REPLACE TYPE EM_CS_ASSOC_PU_ARR IS TABLE OF EM_CS_ASSOC_PU;
/

CREATE OR REPLACE TYPE EM_CS_TGT_ASSOC_ARR_OBJ AS OBJECT
(
    ROOT_CS_GUID RAW(16),
    CS_GUID RAW(16),
    RQS_GUID RAW(16),
    ROOT_TARGET_GUID RAW(16),
    TARGET_GUID RAW(16)
);
/

CREATE OR REPLACE TYPE EM_CS_TGT_ASSOC_ARR AS TABLE OF EM_CS_TGT_ASSOC_ARR_OBJ;
/

CREATE OR REPLACE TYPE EM_CS_ASSOC_EDIT AS OBJECT
(
    ROOT_CS_GUID             RAW(16),
    ROOT_TARGET_GUID         RAW(16),
    EDIT_VERSION             NUMBER,
    CRITICAL_EDIT_VERSION    NUMBER
);
/

CREATE OR REPLACE TYPE EM_CS_ASSOC_EDIT_ARR AS TABLE OF EM_CS_ASSOC_EDIT;
/

CREATE OR REPLACE TYPE included_standard_row AS OBJECT
(
    CS_GUID                   RAW(16) ,
    CS_INAME                  VARCHAR2(128) ,
    CS_DNAME                  VARCHAR2(128) ,
    TARGET_TYPE               VARCHAR2(128) ,
    AUTHOR                    VARCHAR2(256),
    OWNER                     VARCHAR2(256),
    VERSION                   NUMBER(3,0) ,
    LIFECYCLE_STATUS          NUMBER(1,0) ,
    DESCRIPTION VARCHAR2(800),
    CS_TYPE                   NUMBER(1,0),
    DESCRIPTION_NLSID         VARCHAR2(64)  ,
    CS_DNAME_NLSID            VARCHAR2(64) 
);
/

CREATE OR REPLACE TYPE included_standard_summ AS TABLE OF included_standard_row;
/

show errors;


CREATE OR REPLACE TYPE EM_ICS_TARGET_ROW AS OBJECT
(
    ROOT_CS_GUID                   RAW(16) ,
    CS_GUID                   RAW(16) ,
    RQS_GUID                   RAW(16) ,
    ROOT_TARGET_GUID                   RAW(16) ,
    TARGET_GUID                   RAW(16) ,
    CS_NAME                  VARCHAR2(128) ,
    TARGET_NAME			VARCHAR2(128) ,
    TARGET_TYPE			VARCHAR2(128) ,
    TOTAL_VIOLATIONS          NUMBER(4,0),
    SEVERITY         NUMBER(2,0)  ,
    cs_name_nlsid    VARCHAR2(256)
);
/


CREATE OR REPLACE TYPE EM_ICS_TARGET AS TABLE OF EM_ICS_TARGET_ROW;
/

 CREATE OR REPLACE TYPE CS_VIOLS_ROW AS OBJECT
(
    RULE_NAME VARCHAR2(256) ,
    TARGET_NAME                 VARCHAR2(256) ,
    SEVERITY         NUMBER(2,0),
    RECOMMENDATION VARCHAR2(800) ,
    TARGET_TYPE                 VARCHAR2(256) ,
    ROOT_CS_GUID                   RAW(16) ,
    EVENT_INSTANCE_ID	RAW(16) ,
    EVENT_SEQ_ID RAW(16) ,
    KEYWORDS  VARCHAR2(800) ,
    LIFECYCLE_STATUS  VARCHAR2(256)  ,
    TARGET_GUID                   RAW(16) ,
    rule_name_nlsid VARCHAR2(256),
    recommendation_nlsid VARCHAR2(256)

);
/

CREATE OR REPLACE TYPE CS_VIOLS AS TABLE OF CS_VIOLS_ROW;
/

 CREATE OR REPLACE TYPE CSG_VIOLS_ROW AS OBJECT
(
    RULE_NAME VARCHAR2(256) ,
    TARGET_NAME                 VARCHAR2(256) ,
    SEVERITY         NUMBER(2,0),
    RECOMMENDATION VARCHAR2(800) ,
    TARGET_TYPE                 VARCHAR2(256) ,
    ROOT_CSG_GUID                   RAW(16) ,
    EVENT_INSTANCE_ID	RAW(16) ,
    EVENT_SEQ_ID RAW(16) ,
    KEYWORDS  VARCHAR2(800) ,
    LIFECYCLE_STATUS  VARCHAR2(256)  ,
    TARGET_GUID                   RAW(16) ,
    rule_name_nlsid VARCHAR2(256),
    recommendation_nlsid VARCHAR2(256)
);
/

CREATE OR REPLACE TYPE CSG_VIOLS AS TABLE OF CSG_VIOLS_ROW;
/
 
show errors;


CREATE OR REPLACE TYPE EM_RULE_ROW AS OBJECT (
       AUTHOR					VARCHAR2(256), 
       CHECK_GUID				RAW(16), 
       CLEAR_MESSAGE			NVARCHAR2(1000), 
       CLEAR_MESSAGE_NLSID 	VARCHAR2(64),
       CRITICAL_EDIT_VERSION	NUMBER(8), 
       RULE_DNAME				NVARCHAR2(1000),
       RULE_DNAME_NLSID			VARCHAR2(64),  
       DESCRIPTION				NVARCHAR2(1000),
       DESCRIPTION_NLSID		VARCHAR2(64), 
       EDIT_VERSION				NUMBER(8), 
       EVAL_ALWAYS				NUMBER(1), 
       FIXTEXT					NVARCHAR2(1000),
       FIXTEXT_NLSID			VARCHAR2(64), 
       IS_DELETED				NUMBER(1), 
       IS_SYSTEM				NUMBER(1), 
       LAST_UPDATED_BY			VARCHAR2(256), 
       LAST_UPDATED_DATE		DATE, 
       LIFECYCLE_STATE			NUMBER(1), 
       MESSAGE					NVARCHAR2(1000),
       MESSAGE_NLSID			VARCHAR2(64), 
       OWNER					VARCHAR2(256), 
       RATIONALE				NVARCHAR2(1000), 
       RATIONALE_NLSID			VARCHAR2(64), 
       REFERENCE_URL			VARCHAR2(4000), 
       RULE_GUID				RAW(16), 
       RULE_INAME				VARCHAR2(256), 
       RULE_TYPE				NUMBER(1), 
       SEVERITY					NUMBER(2), 
       TABLE_NAMES				MGMT_SHORT_STRING_TABLE,
       TARGET_TYPE				VARCHAR2(256), 
       VERSION					NUMBER(3), 
       WARNING					NVARCHAR2(1000),
       WARNING_NLSID			VARCHAR2(64)
);
/

CREATE OR REPLACE TYPE EM_RULE_ROW_TABLE AS TABLE OF EM_RULE_ROW;
/



CREATE OR REPLACE TYPE MGMT_CS_LIB_ROW AS OBJECT (
       AUTHOR								VARCHAR2(256), 
       AUTO_ENABLE							NUMBER(1), 
       CREATED_DATE							DATE, 
       CRITICAL_EDIT_VERSION				NUMBER(8),
       CS_DNAME								NVARCHAR2(1000), 
       CS_DNAME_NLSID						VARCHAR2(64), 
       CS_GUID								RAW(16), 
       CS_INAME								VARCHAR2(128),				
       DESCRIPTION							NVARCHAR2(1000), 
       DESCRIPTION_NLSID					VARCHAR2(64), 
       EDIT_VERSION							NUMBER(8),
       FRONT_MATTER							NVARCHAR2(1000), 
       FRONT_MATTER_NLSID					VARCHAR2(64), 
       IS_DELETED							NUMBER(1), 
       IS_HIDDEN							NUMBER(1), 
       IS_LOCKED							NUMBER(1), 
       IS_ROLLUP_PLAN_VALID					NUMBER(1), 
       IS_SYSTEM							NUMBER(1),
       CS_TYPE								NUMBER(1),
       LAST_UPDATED_BY						VARCHAR2(256), 
       LAST_UPDATED_DATE					DATE, 
       LIFECYCLE_STATUS						NUMBER(1), 
       LOCKED_BY							VARCHAR2(256), 
       LOCKED_TIME							DATE,
       NOTICE								NVARCHAR2(1000), 
       NOTICE_NLSID							VARCHAR2(64), 
       OWNER								VARCHAR2(256),
       REAR_MATTER							NVARCHAR2(1000),
       REAR_MATTER_NLSID					VARCHAR2(64), 
       REFERENCE_URL						VARCHAR2(4000), 
       RQS_HIERARCHY_VALID					NUMBER(1), 
       TARGET_TYPE							VARCHAR2(128), 
       VERSION								NUMBER(3)
);
/

CREATE OR REPLACE TYPE MGMT_CS_LIB_ROW_TABLE AS TABLE OF MGMT_CS_LIB_ROW;
/



CREATE OR REPLACE TYPE EM_CMP_FRMWRK_ROW AS OBJECT (
       AUTHOR							VARCHAR2(256), 
       CREATED_DATE						DATE, 
       CRITICAL_EDIT_VERSION			NUMBER(16),
       CSG_DNAME						NVARCHAR2(1000),
       CSG_DNAME_NLSID					VARCHAR2(64), 
       CSG_GUID							RAW(16), 
       CSG_INAME						VARCHAR2(128),
       DESCRIPTION						NVARCHAR2(1000), 
       DESCRIPTION_NLSID				VARCHAR2(64), 
       EDIT_VERSION						NUMBER(16),
       FRONT_MATTER						NVARCHAR2(1000), 
       FRONT_MATTER_NLSID				VARCHAR2(64), 
       IS_DELETED						NUMBER(1), 
       IS_HIDDEN						NUMBER(1), 
       IS_LOCKED						NUMBER(1), 
       IS_ROLLUP_PLAN_VALID				NUMBER(1), 
       IS_SYSTEM						NUMBER(1), 
       LAST_UPDATED_BY					VARCHAR2(256), 
       LAST_UPDATED_DATE				DATE, 
       LIFECYCLE_STATUS					NUMBER(1), 
       LOCKED_BY						VARCHAR2(256), 
       LOCKED_TIME						DATE,
       NOTICE							NVARCHAR2(1000), 
       NOTICE_NLSID						VARCHAR2(64), 
       OWNER							VARCHAR2(256),
       REAR_MATTER						NVARCHAR2(1000), 
       REAR_MATTER_NLSID				VARCHAR2(64), 
       REFERENCE_URL					VARCHAR2(4000), 
       VERSION							NUMBER(4)
);
/

CREATE OR REPLACE TYPE EM_CMP_FRMWRK_ROW_TABLE AS TABLE OF EM_CMP_FRMWRK_ROW;
/



CREATE OR REPLACE TYPE EM_CMP_GROUP_ROW AS OBJECT (
		CSG_GUID			RAW(16),
		CSG_INAME			VARCHAR2(128),
		CSG_DNAME			NVARCHAR2(1000),
		AUTHOR				VARCHAR2(256),
		VERSION				NUMBER(4),
		LIFECYCLE_STATUS		NUMBER(1),
		csg_dname_nlsid VARCHAR2(256)
);
/

CREATE OR REPLACE TYPE EM_CMP_GROUP_ROW_TABLE AS TABLE OF EM_CMP_GROUP_ROW;
/

ALTER SESSION SET CURRENT_SCHEMA=SYSMAN_TYPES;

CREATE OR REPLACE TYPE EM_CS_ASSOC_INST_GUID_OBJ AS OBJECT (
    ASSOC_TYPE                                         VARCHAR2(256),
    SOURCE_ME_GUID                                     RAW(16),
    DEST_ME_GUID                                       RAW(16)
);
/


grant execute on EM_CS_ASSOC_INST_GUID_OBJ to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CS_ASSOC_INST_GUID_OBJ');
END;
/

CREATE OR REPLACE TYPE EM_CS_ASSOC_INST_GUID_LIST AS TABLE OF EM_CS_ASSOC_INST_GUID_OBJ;
/

grant execute on EM_CS_ASSOC_INST_GUID_LIST to sysman;

BEGIN
    SYSMAN.CUTOVER_SYNONYM('EM_CS_ASSOC_INST_GUID_LIST');
END;
/

ALTER SESSION SET CURRENT_SCHEMA=SYSMAN;


create or replace type EM_CS_RULE_DESC as object (
    iname                                         varchar2(256),
    target_type                                    varchar2(256),
    
    static function new(
        iname_i                    in varchar2,
        target_type_i              in varchar2
    ) return EM_CS_RULE_DESC
);
/


create or replace type EM_CS_RULE_DESC_LIST as table of EM_CS_RULE_DESC;
/


create or replace type EM_CS_STD_DESC as object (
    iname                                       varchar2(128),
    author                                      varchar2(256),
    version                                     number,
    
    static function new(
        iname_i           in varchar2,
        author_i          in varchar2,
        version_i         in number
    ) return EM_CS_STD_DESC
);
/

create or replace type EM_CS_STD_DESC_LIST as table of EM_CS_STD_DESC;
/

create or replace type EM_CS_CF_DESC as object (
    iname                                       varchar2(128),
    author                                      varchar2(256),
    version                                     number(4),
    
    static function new(
        iname_i           in varchar2,
        author_i          in varchar2,
        version_i         in number
    ) return EM_CS_CF_DESC
);
/

create or replace type EM_CS_CF_DESC_LIST as table of EM_CS_CF_DESC;
/

create or replace type EM_CS_FACET_DESC as object (
    iname                                        varchar2(128),
    etype_iname                                  varchar2(128),
    target_type                                  varchar2(64),
    
    static function new(
        iname_i                in varchar2,
        etype_iname_i          in varchar2,
        target_type_i          in varchar2
    ) return EM_CS_FACET_DESC
);
/

create or replace type EM_CS_FACET_DESC_LIST as table of EM_CS_FACET_DESC;
/

show errors;


@&EM_SQL_ROOT/core/12.1.0.3/gccompliance/gccompliance_types.sql
@&EM_SQL_ROOT/core/12.1.0.4/gccompliance/gccompliance_types.sql
@&EM_SQL_ROOT/core/12.2.0.0/emInternalSDK/gccompliance/gccompliance_types.sql
@&EM_SQL_ROOT/core/12.2.0.0/gccompliance/gccompliance_types.sql



