K2 BLACKPEARL PRODUCT DOCUMENTATION: USER GUIDE
Oracle Packages

Oracle Service Object - Packages

Packages support the Select statement and will return the CRUD Service Object methods.


Fig. 1. Oracle Service Object Packages methods

Sample code for Package and Package Body

READ Package and the READ Package Body

Copy Code   

create or replace

PACKAGE      PK_STUDENT_READ AS

TYPE T_CURSOR IS REF CURSOR;

PROCEDURE USP_STUDENT_READ

(

    p_STUDENTID IN NUMBER,

    cur_Protocols OUT T_CURSOR

);

END PK_STUDENT_READ;

 

 

--------------------------------

 

create or replace

PACKAGE BODY      PK_STUDENT_READ AS

--TYPE T_CURSOR IS REF CURSOR ;

PROCEDURE USP_STUDENT_READ(

    p_STUDENTID IN NUMBER,

    cur_Protocols OUT T_CURSOR

) IS

BEGIN

OPEN cur_Protocols FOR

  SELECT *

  FROM STUDENT

  WHERE STUDENT_ID = p_STUDENTID;

END USP_STUDENT_READ;

END PK_STUDENT_READ;

 

 


K2 blackpearl Help 4.6.11 (4.12060.1731.0)