index

Package gb_roomassignment_rules

This package provides support subprograms for the Room Assignment API (gb_roomassignment).


Program units
p_register_entity   Registers the attribute/value pairs to the message cache.
p_register_entity   Registers the attribute/value pairs to the message cache.
p_validate   Validates all the data in the record.
f_check_bldg   Checks if the building is valid for the gender and returns an error message if there are errors.
f_check_room   Checks if the room being assigned is available, and returns an error message if there are errors.
f_check_restrictions   Checks restrictions on the room and returns an error message if there are errors.
f_check_capacity   Checks the room capacity to determine whether space is available, and returns an error message if there are errors.


p_register_entity

PROCEDURE p_register_entity(p_operation_type     NUMBER,
                            p_internal_record_id VARCHAR2)

Registers the attribute/value pairs to the message cache.
This signature uses the ROWID only for the delete operations.

Parameters
p_operation_type   Operation type of the entity to be registered. NUMBER Required
p_internal_record_id   Database ROWID.  VARCHAR2(18) Required


p_register_entity

PROCEDURE p_register_entity(p_operation_type     NUMBER,
                            p_pidm               slrrasg.slrrasg_pidm%TYPE,
                            p_bldg_code          slrrasg.slrrasg_bldg_code%TYPE,
                            p_room_number        slrrasg.slrrasg_room_number%TYPE,
                            p_term_code          slrrasg.slrrasg_term_code%TYPE,
                            p_rrcd_code          slrrasg.slrrasg_rrcd_code%TYPE,
                            p_begin_date         slrrasg.slrrasg_begin_date%TYPE,
                            p_end_date           slrrasg.slrrasg_end_date%TYPE,
                            p_total_days         slrrasg.slrrasg_total_days%TYPE,
                            p_total_months       slrrasg.slrrasg_total_months%TYPE,
                            p_total_terms        slrrasg.slrrasg_total_terms%TYPE,
                            p_ascd_code          slrrasg.slrrasg_ascd_code%TYPE,
                            p_ascd_date          slrrasg.slrrasg_ascd_date%TYPE,
                            p_onl_or_bat         slrrasg.slrrasg_onl_or_bat%TYPE,
                            p_ar_ind             slrrasg.slrrasg_ar_ind%TYPE,
                            p_overload_ind       slrrasg.slrrasg_overload_ind%TYPE,
                            p_roll_ind           slrrasg.slrrasg_roll_ind%TYPE,
                            p_override_error     slrrasg.slrrasg_override_error%TYPE,
                            p_assess_needed      slrrasg.slrrasg_assess_needed%TYPE,
                            p_data_origin        slrrasg.slrrasg_data_origin%TYPE,
                            p_user_id            slrrasg.slrrasg_user_id%TYPE DEFAULT gb_common.f_sct_user,
                            p_internal_record_id VARCHAR2)

Registers the attribute/value pairs to the message cache.
This signature registers the all parameters.

Parameters
p_pidm   Internal identifier associated with the room assignment.  NUMBER(8) Required
p_bldg_code   Building code of the room assignment.  VARCHAR2(6) Required
p_room_number   Room number of the room assignment.  VARCHAR2(10) Required
p_term_code   Term associated with the room assignment. VARCHAR2(6) Required
p_rrcd_code   Room rate code associated with the assignment. VARCHAR2(4) Required
p_begin_date   First day of the room assignment.  DATE Required
p_end_date   Last day of the room assignment. DATE Required
p_total_days   Total number of days of the room assignment. NUMBER(14) Required
p_total_months   Total number of months of the room assignment.  NUMBER(12) Required
p_total_terms   Total number of terms of the room assignment.  NUMBER(12) Required
p_ascd_code   Status code of the room assignment.  VARCHAR2(2) Required
p_ascd_date   Date the room plan status code was last updated. DATE Required
p_onl_or_bat   Specifies whether the room assignment was created online or in batch using the batch scheduler.  VARCHAR2(1) Required
p_ar_ind   Specifies whether the room assignment charges have been processed. VARCHAR2(1) Required
p_overload_ind   Specifies whether an overload condition existed to allow the room assignment. VARCHAR2(1) Required
p_roll_ind   Controls whether the room assignment can be rolled using the roll forward process.  VARCHAR2(1) Required
p_override_error   Specifies whether an error override condition existed to allow the room assignment.  VARCHAR2(1) Required
p_assess_needed   Specifies whether fee assessment is needed for the room assignment. VARCHAR2(1) Required
p_data_origin   Source system that generated the data VARCHAR2(30) Required
p_user_id   Oracle user ID who inserted or last updated the data. VARCHAR2(30)
p_internal_record_id   Database ROWID.  VARCHAR2(18) Required


