DBA Data[Home] [Help]

APPS.AD_EVENT_REGISTRY_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 169

  PROCEDURE Insert_Event_Transitions(
              p_Event_Id    IN NUMBER ,
	      p_Version     IN NUMBER ,
	      p_New_Status  IN VARCHAR2 ,
	      p_Old_Status  IN VARCHAR2 := NULL ,
	      p_Module_Name IN VARCHAR2 ,
	      p_Worker_Id   IN NUMBER := NULL )
  AS
  BEGIN
    INSERT INTO ad_event_transitions(
                  transition_id,
                  event_id,
                  version,
                  new_status,
                  prior_status,
                  transition_time,
                  module_name,
                  worker_id)
    VALUES (
                  ad_event_transitions_s.NEXTVAL,
                  p_Event_Id,
                  p_Version,
                  p_New_Status,
                  p_Old_Status,
                  SYSDATE ,
                  p_Module_Name,
                  p_Worker_Id);
Line: 197

  END Insert_Event_Transitions;
Line: 297

      SELECT last_version,
             event_id,
             event_type
      INTO   l_Version,
             l_Event_Id,
             l_Event_Type
      FROM   ad_events
      WHERE  owner         = p_Owner
      AND    event_name    = p_Event_Name
      AND    event_context = l_p_Context;
Line: 334

	-- It has to be inserted into AD_EVENT_VERSIONS.
	--
        INSERT INTO ad_event_versions(
	             event_id,
	             version,
	             status,
		     creation_date,
		     last_update_date,
		     num_workers,
		     worker_status)
        VALUES(      l_Event_Id,
	             l_p_Version,
	             INITIALIZED_STATUS,
                     SYSDATE ,
		     SYSDATE,
		     p_Num_Workers,
		     l_Worker_Status_String)
	RETURNING    status
	INTO         l_Event_Status ;
Line: 356

	-- update date are updated in AD_EVENTS
	--
	UPDATE ad_events
	SET    last_version     = l_p_Version,
               last_update_date = SYSDATE
	WHERE  event_id         = l_Event_Id;
Line: 371

	  SELECT status,
	         worker_status,
		 num_workers
	  INTO   l_Event_Status,
	         l_Worker_Status_String,
		 l_Prev_Max_Workers
	  FROM   ad_Event_Versions
	  WHERE  event_id = l_Event_Id
	  AND    version  = l_p_Version;
Line: 391

       INSERT INTO ad_events(
                    event_id,
		    owner,
                    event_name,
		    event_context,
		    event_type,
		    last_version,
                    creation_date,
		    last_update_date)
       VALUES(
                    ad_events_s.NEXTVAL,
		    p_Owner,
                    p_Event_Name,
		    l_p_Context,
		    l_p_Event_Type,
		    l_p_Version,
                    SYSDATE,
		    SYSDATE  )
       RETURNING   event_id
       INTO        l_Event_Id;
Line: 418

       INSERT INTO ad_event_versions(
                    event_id,
		    version,
		    status,
                    creation_date,
		    last_update_date,
		    num_workers,
		    worker_status)
       VALUES(
                    l_Event_Id,
		    l_p_Version,
		    INITIALIZED_STATUS,
                    SYSDATE,
		    SYSDATE,
		    p_Num_Workers,
		    l_Worker_Status_String);
Line: 498

       UPDATE ad_event_versions
       SET num_workers      = p_Num_Workers,
	   worker_status    = g_Events_Tbl(l_Event_Index).Worker_Status ,
	   last_update_date = SYSDATE
       WHERE event_id = l_Event_Id
       AND   version  = l_p_Version ;
Line: 507

       Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_p_Version,
	      p_New_Status  => 'RE-SCHEDULED',
	      p_Old_Status  => l_Event_Status,
	      p_Module_Name => p_Module_Name,
	      p_Worker_Id   => p_Worker_Id);
Line: 619

       UPDATE ad_event_versions
       SET start_time       = SYSDATE ,
           last_update_date = SYSDATE
       WHERE event_id = l_Event_Id
       AND   version  = l_Version;
Line: 629

       Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_Version,
	      p_New_Status  => INITIALIZED_STATUS,
	      p_Module_Name => l_Module_Name,
	      p_Worker_Id   => l_Worker_Id);
Line: 712

     SELECT status,
            event_type,
	    ae.event_id,
	    av.version,
	    worker_status
     INTO   l_Event_Status,
            l_Event_type,
	    l_Event_Id,
	    l_Version,
	    l_Worker_Status_String
     FROM   ad_events ae, ad_event_versions av
     WHERE  ae.event_id      = av.event_id
     AND    ae.last_version  = av.version
     AND    ae.owner         = p_Owner
     AND    ae.event_name    = p_Event_Name
     AND    ae.event_context = l_p_Context;
