index

Package sb_roommate

This package provides the Common Business interface for the Roommate API (sb_roommate).
Roommate applications are composted of internal personal identification numbers (PIDMs) of individuals requesting to share a dorm room for a term.  Roommate applications are created and maintained by term and sequence number, and the records are used in the batch scheduling process.  Only one roommate application record needs to exist for the group of individuals requesting to be roomed together.  Roommates must have an active room application filed through a dorm room and meal application in order to be considered for scheduling.


Program units
f_api_version  
f_exists  
f_isequal  
f_query_all  
f_query_one  
f_query_by_rowid  
f_query_one_lock  
p_create  
p_delete  
p_lock  
p_update  

Types
roommate_rec  
roommate_ref  
roommate_tab  

Constants
M_ENTITY_NAME  


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(8) := 'ROOMMATE';

Business Entity name


roommate_rec

TYPE roommate_rec IS RECORD (
   r_term_code               slrrmat.slrrmat_term_code%TYPE,
   r_oneup                   slrrmat.slrrmat_oneup%TYPE,
   r_pidm                    slrrmat.slrrmat_pidm%TYPE,
   r_accept_ind              slrrmat.slrrmat_accept_ind%TYPE,
   r_data_origin             slrrmat.slrrmat_data_origin%TYPE,
   r_user_id                 slrrmat.slrrmat_user_id%TYPE,
   r_internal_record_id      gb_common.internal_record_id_type);

Entity record type


roommate_ref

TYPE roommate_ref IS REF CURSOR RETURN roommate_rec;

Entity cursor variable type


roommate_tab

TYPE roommate_tab IS TABLE OF roommate_rec INDEX BY BINARY_INTEGER;

Entity table type


f_api_version

Function f_api_version RETURN PLS_INTEGER

Returns the API version number.

Returns
Version of the API signature. Changes only when the signature changes.


f_exists

Function f_exists(
      p_term_code                 slrrmat.slrrmat_term_code%TYPE,
      p_oneup                     slrrmat.slrrmat_oneup%TYPE,
      p_pidm                      slrrmat.slrrmat_pidm%TYPE,
      p_rowid                     VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_term_code   Term code associated with the roommate application.  VARCHAR2(6) Required key
p_oneup   Roommate sequence number of the roommate application.  VARCHAR2(5) Required key
p_pidm   Internal identifier of the person who has a roommate application.  NUMBER(8) Required key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
Y if found, otherwise N.


f_isequal

Function f_isequal(
      rec_one                     roommate_rec,
      rec_two                     roommate_rec) RETURN VARCHAR2

Compares two records for equality.

Parameters
rec_one   First record to compare. Defined as type roommate_rec.
rec_two   Second record to compare. Defined as type roommate_rec.

Returns
Y if all values in records are equal, otherwise N. Nulls match Nulls.


f_query_all

Function f_query_all(
      p_term_code                 slrrmat.slrrmat_term_code%TYPE,
      p_oneup                     slrrmat.slrrmat_oneup%TYPE,
      p_pidm                      slrrmat.slrrmat_pidm%TYPE) RETURN roommate_ref

Selects all records for the entity.

Parameters
p_term_code   Term code associated with the roommate application.  VARCHAR2(6) Required key
p_oneup   Roommate sequence number of the roommate application. VARCHAR2(5) Required key
p_pidm   Internal identifier of the person who has a roommate application.  NUMBER(8) Required key

Returns
A cursor variable that will fetch the set of records.


f_query_one

Function f_query_one(
      p_term_code                 slrrmat.slrrmat_term_code%TYPE,
      p_oneup                     slrrmat.slrrmat_oneup%TYPE,
      p_pidm                      slrrmat.slrrmat_pidm%TYPE) RETURN roommate_ref

Selects one record using the key.

Parameters
p_term_code   Term code associated with the roommate application.  VARCHAR2(6) Required key
p_oneup   Roommate sequence number of the roommate application. VARCHAR2(5) Required key
p_pidm   Internal identifier of the person who has a roommate application.  NUMBER(8) Required key

Returns
A cursor variable that will fetch exactly one record.


f_query_by_rowid

Function f_query_by_rowid(
      p_rowid                     VARCHAR2) RETURN roommate_ref

Selects one record using the ROWID.

Parameters
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18) Required

Returns
A cursor variable that will fetch exactly one record.


f_query_one_lock

Function f_query_one_lock(
      p_term_code                 slrrmat.slrrmat_term_code%TYPE,
      p_oneup                     slrrmat.slrrmat_oneup%TYPE,
      p_pidm                      slrrmat.slrrmat_pidm%TYPE,
      p_rowid                     VARCHAR2 DEFAULT NULL) RETURN roommate_ref

