index

Package sb_roompreference

This package provides the Common Business interface for the Room Preference API (sb_roompreference).
All housing application information originates with the dorm room and meal application.  Room and meal application information entered and maintained is the basis for all room and meal plan assignments made within the Location Management and Housing Module.  Room and meal applications are maintained by term and a student application may be made for a single begin and end term or a range of terms.  Applications can be entered for students and non-students.  A room and meal application must be created prior to any room or meal assignments.


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
roompreference_rec  
roompreference_ref  
roompreference_tab  

Constants
M_ENTITY_NAME  


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(14) := 'ROOMPREFERENCE';

Business Entity name


roompreference_rec

TYPE roompreference_rec IS RECORD (
   r_pidm                    slbrmap.slbrmap_pidm%TYPE,
   r_artp_code               slbrmap.slbrmap_artp_code%TYPE,
   r_from_term               slbrmap.slbrmap_from_term%TYPE,
   r_to_term                 slbrmap.slbrmap_to_term%TYPE,
   r_appl_priority           slbrmap.slbrmap_appl_priority%TYPE,
   r_prefered_building       slbrmap.slbrmap_prefered_building%TYPE,
   r_prefered_room           slbrmap.slbrmap_prefered_room%TYPE,
   r_prefered_bcat_code      slbrmap.slbrmap_prefered_bcat_code%TYPE,
   r_prefered_camp_code      slbrmap.slbrmap_prefered_camp_code%TYPE,
   r_mrcd_code               slbrmap.slbrmap_mrcd_code%TYPE,
   r_haps_code               slbrmap.slbrmap_haps_code%TYPE,
   r_haps_date               slbrmap.slbrmap_haps_date%TYPE,
   r_add_date                slbrmap.slbrmap_add_date%TYPE,
   r_data_origin             slbrmap.slbrmap_data_origin%TYPE,
   r_user_id                 slbrmap.slbrmap_user_id%TYPE,
   r_internal_record_id      gb_common.internal_record_id_type);

Entity record type


roompreference_ref

TYPE roompreference_ref IS REF CURSOR RETURN roompreference_rec;

Entity cursor variable type


roompreference_tab

TYPE roompreference_tab IS TABLE OF roompreference_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_pidm                      slbrmap.slbrmap_pidm%TYPE,
      p_from_term                 slbrmap.slbrmap_from_term%TYPE,
      p_rowid                     VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_pidm   Internal identifier of room/meal applicant. NUMBER(8) Required key
p_from_term   Beginning term code in the term code range for the application.  VARCHAR2(6) 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                     roompreference_rec,
      rec_two                     roompreference_rec) RETURN VARCHAR2

Compares two records for equality.

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

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


f_query_all

Function f_query_all(
      p_pidm                      slbrmap.slbrmap_pidm%TYPE,
      p_from_term                 slbrmap.slbrmap_from_term%TYPE DEFAULT NULL) RETURN roompreference_ref

Selects all records for the entity.
Note that parameters other than PIDM default to NULL and are ignored if not populated. AND is used when multiple criteria are given.

Parameters
p_pidm   Internal identification number of the person or non-person account, valid in SPRIDEN. NUMBER(8) Required Key
p_from_term   Beginning term code in the term code range for the application.  VARCHAR2(6) Key

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


f_query_one

Function f_query_one(
      p_pidm                      slbrmap.slbrmap_pidm%TYPE,
      p_from_term                 slbrmap.slbrmap_from_term%TYPE) RETURN roompreference_ref

Selects one record using the key.

Parameters
p_pidm   Internal identifier of room/meal applicant. NUMBER(8) Required key
p_from_term   Beginning term code in the term code range for the application.  VARCHAR2(6) 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 roompreference_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_pidm                      slbrmap.slbrmap_pidm%TYPE,
      p_from_term                 slbrmap.slbrmap_from_term%TYPE,
      p_rowid                     VARCHAR2 DEFAULT NULL) RETURN roompreference_ref

Selects one record and locks it.

Parameters
p_pidm   Internal identifier of room/meal applicant. NUMBER(8) Required key
p_from_term   Beginning term code in the term code range for the application.  VARCHAR2(6) 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_pidm                      slbrmap.slbrmap_pidm%TYPE,
      p_artp_code                 slbrmap.slbrmap_artp_code%TYPE,
      p_from_term                 slbrmap.slbrmap_from_term%TYPE,
      p_to_term                   slbrmap.slbrmap_to_term%TYPE,
      p_appl_priority             slbrmap.slbrmap_appl_priority%TYPE DEFAULT NULL,
      p_prefered_building         slbrmap.slbrmap_prefered_building%TYPE DEFAULT NULL,
      p_prefered_room             slbrmap.slbrmap_prefered_room%TYPE DEFAULT NULL,
      p_prefered_bcat_code        slbrmap.slbrmap_prefered_bcat_code%TYPE DEFAULT NULL,
      p_prefered_camp_code        slbrmap.slbrmap_prefered_camp_code%TYPE DEFAULT NULL,
      p_mrcd_code                 slbrmap.slbrmap_mrcd_code%TYPE DEFAULT NULL,
      p_haps_code                 slbrmap.slbrmap_haps_code%TYPE,
      p_haps_date                 slbrmap.slbrmap_haps_date%TYPE DEFAULT SYSDATE,
      p_add_date                  slbrmap.slbrmap_add_date%TYPE DEFAULT SYSDATE,
      p_data_origin               slbrmap.slbrmap_data_origin%TYPE DEFAULT gb_common.data_origin,
      p_user_id                   slbrmap.slbrmap_user_id%TYPE DEFAULT gb_common.f_sct_user,
      p_rowid_out              OUT VARCHAR2)