p_validate

PROCEDURE p_validate(p_pidm           slrrasg.slrrasg_pidm%TYPE,
                     p_bldg_code      slrrasg.slrrasg_bldg_code%TYPE,
                     p_room_number    slrrasg.slrrasg_room_number%TYPE,
                     p_term_code      slrrasg.slrrasg_term_code%TYPE,
                     p_rrcd_code      slrrasg.slrrasg_rrcd_code%TYPE,
                     p_begin_date     slrrasg.slrrasg_begin_date%TYPE,
                     p_end_date       slrrasg.slrrasg_end_date%TYPE,
                     p_total_days     slrrasg.slrrasg_total_days%TYPE,
                     p_total_months   slrrasg.slrrasg_total_months%TYPE,
                     p_total_terms    slrrasg.slrrasg_total_terms%TYPE,
                     p_ascd_code      slrrasg.slrrasg_ascd_code%TYPE,
                     p_ascd_date      slrrasg.slrrasg_ascd_date%TYPE,
                     p_onl_or_bat     slrrasg.slrrasg_onl_or_bat%TYPE,
                     p_ar_ind         slrrasg.slrrasg_ar_ind%TYPE,
                     p_overload_ind   slrrasg.slrrasg_overload_ind%TYPE DEFAULT NULL,
                     p_roll_ind       slrrasg.slrrasg_roll_ind%TYPE DEFAULT NULL,
                     p_override_error slrrasg.slrrasg_override_error%TYPE DEFAULT NULL,
                     p_assess_needed  slrrasg.slrrasg_assess_needed%TYPE,
                     p_data_origin    slrrasg.slrrasg_data_origin%TYPE DEFAULT NULL,
                     p_user_id        slrrasg.slrrasg_user_id%TYPE DEFAULT gb_common.f_sct_user,
                     p_rowid          VARCHAR2 DEFAULT NULL)

Validates all the data in the record.

Parameters
p_pidm   Internal identifier associated with the room assignment.  NUMBER(8) Required
p_bldg_code   Building code of the room assignment.  VARCHAR2(6) Required
p_room_number   Room number of the room assignment.  VARCHAR2(10) Required
p_term_code   Term associated with the room assignment. VARCHAR2(6) Required
p_rrcd_code   Room rate code associated with the assignment. VARCHAR2(4) Required
p_begin_date   First day of the room assignment.  DATE Required
p_end_date   Last day of the room assignment. DATE Required
p_total_days   Total number of days of the room assignment. NUMBER(14) Required
p_total_months   Total number of months of the room assignment.  NUMBER(12) Required
p_total_terms   Total number of terms of the room assignment.  NUMBER(12) Required
p_ascd_code   Status code of the room assignment.  VARCHAR2(2) Required
p_ascd_date   Date the room plan status code was last updated. DATE Required
p_onl_or_bat   Specifies whether the room assignment was created online or in batch using the batch scheduler.  VARCHAR2(1) Required
p_ar_ind   Specifies whether the room assignment charges have been processed. VARCHAR2(1) Required
p_overload_ind   Specifies whether an overload condition existed to allow the room assignment. VARCHAR2(1)
p_roll_ind   Controls whether the room assignment can be rolled using the roll forward process.  VARCHAR2(1)
p_override_error   Specifies whether an error override condition existed to allow the room assignment.  VARCHAR2(1)
p_assess_needed   Specifies whether fee assessment is needed for the room assignment. VARCHAR2(1) Required
p_data_origin   Source system that generated the data VARCHAR2(30) Required
p_user_id   Oracle user ID who inserted or last updated the data. VARCHAR2(30)
p_rowid   Database ROWID.  VARCHAR2(18)


f_check_bldg

FUNCTION f_check_bldg(p_bldg_code slrrasg.slrrasg_bldg_code%TYPE,
                      p_sex       spbpers.spbpers_sex%TYPE) RETURN VARCHAR2

Checks if the building is valid for the gender and returns an error message if there are errors.

