index

Package gb_classtimes_rules

This package provides the support subprograms for the Classtimes API (gb_classtimes). This validate procedure validates both the class meeting and event meeting. The IN OUT parameters could be defaulted based on the business rules applied to them.
A typical example is calculation of meeting hours and number of meetings. These are calculated and defaulted.
For an event meeting the meeting type, schedule code, hours in a week, and session indicators (category) are defaulted to null. For a class meeting the function code and service/commitee type code are defaulted to Null.


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_calc_hrs_per_week  
f_calc_exclusion_days  
f_calc_number_of_days  
p_section_query_one  


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_internal_record_id   Database ROWID. VARCHAR2(18) Required


p_register_entity

PROCEDURE p_register_entity(p_operation_type     NUMBER,
                            p_term_code          ssrmeet.ssrmeet_term_code%TYPE,
                            p_crn                ssrmeet.ssrmeet_crn%TYPE,
                            p_begin_time         ssrmeet.ssrmeet_begin_time%TYPE,
                            p_end_time           ssrmeet.ssrmeet_end_time%TYPE,
                            p_bldg_code          ssrmeet.ssrmeet_bldg_code%TYPE,
                            p_room_code          ssrmeet.ssrmeet_room_code%TYPE,
                            p_start_date         ssrmeet.ssrmeet_start_date%TYPE,
                            p_end_date           ssrmeet.ssrmeet_end_date%TYPE,
                            p_catagory           ssrmeet.ssrmeet_catagory%TYPE,
                            p_sun_day            ssrmeet.ssrmeet_sun_day%TYPE,
                            p_mon_day            ssrmeet.ssrmeet_mon_day%TYPE,
                            p_tue_day            ssrmeet.ssrmeet_tue_day%TYPE,
                            p_wed_day            ssrmeet.ssrmeet_wed_day%TYPE,
                            p_thu_day            ssrmeet.ssrmeet_thu_day%TYPE,
                            p_fri_day            ssrmeet.ssrmeet_fri_day%TYPE,
                            p_sat_day            ssrmeet.ssrmeet_sat_day%TYPE,
                            p_schd_code          ssrmeet.ssrmeet_schd_code%TYPE,
                            p_over_ride          ssrmeet.ssrmeet_over_ride%TYPE,
                            p_credit_hr_sess     ssrmeet.ssrmeet_credit_hr_sess%TYPE,
                            p_meet_no            ssrmeet.ssrmeet_meet_no%TYPE,
                            p_hrs_week           ssrmeet.ssrmeet_hrs_week%TYPE,
                            p_func_code          ssrmeet.ssrmeet_func_code%TYPE,
                            p_comt_code          ssrmeet.ssrmeet_comt_code%TYPE,
                            p_schs_code          ssrmeet.ssrmeet_schs_code%TYPE,
                            p_mtyp_code          ssrmeet.ssrmeet_mtyp_code%TYPE,
                            p_data_origin        ssrmeet.ssrmeet_data_origin%TYPE,
                            p_user_id            ssrmeet.ssrmeet_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_term_code   Term that applies for the course section meeting times. VARCHAR2(6) Required
p_crn   Course Reference Number(CRN) of the course section. VARCHAR2(5) Required
p_begin_time   Begin Time of the course section in HHMM format using 24-hour time. VARCHAR2(4) Required
p_end_time   End Time of the course section in HHMM format using 24-hour time. VARCHAR2(4) Required
p_bldg_code   Building associated with the course section. VARCHAR2(6) Required
p_room_code   Room associated with the course section. VARCHAR2(10) Required
p_start_date   Section Meeting Start Date. DATE Required
p_end_date   Section End Date. DATE Required
p_catagory   Section Indicator. VARCHAR2(2) Required
p_sun_day   Section Meeting Time Sunday Indicator. VARCHAR2(1) Required
p_mon_day   Section Meeting Time Monday Indicator. VARCHAR2(1) Required
p_tue_day   Section Meeting Time Tuesday Indicator. VARCHAR2(1) Required
p_wed_day   Section Meeting Time Wednesday Indicator. VARCHAR2(1) Required
p_thu_day   Section Meeting Time Thursday Indicator. VARCHAR2(1) Required
p_fri_day   Section Meeting Time Friday Indicator. VARCHAR2(1) Required
p_sat_day   Section Meeting Time Saturday Indicator. VARCHAR2(1) Required
p_schd_code   Section Schedule Type. VARCHAR2(3) Required
p_over_ride   Section Time Conflict Override Indicator. VARCHAR2(1) Required
p_credit_hr_sess   Session credit hours. NUMBER(7,3) Required
p_meet_no   Total Section Meeting Number which is system-generated. NUMBER(4) Required
p_hrs_week   Section Metting Hours per Week. NUMBER(5,2) Required
p_func_code   Function code assigned to an event. VARCHAR2(12) Required
p_comt_code   Committee/Service Type code. VARCHAR2(6) Required
p_schs_code   Schedule Status Code for use with Scheduling Tool Interface. VARCHAR2(3) Required
p_mtyp_code   Meeting Type Code assigned to the course section. VARCHAR2(4) Required
p_data_origin   Source system that generated the data. VARCHAR2(30) Required
p_user_id   Oracle ID of the user who inserted or last updated the data. VARCHAR2(30)
p_internal_record_id   Database ROWID


p_validate

PROCEDURE p_validate(p_term_code      ssrmeet.ssrmeet_term_code%TYPE,
                     p_crn            ssrmeet.ssrmeet_crn%TYPE,
                     p_days_code      ssrmeet.ssrmeet_days_code%TYPE DEFAULT NULL,
                     p_day_number     ssrmeet.ssrmeet_day_number%TYPE DEFAULT NULL,
                     p_begin_time     ssrmeet.ssrmeet_begin_time%TYPE DEFAULT NULL,
                     p_end_time       ssrmeet.ssrmeet_end_time%TYPE DEFAULT NULL,
                     p_bldg_code      ssrmeet.ssrmeet_bldg_code%TYPE DEFAULT NULL,
                     p_room_code      ssrmeet.ssrmeet_room_code%TYPE DEFAULT NULL,
                     p_start_date     ssrmeet.ssrmeet_start_date%TYPE,
                     p_end_date       ssrmeet.ssrmeet_end_date%TYPE,
                     p_catagory       IN OUT ssrmeet.ssrmeet_catagory%TYPE,
                     p_sun_day        ssrmeet.ssrmeet_sun_day%TYPE DEFAULT NULL,
                     p_mon_day        ssrmeet.ssrmeet_mon_day%TYPE DEFAULT NULL,
                     p_tue_day        ssrmeet.ssrmeet_tue_day%TYPE DEFAULT NULL,
                     p_wed_day        ssrmeet.ssrmeet_wed_day%TYPE DEFAULT NULL,
                     p_thu_day        ssrmeet.ssrmeet_thu_day%TYPE DEFAULT NULL,
                     p_fri_day        ssrmeet.ssrmeet_fri_day%TYPE DEFAULT NULL,
                     p_sat_day        ssrmeet.ssrmeet_sat_day%TYPE DEFAULT NULL,
                     p_schd_code      IN OUT ssrmeet.ssrmeet_schd_code%TYPE,
                     p_over_ride      ssrmeet.ssrmeet_over_ride%TYPE DEFAULT NULL,
                     p_credit_hr_sess IN OUT ssrmeet.ssrmeet_credit_hr_sess%TYPE,
                     p_meet_no        IN OUT ssrmeet.ssrmeet_meet_no%TYPE,
                     p_hrs_week       IN OUT ssrmeet.ssrmeet_hrs_week%TYPE,
                     p_func_code      IN OUT ssrmeet.ssrmeet_func_code%TYPE,
                     p_comt_code      IN OUT ssrmeet.ssrmeet_comt_code%TYPE,
                     p_schs_code      IN OUT ssrmeet.ssrmeet_schs_code%TYPE,
                     p_mtyp_code      IN OUT ssrmeet.ssrmeet_mtyp_code%TYPE,
                     p_data_origin    ssrmeet.ssrmeet_data_origin%TYPE DEFAULT NULL,
                     p_user_id        ssrmeet.ssrmeet_user_id%TYPE DEFAULT gb_common.f_sct_user,
                     p_rowid          gb_common.internal_record_id_type DEFAULT NULL)

Validates all the data in the record.

Parameters
p_term_code   Term that applies for the course section meeting times. VARCHAR2(6) Required
p_crn   Course Reference Number(CRN) of the course section. VARCHAR2(5) Required
p_days_code   Day code for the course section. VARCHAR2(1)
p_day_number   Day number as defined on the STVDAYS table. NUMBER(1)
p_begin_time   Begin Time of the course section in HHMM format using 24-hour time. VARCHAR2(4)
p_end_time   End Time of the course section in HHMM format using 24-hour time. VARCHAR2(4)
p_bldg_code   Building associated with the course section. VARCHAR2(6)
p_room_code   Room associated with the course section. VARCHAR2(10)
p_start_date   Section Meeting Start Date. DATE Required
p_end_date   Section End Date. DATE Required
p_catagory   Section Indicator. VARCHAR2(2)
p_sun_day   Section Meeting Time Sunday Indicator. VARCHAR2(1)
p_mon_day   Section Meeting Time Monday Indicator. VARCHAR2(1)
p_tue_day   Section Meeting Time Tuesday Indicator. VARCHAR2(1)
p_wed_day   Section Meeting Time Wednesday Indicator. VARCHAR2(1)
p_thu_day   Section Meeting Time Thursday Indicator. VARCHAR2(1)
p_fri_day   Section Meeting Time Friday Indicator. VARCHAR2(1)
p_sat_day   Section Meeting Time Saturday Indicator. VARCHAR2(1)
p_schd_code   Section Schedule Type. VARCHAR2(3)
p_over_ride   Section Time Conflict Override Indicator. VARCHAR2(1)
p_credit_hr_sess   Session credit hours. NUMBER(7,3)
p_meet_no   Total Section Meeting Number which is system-generated. NUMBER(4)
p_hrs_week   Section Metting Hours per Week. NUMBER(5,2)
p_func_code   Function code assigned to an event. VARCHAR2(12)
p_comt_code   Committee/Service Type code. VARCHAR2(6)
p_schs_code   Schedule Status Code for use with Scheduling Tool Interface. VARCHAR2(3)
p_mtyp_code   Meeting Type Code assigned to the course section. VARCHAR2(4)
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)