Line: 766

         UPDATE  ad_event_versions
	 SET     status           = l_New_Status,
	         end_time         = l_End_Time,
	         last_update_date = SYSDATE ,
                 worker_status    = l_Worker_Status_String
	 WHERE   event_id   = l_Event_Id
         AND     version    = l_Version;
Line: 782

           Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_Version,
	      p_New_Status  => l_New_Status,
	      p_Old_Status  => l_Event_Status,
	      p_Module_Name => l_Module_Name,
	      p_Worker_Id   => l_Worker_Id);
Line: 802

         UPDATE   ad_event_versions
         SET      status           = l_New_Status,
                  end_time         = SYSDATE ,
                  last_update_date = SYSDATE
         WHERE    event_id   = l_Event_Id
         AND      version    = l_Version;
Line: 815

           Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_Version,
	      p_New_Status  => l_New_Status,
	      p_Old_Status  => l_Event_Status,
	      p_Module_Name => l_Module_Name);
Line: 893

    SELECT 1
    INTO   l_Temp_Var
    FROM   ad_events ae,
           ad_Event_Versions av
    WHERE  ae.owner = p_Owner
    AND    ae.event_name = p_Event_Name
    AND    ae.event_context = l_p_Context
    AND    ae.event_id = av.event_id
    AND    av.version >= p_Min_Completed_Version
    AND    av.status = COMPLETED_STATUS
    AND    ROWNUM < 2;
Line: 963

    SELECT av.status,
           av.worker_status,
           av.version,
	   av.num_workers
    INTO   l_Event_Status,
           l_Worker_Status_String,
           l_Event_Version,
	   l_Num_Workers
    FROM   ad_events ae,
           ad_event_versions av
    WHERE  ae.owner         = p_Owner
    AND    ae.event_name    = p_Event_Name
    AND    ae.event_context = l_p_Context
    AND    av.event_id      = ae.event_id
    AND    av.version       = NVL(p_Specific_Version,ae.last_version);
Line: 1103

    SELECT av.status,
           av.version
    INTO   l_Status,
           l_Event_Version
    FROM
           ad_events ae,
           ad_event_versions av
    WHERE  ae.owner         = p_Owner
    AND    ae.event_name    = p_Event_Name
    AND    ae.event_context = l_p_Context
    AND    av.event_id      = ae.event_id
    AND    av.version       = NVL(p_Specific_Version, ae.last_version);
Line: 1227

    UPDATE ad_event_versions
    SET    status = p_Status,
           last_update_date = SYSDATE
    WHERE  event_id = l_Event_Id
    AND    version  = l_Version;
Line: 1236

    Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_Version,
	      p_New_Status  => p_Status,
	      p_Old_Status  => l_Event_Status,
	      p_Module_Name => l_Module_Name,
	      p_Worker_Id   => l_Worker_Id);
Line: 1310

    SELECT ae.event_id,
           ae.last_version,
           av.status,
	   av.num_workers
    INTO   l_Event_Id,
           l_Event_Version,
           l_Event_Status,
	   l_Max_Workers
    FROM   ad_events ae, ad_event_versions av
    WHERE  ae.owner         = p_Owner
    AND    ae.event_name    = p_Event_Name
    AND    ae.event_context = l_p_Context
    AND    av.event_id      = ae.event_id
    AND    av.version       = ae.last_version;
Line: 1335

    UPDATE ad_event_versions
    SET    status           = INITIALIZED_STATUS,
           start_time       = NULL ,
           end_time         = NULL ,
           last_update_date = SYSDATE ,
           worker_status    = LPAD('N',l_Max_Workers,'N')
    WHERE  event_id = l_Event_Id
    AND    version  = l_Event_Version;
Line: 1345

    Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_Event_Version,
	      p_New_Status  => INITIALIZED_STATUS,
	      p_Old_Status  => l_Event_Status,
	      p_Module_Name => l_Module_Name,
	      p_Worker_Id   => l_Worker_Id);
Line: 1449

    SELECT status,
           ae.event_id,
	   worker_status,
	   num_workers,
	   av.version
    INTO   l_Event_Status,
           l_Event_Id,
	   l_Worker_Status_String,
	   l_Prev_Max_Workers,
	   l_Event_Version
    FROM   ad_events ae, ad_event_versions av
    WHERE  ae.event_id      = av.event_id
    AND    ae.last_version  = av.version
    AND    ae.owner         = p_Owner
    AND    ae.event_name    = p_Event_Name
    AND    ae.event_context = l_p_Context;