Parameters
p_bldg_code   Building code for the room assignment. VARCHAR2(6) Required
p_sex   Gender of the person requesting the room assignment.  VARCHAR2(1) Required

Returns
An error message if there are any errors.


f_check_room

FUNCTION f_check_room(p_bldg_code   slrrasg.slrrasg_bldg_code%TYPE,
                      p_room_number slrrasg.slrrasg_room_number%TYPE,
                      p_term_code   slrrasg.slrrasg_term_code%TYPE,
                      p_pidm        slrrasg.slrrasg_pidm%TYPE,
                      p_begin_date  slrrasg.slrrasg_begin_date%TYPE,
                      p_end_date    slrrasg.slrrasg_end_date%TYPE,
                      p_sex         spbpers.spbpers_sex%TYPE DEFAULT NULL)
  RETURN VARCHAR2

Checks if the room being assigned is available, and returns an error message if there are errors.

Parameters
p_bldg_code   Building code for the room assignment. VARCHAR2(6) Required
p_room_number   Room number for the room assignment.  VARCHAR2(10) Required
p_term_code   Term code for the room assignment.  VARCHAR2(6) Required
p_pidm   Internal personal identification number of the person requesting the room assignment.  NUMBER(8) Required
p_begin_date   Starting date of the room assignment. DATE Required
p_end_date   Ending date of the room assignment. DATE Required
p_sex   Gender of the person requesting the room assignment. VARCHAR2(1)

Returns
An error message if there are any errors.


f_check_restrictions

FUNCTION f_check_restrictions(p_bldg_code      slrrasg.slrrasg_bldg_code%TYPE,
                              p_room_number    slrrasg.slrrasg_room_number%TYPE,
                              p_term_code      slrrasg.slrrasg_term_code%TYPE,
                              p_pidm           slrrasg.slrrasg_pidm%TYPE,
                              p_override_error slrrasg.slrrasg_override_error%TYPE DEFAULT NULL,
                              p_rmap_term_code stvterm.stvterm_code%TYPE)
  RETURN VARCHAR2

Checks restrictions on the room and returns an error message if there are errors.

Parameters
p_bldg_code   Building for the room assignment. VARCHAR2(6) Required
p_room_number   Room for room assignment. VARCHAR2(10) Required
p_term_code   Term for room assignment.  VARCHAR2(6) Required
p_pidm   Internal personal identification number of the person requesting the room assignment.  NUMBER(8) Required
p_override_error   Specifies that the system should override any errors found for the room assignment.  VARCHAR2(1) Required
p_rmap_term_code   Beginning term code from the room application table (SLBRMAP). VARCHAR2(6) Required

Returns
An error message if there are any errors


f_check_capacity

FUNCTION f_check_capacity(p_term_code    slrrasg.slrrasg_term_code%TYPE,
                          p_bldg_code    slrrasg.slrrasg_bldg_code%TYPE,
                          p_room_number  slrrasg.slrrasg_room_number%TYPE,
                          p_pidm         slrrasg.slrrasg_pidm%TYPE,
                          p_begin_date   slrrasg.slrrasg_begin_date%TYPE DEFAULT NULL,
                          p_end_date     slrrasg.slrrasg_end_date%TYPE DEFAULT NULL,
                          p_ascd_code    slrrasg.slrrasg_ascd_code%TYPE DEFAULT NULL,
                          p_overload_ind slrrasg.slrrasg_overload_ind%TYPE DEFAULT NULL,
                          p_rowid        VARCHAR2 DEFAULT NULL)
  RETURN VARCHAR2

Checks the room capacity to determine whether space is available, and returns an error message if there are errors.

Parameters
p_term_code   Term for room assignment.  VARCHAR2(6) Required
p_bldg_code   Building for the room assignment. VARCHAR2(6) Required
p_room_number   Room for room assignment. VARCHAR2(10) Required
p_pidm   Internal personal identification number of the person requesting the room assignment.  NUMBER(8) Required
p_begin_date   First day of the room assignment.  DATE
p_end_date   Last day of the room assignment. DATE
p_ascd_code   Status code of the room assignment.  VARCHAR2(2)
p_overload_ind   Specifies whether to allow the room assignment if an overload condition exists. VARCHAR2(1)
p_rowid   Database ROWID.  VARCHAR2(18)

Returns
An error message if there are any errors.