f_calc_hrs_per_week

FUNCTION f_calc_hrs_per_week(p_term_code  ssrmeet.ssrmeet_term_code%TYPE,
                             p_crn        ssrmeet.ssrmeet_crn%TYPE,
                             p_begin_time ssrmeet.ssrmeet_begin_time%TYPE,
                             p_end_time   ssrmeet.ssrmeet_end_time%TYPE,
                             p_mon_day    ssrmeet.ssrmeet_mon_day%TYPE,
                             p_tue_day    ssrmeet.ssrmeet_tue_day%TYPE,
                             p_wed_day    ssrmeet.ssrmeet_wed_day%TYPE,
                             p_thu_day    ssrmeet.ssrmeet_thu_day%TYPE,
                             p_fri_day    ssrmeet.ssrmeet_fri_day%TYPE,
                             p_sat_day    ssrmeet.ssrmeet_sat_day%TYPE,
                             p_sun_day    ssrmeet.ssrmeet_sun_day%TYPE)
  RETURN NUMBER


f_calc_exclusion_days

FUNCTION f_calc_exclusion_days(p_start_date ssrmeet.ssrmeet_start_date%TYPE,
                               p_end_date   ssrmeet.ssrmeet_end_date%TYPE,
                               p_ptrm_code  ssbsect.ssbsect_ptrm_code%TYPE,
                               p_sun_day    ssrmeet.ssrmeet_sun_day%TYPE,
                               p_mon_day    ssrmeet.ssrmeet_mon_day%TYPE,
                               p_tue_day    ssrmeet.ssrmeet_tue_day%TYPE,
                               p_wed_day    ssrmeet.ssrmeet_wed_day%TYPE,
                               p_thu_day    ssrmeet.ssrmeet_thu_day%TYPE,
                               p_fri_day    ssrmeet.ssrmeet_fri_day%TYPE,
                               p_sat_day    ssrmeet.ssrmeet_sat_day%TYPE)
  RETURN NUMBER