Line: 1493

	-- Inserting a record into the transition record to show that
        -- a rescheduling has happened for the event.
        Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_p_Version,
	      p_New_Status  => 'RE-SCHEDULED',
	      p_Old_Status  => 'RE-SCHEDULED',
	      p_Module_Name => p_Module_Name,
	      p_Worker_Id   => p_Worker_Id);
Line: 1528

	  -- Since the event has completed here, we have to insert an
	  -- event transition entry as below.
	  --
          Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_p_Version,
	      p_New_Status  => l_New_Status,
	      p_Old_Status  => 'RE-SCHEDULED',
	      p_Module_Name => p_Module_Name,
	      p_Worker_Id   => p_Worker_Id);
Line: 1541

	-- Now update ad_Event_Versions to make the changes happened as a
	-- result of the re-scheduling.
	--
	UPDATE ad_event_versions
        SET num_workers      = p_Num_Workers,
	    status           = l_New_Status,
	    worker_status    = l_Worker_Status_String,
	    start_time       = DECODE(start_time,null,SYSDATE,
		                             start_time),
	    last_update_date = SYSDATE ,
	    end_time         = l_End_Time
        WHERE event_id = l_Event_Id
        AND   version  = l_p_Version;
Line: 1590

        UPDATE  ad_event_versions
        SET     status           = l_New_Status,
	        end_time         = l_End_Time,
	        last_update_date = SYSDATE ,
                start_time       = DECODE(start_time,null,SYSDATE,
		                             start_time),
                worker_status    = l_Worker_Status_String
        WHERE   event_id   = l_Event_Id
        AND     version    = l_p_Version;
Line: 1608

          Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_p_Version,
	      p_New_Status  => COMPLETED_STATUS,
	      p_Old_Status  => COMPLETED_STATUS,
	      p_Module_Name => p_Module_Name,
	      p_Worker_Id   => p_Worker_Id);
Line: 1629

          UPDATE   ad_event_versions
          SET      status           = COMPLETED_STATUS,
	           start_time       = DECODE(start_time,null,SYSDATE,
		                             start_time),
                   end_time         = SYSDATE ,
                   last_update_date = SYSDATE
          WHERE    event_id   = l_Event_Id
          AND      version    = l_p_Version;
Line: 1638

	  -- Insert the transition entries here
	  --
          Insert_Event_Transitions(
             p_Event_Id    => l_Event_Id,
	     p_Version     => l_p_Version,
	     p_New_Status  => COMPLETED_STATUS,
	     p_Old_Status  => l_Event_Status,
	     p_Module_Name => p_Module_Name);
Line: 1671

        Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_p_Version,
	      p_New_Status  => l_New_Status,
	      p_Old_Status  => l_Event_Status,
	      p_Module_Name => p_Module_Name,
	      p_Worker_Id   => p_Worker_Id);
Line: 1686

        UPDATE   ad_events
	SET      last_version     = l_p_Version,
	         last_update_date = SYSDATE
	WHERE    event_id         = l_Event_Id;
Line: 1692

	INSERT INTO ad_event_versions (
	             event_id,
		     version,
		     status,
		     start_time,
		     end_time,
		     creation_date,
		     last_update_date,
		     num_workers,
		     worker_status)
        VALUES (
	             l_Event_Id,
		     l_p_Version,
		     l_New_Status,
		     SYSDATE ,
		     l_End_Time ,
		     SYSDATE ,
                     SYSDATE ,
		     p_Num_Workers ,
		     l_Worker_Status_String );
Line: 1726

      INSERT INTO ad_events(
                   event_id,
	           owner,
                   event_name,
		   event_context,
		   event_type,
		   last_version,
                   creation_date,
		   last_update_date)
      VALUES(
                   ad_events_s.NEXTVAL,
	           p_Owner,
                   p_Event_Name,
		   l_p_Context,
		   l_p_Event_Type,
		   l_p_Version,
                   SYSDATE,
		   SYSDATE  )
      RETURNING    event_id
      INTO         l_Event_Id;
Line: 1768

	-- Insert the transition records for single-worker events.
	--

        Insert_Event_Transitions(
              p_Event_Id    => l_Event_Id,
	      p_Version     => l_p_Version,
	      p_New_Status  => COMPLETED_STATUS,
	      p_Old_Status  => COMPLETED_STATUS,
	      p_Module_Name => p_Module_Name,
	      p_Worker_Id   => p_Worker_Id);
Line: 1785

      INSERT INTO ad_event_versions(
                    event_id,
		    version,
		    status,
		    start_time,
		    end_time,
                    creation_date,
		    last_update_date,
		    num_workers,
		    worker_status)
       VALUES(
                    l_Event_Id,
		    l_p_Version,
		    l_Event_Status,
		    SYSDATE,
		    l_End_Time,
                    SYSDATE,
		    SYSDATE,
		    p_Num_Workers,
		    l_Worker_Status_String);