/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2014 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

DECLARE
  e_obj_not_exists EXCEPTION;
  PRAGMA EXCEPTION_INIT(e_obj_not_exists, -04043);
BEGIN
  EXECUTE IMMEDIATE 'DROP TYPE XXAS_COM_MENU_ENTRY_TBL';
  EXECUTE IMMEDIATE 'DROP TYPE XXAS_COM_MENU_ENTRY';
EXCEPTION
  WHEN e_obj_not_exists THEN
    NULL;
END;
/

CREATE OR REPLACE TYPE XXAS_COM_MENU_ENTRY AS OBJECT
  (parent_menu_id                 NUMBER
  ,entry_sequence                 NUMBER
  ,prompt                         VARCHAR2(60)
  ,description                    VARCHAR2(240)
  ,menu_id                        NUMBER
  ,menu_name                      VARCHAR2(30)
  ,function_id                    NUMBER
  ,function_name                  VARCHAR2(480)
  ,object_id                      NUMBER
  ,obj_name                       VARCHAR2(430)
  ,function_parameters            VARCHAR2(2000)
  ,function_icon                  VARCHAR2(30));
/

CREATE OR REPLACE TYPE XXAS_COM_MENU_ENTRY_TBL AS TABLE OF XXAS_COM_MENU_ENTRY
/

COMMIT;
EXIT;
