/* $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_cost_allocation_tbl force';
  EXECUTE IMMEDIATE 'DROP TYPE xxas_cost_allocation_type force';
EXCEPTION
  WHEN e_obj_not_exists THEN
    NULL;
END;
/

create or replace TYPE xxas_cost_allocation_type AS OBJECT
  (cost_allocation_id    number
  ,assignment_id         number
  ,business_group_id     number
  ,proportion            number
  ,segment1              varchar2(400)
  ,segment2              varchar2(400)
  ,segment3              varchar2(400)
  ,segment4              varchar2(400)
  ,segment5              varchar2(400)
  ,segment6              varchar2(400)
  ,segment7              varchar2(400)
  ,segment8              varchar2(400)
  ,segment9              varchar2(400)
  ,segment10             varchar2(400)
  ,segment11             varchar2(400)
  ,segment12             varchar2(400)
  ,segment13             varchar2(400)
  ,segment14             varchar2(400)
  ,segment15             varchar2(400)
  ,segment16             varchar2(400)
  ,segment17             varchar2(400)
  ,segment18             varchar2(400)
  ,segment19             varchar2(400)
  ,segment20             varchar2(400)
  ,segment21             varchar2(400)
  ,segment22             varchar2(400)
  ,segment23             varchar2(400)
  ,segment24             varchar2(400)
  ,segment25             varchar2(400)
  ,segment26             varchar2(400)
  ,segment27             varchar2(400)
  ,segment28             varchar2(400)
  ,segment29             varchar2(400)
  ,segment30             varchar2(400)
  ,start_date            date
  ,end_date              date
  ,object_version_number number
  );
/

CREATE OR REPLACE TYPE xxas_cost_allocation_tbl IS
TABLE OF xxas_cost_allocation_type
/

COMMIT;
EXIT;