Selects one record and locks it.

Parameters
p_term_code   Term code associated with the roommate application. VARCHAR2(6) Required key
p_oneup   Roommate sequence number of the roommate application. VARCHAR2(5) Required key
p_pidm   Internal identifier of the person who has a roommate application. NUMBER(8) Required key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
A cursor variable for one record, locking the record.


p_create

Procedure p_create(
      p_term_code          slrrmat.slrrmat_term_code%TYPE,
      p_oneup              slrrmat.slrrmat_oneup%TYPE DEFAULT NULL,
      p_pidm               slrrmat.slrrmat_pidm%TYPE,
      p_accept_ind         slrrmat.slrrmat_accept_ind%TYPE DEFAULT NULL,
      p_data_origin        slrrmat.slrrmat_data_origin%TYPE DEFAULT gb_common.data_origin,
      p_user_id            slrrmat.slrrmat_user_id%TYPE DEFAULT gb_common.f_sct_user,
      p_rowid_out              OUT VARCHAR2)

Creates a record

Parameters
p_term_code   Term code associated with the roommate application. VARCHAR2(6) Required key
p_oneup   Roommate sequence number of the roommate application. VARCHAR2(5) Required
p_pidm   Internal identifier of the person who has a roommate application. NUMBER(8) Required key
p_accept_ind   Indicates whether the person and/or institution has accepted the person as a roommate. VARCHAR2(1)
p_data_origin   Source system that generated the data. VARCHAR2(30)
p_user_id   Oracle ID of the user who inserted or last updated the data. VARCHAR2(30)
p_rowid_out   Database ROWID of the record to be created. VARCHAR2(18)


p_delete

Procedure p_delete(
      p_term_code                 slrrmat.slrrmat_term_code%TYPE,
      p_oneup                     slrrmat.slrrmat_oneup%TYPE,
      p_pidm                      slrrmat.slrrmat_pidm%TYPE,
      p_rowid                     VARCHAR2 DEFAULT NULL)

Deletes a record

Parameters
p_term_code   Term code associated with the roommate application. VARCHAR2(6) Required key
p_oneup   Roommate sequence number of the roommate application. VARCHAR2(5) Required key
p_pidm   Internal identifier of the person who has a roommate application. NUMBER(8) Required key
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18)


p_lock

Procedure p_lock(
      p_term_code               slrrmat.slrrmat_term_code%TYPE,
      p_oneup                   slrrmat.slrrmat_oneup%TYPE,
      p_pidm                    slrrmat.slrrmat_pidm%TYPE,
      p_rowid_inout      IN OUT VARCHAR2)

Locks a record.
If the ROWID is not passed in, the record is located using the key values and the ROWID of the locked row is passed in p_rowid_inout.

Parameters
p_term_code   Term code associated with the roommate application. VARCHAR2(6) Required key
p_oneup   Roommate sequence number of the roommate application. VARCHAR2(5) Required key
p_pidm   Internal identifier of the person who has a roommate application. NUMBER(8) Required key
p_rowid_inout   Database ROWID of the record to be locked.  VARCHAR2(18)


p_update

Procedure p_update(
      p_term_code          slrrmat.slrrmat_term_code%TYPE,
      p_oneup              slrrmat.slrrmat_oneup%TYPE,
      p_pidm               slrrmat.slrrmat_pidm%TYPE,
      p_accept_ind         slrrmat.slrrmat_accept_ind%TYPE DEFAULT dml_common.f_unspecified_string,
      p_data_origin        slrrmat.slrrmat_data_origin%TYPE DEFAULT gb_common.data_origin,
      p_user_id            slrrmat.slrrmat_user_id%TYPE DEFAULT gb_common.f_sct_user,
      p_rowid                      VARCHAR2 DEFAULT NULL)

Updates a record

Parameters
p_term_code   Term code associated with the roommate application. VARCHAR2(6) Required key
p_oneup   Roommate sequence number of the roommate application. VARCHAR2(5) Required
p_pidm   Internal identifier of the person who has a roommate application. NUMBER(8) Required key
p_accept_ind   Indicates whether the person and/or institution has accepted the person as a roommate. VARCHAR2(1)
p_data_origin   Source system that generated the data. VARCHAR2(30)
p_user_id   Oracle ID of the user who inserted or last updated the data. VARCHAR2(30)
p_rowid   Database ROWID of the record to be updated. VARCHAR2(18)