/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2013 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_EMP_CONTACT_VARRAY';
  EXECUTE IMMEDIATE 'DROP TYPE XXAS_EMP_CONTACT_TYPE';
EXCEPTION
  WHEN e_obj_not_exists THEN
    NULL;
END;
/

CREATE OR REPLACE TYPE XXAS_EMP_CONTACT_TYPE AS OBJECT
  (person_id             number
  ,pending_person_id     number
  ,assignment_id         number
  ,instance_pk1_value    varchar2(30)
  ,instance_pk2_value    varchar2(30)
  ,instance_pk3_value    varchar2(30)
  ,instance_pk4_value    varchar2(30)
  ,instance_pk5_value    varchar2(30)
  ,delete_allowed        varchar2(30)
  ,status_icon           varchar2(30)
  ,status_color          varchar2(30)
  ,status_text           varchar2(400)
  ,main_text             varchar2(400)
  ,sub_text              varchar2(400))
/

CREATE OR REPLACE TYPE XXAS_EMP_CONTACT_VARRAY AS
VARRAY(100000) OF xxas_emp_contact_type
/

COMMIT;
EXIT;