Creates a record.

Parameters
p_pidm   Internal identifier of room/meal applicant. NUMBER(8) Required key
p_artp_code   Type of application. VARCHAR2(4) Required
p_from_term   Beginning term code in the term code range for the application.  VARCHAR2(6) Required key
p_to_term   End term of the application. VARCHAR2(6) Required
p_appl_priority   Priority of the application, that is, the order in which applications will be processed in the batch scheduler. VARCHAR2(8)
p_prefered_building   Applicant's preferred building for housing. VARCHAR2(6)
p_prefered_room   Applicant's preferred room for housing. VARCHAR2(10)
p_prefered_bcat_code   Applicant's preferred category for housing. VARCHAR2(4)
p_prefered_camp_code   Applicant's preferred campus for housing. VARCHAR2(3)
p_mrcd_code   Meal rate code associated with the meal assignment. VARCHAR2(4)
p_haps_code   Housing application status code associated with the applicant.  VARCHAR2(2) Required
p_haps_date   Date when the housing application status code was last changed. DATE
p_add_date   Date the application was added to the system. DATE
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_pidm                      slbrmap.slbrmap_pidm%TYPE,
      p_from_term                 slbrmap.slbrmap_from_term%TYPE,
      p_rowid                     VARCHAR2 DEFAULT NULL)

Deletes a record.

Parameters
p_pidm   Internal identifier of room/meal applicant. NUMBER(8) Required key
p_from_term   Beginning term code in the term code range for the application.  VARCHAR2(6) Required key
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18)


p_lock

Procedure p_lock(
      p_pidm                    slbrmap.slbrmap_pidm%TYPE,
      p_from_term               slbrmap.slbrmap_from_term%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_pidm   Internal identifier of room/meal applicant. NUMBER(8) Required key
p_from_term   Beginning term code in the term code range for the application.  VARCHAR2(6) Required key
p_rowid_inout   Database ROWID of the record to be locked. VARCHAR2(18)


p_update

Procedure p_update(
      p_pidm                      slbrmap.slbrmap_pidm%TYPE,
      p_artp_code                 slbrmap.slbrmap_artp_code%TYPE DEFAULT dml_common.f_unspecified_string,
      p_from_term                 slbrmap.slbrmap_from_term%TYPE,
      p_to_term                   slbrmap.slbrmap_to_term%TYPE DEFAULT dml_common.f_unspecified_string,
      p_appl_priority             slbrmap.slbrmap_appl_priority%TYPE DEFAULT dml_common.f_unspecified_string,
      p_prefered_building         slbrmap.slbrmap_prefered_building%TYPE DEFAULT dml_common.f_unspecified_string,
      p_prefered_room             slbrmap.slbrmap_prefered_room%TYPE DEFAULT dml_common.f_unspecified_string,
      p_prefered_bcat_code        slbrmap.slbrmap_prefered_bcat_code%TYPE DEFAULT dml_common.f_unspecified_string,
      p_prefered_camp_code        slbrmap.slbrmap_prefered_camp_code%TYPE DEFAULT dml_common.f_unspecified_string,
      p_mrcd_code                 slbrmap.slbrmap_mrcd_code%TYPE DEFAULT dml_common.f_unspecified_string,
      p_haps_code                 slbrmap.slbrmap_haps_code%TYPE DEFAULT dml_common.f_unspecified_string,
      p_haps_date                 slbrmap.slbrmap_haps_date%TYPE DEFAULT dml_common.f_unspecified_date,
      p_add_date                  slbrmap.slbrmap_add_date%TYPE DEFAULT dml_common.f_unspecified_date,
      p_data_origin               slbrmap.slbrmap_data_origin%TYPE DEFAULT gb_common.data_origin,
      p_user_id                   slbrmap.slbrmap_user_id%TYPE DEFAULT gb_common.f_sct_user,
      p_rowid                      VARCHAR2 DEFAULT NULL)

Updates a record.

Parameters
p_pidm   Internal identifier of room/meal applicant. NUMBER(8) Required key
p_artp_code   Type of application. VARCHAR2(4)
p_from_term   Beginning term code in the term code range for the application.  VARCHAR2(6) Required key
p_to_term   End term of the application. VARCHAR2(6) Required
p_appl_priority   Priority of the application, that is, the order in which applications will be processed in the batch scheduler. VARCHAR2(8)
p_prefered_building   Applicant's preferred building for housing. VARCHAR2(6)
p_prefered_room   Applicant's preferred room for housing. VARCHAR2(10)
p_prefered_bcat_code   Applicant's preferred category for housing. VARCHAR2(4)
p_prefered_camp_code   Applicant's preferred campus for housing. VARCHAR2(3)
p_mrcd_code   Meal rate code associated with the meal assignment. VARCHAR2(4)
p_haps_code   Housing application status code associated with the applicant.  VARCHAR2(2)
p_haps_date   Date when the housing application status code was last changed. DATE
p_add_date   Date the application was added to the system. DATE
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)