/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2016 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
  BEGIN
    EXECUTE IMMEDIATE 'DROP TYPE XXAS_ABSENCE_DATA_VARRAY FORCE';
  EXCEPTION
    WHEN e_obj_not_exists THEN
      NULL;
  END;
  BEGIN
    EXECUTE IMMEDIATE 'DROP TYPE XXAS_ABSENCE_DATA FORCE';
  EXCEPTION
    WHEN e_obj_not_exists THEN
      NULL;
  END;

END;  
/

CREATE OR REPLACE TYPE xxas_absence_data AS OBJECT
  (absence_attendance_id    number
  ,person_id                number
  ,transaction_id           number
  ,transaction_step_id      number
  ,date_start               date
  ,date_end                 date
  ,workflow_status_meaning  varchar2(4000)
  ,absence_type             varchar2(4000)
  ,workflow_status_code     varchar2(4000)
  ,notification_id          number
  ,absence_days             number
  ,absence_hours            number)
/

CREATE OR REPLACE TYPE xxas_absence_data_varray AS
VARRAY(1000000) OF xxas_absence_data;
/

COMMIT;
EXIT;


