/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2013 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
SET SCAN OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

DECLARE

  --
  -- Local constants and variables
  --
  l_sql varchar2(32000);

BEGIN

  --
  -- Register Query Note Types
  --
  l_sql :=
'        SELECT nt.assignment_id
              ,nt.type_code
              ,nt.type
              ,nt.description
        FROM   xxas_note_types_v nt
        WHERE  nt.assignment_id = :pAssignmentId
        ORDER BY nt.type_code ';

  xxas_com_sr_pkg.seed_query_service
    (p_service_name      => 'QueryNoteTypes'
    ,p_securing_function => 'XXAS_SRV_Q_NOTE_TYPES_PERM'
    ,p_sql               => l_sql
    ,p_parameters        => xxas_com_sr_param_varray
                              (xxas_com_sr_param_type('pAssignmentId', xxas_com_sr_pkg.g_NUMBER)));

END;
/
COMMIT;
EXIT;