f_calc_number_of_days

FUNCTION f_calc_number_of_days(p_start_date ssrmeet.ssrmeet_start_date%TYPE,
                               p_end_date   ssrmeet.ssrmeet_end_date%TYPE,
                               p_sun_day    ssrmeet.ssrmeet_sun_day%TYPE,
                               p_mon_day    ssrmeet.ssrmeet_mon_day%TYPE,
                               p_tue_day    ssrmeet.ssrmeet_tue_day%TYPE,
                               p_wed_day    ssrmeet.ssrmeet_wed_day%TYPE,
                               p_thu_day    ssrmeet.ssrmeet_thu_day%TYPE,
                               p_fri_day    ssrmeet.ssrmeet_fri_day%TYPE,
                               p_sat_day    ssrmeet.ssrmeet_sat_day%TYPE)
  RETURN NUMBER


p_section_query_one

PROCEDURE p_section_query_one(p_term_code    ssbsect.ssbsect_term_code%TYPE,
                              p_crn          ssbsect.ssbsect_crn%TYPE,
                              p_subject_code OUT ssbsect.ssbsect_subj_code%TYPE,
                              p_crse_numb    OUT ssbsect.ssbsect_crse_numb%TYPE,
                              p_ptrm_code    OUT ssbsect.ssbsect_ptrm_code%TYPE,
                              p_credit_hrs   OUT ssbsect.ssbsect_credit_hrs%TYPE)