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

CREATE OR REPLACE TYPE XXAS_PER_IMAGE_TYPE AS OBJECT
  (image            BLOB
  ,width            number
  ,height           number
  ,format           varchar2(80)
  ,mime_type        varchar2(80)
  ,content_length   number
  ,last_update_date date)
/

CREATE OR REPLACE TYPE XXAS_PER_IMAGE_VARRAY AS
VARRAY(100000) OF xxas_per_image_type
/

COMMIT;
EXIT;
