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

CREATE OR REPLACE TYPE XXAS_SRC_RESULT_TYPE AS OBJECT
  (score             number
  ,assignment_id     number
  ,person_id         number
  ,business_group_id number
  ,worker_status     varchar2(30)
  ,short_name        varchar2(400)
  ,sort_name         varchar2(400)
  ,initials          varchar2(400)
  ,result_text       varchar2(400)
  ,worker_type       varchar2(400)
  ,image_href        varchar2(4000)
  ,image_lud         date
  ,latitude          varchar2(400)
  ,longitude         varchar2(400)
  ,location_name     varchar2(400)
  ,facet1_value      varchar2(4000)
  ,facet2_value      varchar2(4000)
  ,facet3_value      varchar2(4000)
  ,facet4_value      varchar2(4000)
  ,facet5_value      varchar2(4000)
  ,facet6_value      varchar2(4000)
  ,facet7_value      varchar2(4000)
  ,facet8_value      varchar2(4000)
  ,facet9_value      varchar2(4000)
  ,facet10_value     varchar2(4000)
  ,facet11_value     varchar2(4000)
  ,facet12_value     varchar2(4000)
  ,facet13_value     varchar2(4000)
  ,facet14_value     varchar2(4000)
  ,facet15_value     varchar2(4000)
  ,facet16_value     varchar2(4000)
  ,facet17_value     varchar2(4000)
  ,facet18_value     varchar2(4000)
  ,facet19_value     varchar2(4000)
  ,facet20_value     varchar2(4000)
  ,facet21_value     varchar2(4000)
  ,facet22_value     varchar2(4000)
  ,facet23_value     varchar2(4000)
  ,facet24_value     varchar2(4000)
  ,facet25_value     varchar2(4000)
  ,facet26_value     varchar2(4000)
  ,facet27_value     varchar2(4000)
  ,facet28_value     varchar2(4000)
  ,facet29_value     varchar2(4000)
  ,facet30_value     varchar2(4000)
  ,facet31_value     varchar2(4000)
  ,facet32_value     varchar2(4000)
  ,facet33_value     varchar2(4000)
  ,facet34_value     varchar2(4000)
  ,facet35_value     varchar2(4000)
  ,facet36_value     varchar2(4000)
  ,facet37_value     varchar2(4000)
  ,facet38_value     varchar2(4000)
  ,facet39_value     varchar2(4000)
  ,facet40_value     varchar2(4000)
  ,facet41_value     varchar2(4000)
  ,facet42_value     varchar2(4000)
  ,facet43_value     varchar2(4000)
  ,facet44_value     varchar2(4000)
  ,facet45_value     varchar2(4000)
  ,facet46_value     varchar2(4000)
  ,facet47_value     varchar2(4000)
  ,facet48_value     varchar2(4000)
  ,facet49_value     varchar2(4000)
  ,facet50_value     varchar2(4000)
  ,facet51_value     varchar2(4000)
  ,facet52_value     varchar2(4000)
  ,facet53_value     varchar2(4000)
  ,facet54_value     varchar2(4000)
  ,facet55_value     varchar2(4000)
  ,facet56_value     varchar2(4000)
  ,facet57_value     varchar2(4000)
  ,facet58_value     varchar2(4000)
  ,facet59_value     varchar2(4000)
  ,facet60_value     varchar2(4000))
/

CREATE OR REPLACE TYPE XXAS_SRC_RESULT_VARRAY AS
VARRAY(1000000) OF xxas_src_result_type
/

COMMIT;
EXIT;
