index

Package sb_crse_atts_restriction

This package provides the common business interface for the Course Student Attribute Restriction API (sb_crse_atts_restriction).
 
Course student attribute restrictions are assigned by effective term at the catalog level. These restrictions are then applied to sections that are created at the schedule level.


Program units
f_api_version  
f_exists  
f_isequal  
f_query_all  
f_query_all_max_term  
f_query_active_max_term  
f_query_one  
f_query_by_rowid  
f_query_one_lock  
p_create  
p_delete  
p_delete_all  
p_lock  
p_update  
p_copy_restrictions  

Types
crse_atts_restriction_rec  
crse_atts_restriction_ref  
crse_atts_restriction_tab  

Constants
M_ENTITY_NAME  
M_BASE_TABLE_NAME  


M_ENTITY_NAME

M_ENTITY_NAME        CONSTANT VARCHAR2(21) := 'CRSE_ATTS_RESTRICTION';

Business Entity Name


M_BASE_TABLE_NAME

M_BASE_TABLE_NAME    CONSTANT VARCHAR2(7) := 'SCRRATT';

Base table name


crse_atts_restriction_rec

TYPE crse_atts_restriction_rec IS RECORD (
  r_primary_key             scrratt.scrratt_primary_key%TYPE,
  r_subj_code               scrratt.scrratt_subj_code%TYPE,
  r_crse_numb               scrratt.scrratt_crse_numb%TYPE,
  r_eff_term                scrratt.scrratt_eff_term%TYPE,
  r_rec_type                scrratt.scrratt_rec_type%TYPE,
  r_user_id                 scrratt.scrratt_user_id%TYPE,
  r_atts_ie_cde             scrratt.scrratt_atts_ie_cde%TYPE,
  r_atts_code               scrratt.scrratt_atts_code%TYPE,
  r_data_origin             scrratt.scrratt_data_origin%TYPE,
  r_internal_record_id      gb_common.internal_record_id_type);

Business Entity record type


crse_atts_restriction_ref

TYPE crse_atts_restriction_ref IS REF CURSOR RETURN crse_atts_restriction_rec;

Entity cursor variable type


crse_atts_restriction_tab

TYPE crse_atts_restriction_tab IS TABLE OF crse_atts_restriction_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_primary_key scrratt.scrratt_primary_key%TYPE DEFAULT NULL,
                  p_subj_code   scrratt.scrratt_subj_code%TYPE DEFAULT NULL,
                  p_crse_numb   scrratt.scrratt_crse_numb%TYPE DEFAULT NULL,
                  p_eff_term    scrratt.scrratt_eff_term%TYPE DEFAULT NULL,
                  p_rec_type    scrratt.scrratt_rec_type%TYPE DEFAULT NULL,
                  p_atts_code   scrratt.scrratt_atts_code%TYPE DEFAULT NULL,
                  p_rowid       gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks if a record exists.

Parameters
p_primary_key   Unique sequence number that identifies the record. NUMBER (9) Key
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key
p_atts_code   Code of a student attribute for which registration restrictions exist.  The Include/Exclude field will determine how the student attribute is restricted. An unlimited number of student attributes may be defined. VARCHAR2(4) 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 crse_atts_restriction_rec,
                   rec_two crse_atts_restriction_rec) RETURN VARCHAR2

Compares two records for equality. Tests each field of rec_one against the corresponding field of rec_two. Two null values are considered equal.

Parameters
rec_one   The first record to compare. Type crse_atts_restriction_rec Required
rec_two   The second record to compare. Type crse_atts_restriction_rec Required

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


f_query_all

Function f_query_all(p_subj_code scrratt.scrratt_subj_code%TYPE,
                     p_crse_numb scrratt.scrratt_crse_numb%TYPE,
                     p_eff_term  scrratt.scrratt_eff_term%TYPE,
                     p_rec_type  scrratt.scrratt_rec_type%TYPE DEFAULT NULL)
  RETURN crse_atts_restriction_ref

Selects all records for the entity.

Parameters
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Required Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Required Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Required Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key

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


f_query_all_max_term

Function f_query_all_max_term(p_subj_code scrratt.scrratt_subj_code%TYPE,
                              p_crse_numb scrratt.scrratt_crse_numb%TYPE,
                              p_eff_term  scrratt.scrratt_eff_term%TYPE,
                              p_rec_type  scrratt.scrratt_rec_type%TYPE DEFAULT NULL)
  RETURN crse_atts_restriction_ref

Selects all records for the entity by maximum effective term.

Parameters
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Required Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Required Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Required Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key

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


f_query_active_max_term

Function f_query_active_max_term(p_subj_code scrratt.scrratt_subj_code%TYPE,
                                 p_crse_numb scrratt.scrratt_crse_numb%TYPE,
                                 p_eff_term  scrratt.scrratt_eff_term%TYPE,
                                 p_rec_type  scrratt.scrratt_rec_type%TYPE DEFAULT NULL)
  RETURN crse_atts_restriction_ref

Selects all records for the entity by maximum effective term where a Type 2 record exists.

Parameters
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Required Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Required Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Required Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key

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


f_query_one

Function f_query_one(p_primary_key scrratt.scrratt_primary_key%TYPE DEFAULT NULL,
                     p_subj_code   scrratt.scrratt_subj_code%TYPE DEFAULT NULL,
                     p_crse_numb   scrratt.scrratt_crse_numb%TYPE DEFAULT NULL,
                     p_eff_term    scrratt.scrratt_eff_term%TYPE DEFAULT NULL,
                     p_rec_type    scrratt.scrratt_rec_type%TYPE DEFAULT NULL,
                     p_atts_code   scrratt.scrratt_atts_code%TYPE DEFAULT NULL)
  RETURN crse_atts_restriction_ref

Selects one record using the primary key or unique index.

Parameters
p_primary_key   Unique sequence number that identifies the record. NUMBER (9) Key
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key
p_atts_code   Code of a student attribute for which registration restrictions exist.  The Include/Exclude field will determine how the student attribute is restricted. An unlimited number of student attributes may be defined. VARCHAR2(4) Key

Returns
A cursor variable that will fetch exactly one record.


f_query_by_rowid

Function f_query_by_rowid(p_rowid gb_common.internal_record_id_type)
  RETURN crse_atts_restriction_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_primary_key scrratt.scrratt_primary_key%TYPE DEFAULT NULL,
                          p_subj_code   scrratt.scrratt_subj_code%TYPE DEFAULT NULL,
                          p_crse_numb   scrratt.scrratt_crse_numb%TYPE DEFAULT NULL,
                          p_eff_term    scrratt.scrratt_eff_term%TYPE DEFAULT NULL,
                          p_rec_type    scrratt.scrratt_rec_type%TYPE DEFAULT NULL,
                          p_atts_code   scrratt.scrratt_atts_code%TYPE DEFAULT NULL,
                          p_rowid       gb_common.internal_record_id_type DEFAULT NULL)
  RETURN crse_atts_restriction_ref

Selects one record and locks it.

Parameters
p_primary_key   Unique sequence number that identifies the record. NUMBER (9) Key
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key
p_atts_code   Code of a student attribute for which registration restrictions exist.  The Include/Exclude field will determine how the student attribute is restricted. An unlimited number of student attributes may be defined. VARCHAR2(4) 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_subj_code       scrratt.scrratt_subj_code%TYPE,
                   p_crse_numb       scrratt.scrratt_crse_numb%TYPE,
                   p_eff_term        scrratt.scrratt_eff_term%TYPE,
                   p_rec_type        scrratt.scrratt_rec_type%TYPE,
                   p_user_id         scrratt.scrratt_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_atts_ie_cde     scrratt.scrratt_atts_ie_cde%TYPE DEFAULT NULL,
                   p_atts_code       scrratt.scrratt_atts_code%TYPE DEFAULT NULL,
                   p_data_origin     scrratt.scrratt_data_origin%TYPE DEFAULT NULL,
                   p_primary_key_out OUT scrratt.scrratt_primary_key%TYPE,
                   p_rowid_out       OUT gb_common.internal_record_id_type)

Creates a record.

Parameters
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Required Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Required Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Required Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Required Key
p_user_id   ID of the user who changed the record. VARCHAR2(30) Required
p_atts_ie_cde   Indicator for whether the student attribute codes entered should be included or excluded in restricting the course.  Valid values are:  I - Include, E - Exclude. VARCHAR2(1)
p_atts_code   Code of a student attribute for which registration restrictions exist.  The Include/Exclude field will determine how the student attribute is restricted. An unlimited number of student attributes may be defined. VARCHAR2(4) Key
p_data_origin   Source system that generated the data. VARCHAR2(30)
p_primary_key_out   Unique sequence number that identifies the record. NUMBER (9) Required
p_rowid_out   Database ROWID of the record to be created. VARCHAR2(18) Required


p_delete

Procedure p_delete(p_primary_key scrratt.scrratt_primary_key%TYPE DEFAULT NULL,
                   p_subj_code   scrratt.scrratt_subj_code%TYPE DEFAULT NULL,
                   p_crse_numb   scrratt.scrratt_crse_numb%TYPE DEFAULT NULL,
                   p_eff_term    scrratt.scrratt_eff_term%TYPE DEFAULT NULL,
                   p_rec_type    scrratt.scrratt_rec_type%TYPE DEFAULT NULL,
                   p_atts_code   scrratt.scrratt_atts_code%TYPE DEFAULT NULL,
                   p_rowid       gb_common.internal_record_id_type DEFAULT NULL)

Deletes a record.

Parameters
p_primary_key   Unique sequence number that identifies the record. NUMBER (9) Key
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key
p_atts_code   Code of a student attribute for which registration restrictions exist.  The Include/Exclude field will determine how the student attribute is restricted. An unlimited number of student attributes may be defined. VARCHAR2(4) Key
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18)


p_delete_all

Procedure p_delete_all(p_subj_code scrratt.scrratt_subj_code%TYPE,
                       p_crse_numb scrratt.scrratt_crse_numb%TYPE,
                       p_eff_term  scrratt.scrratt_eff_term%TYPE)

Deletes all records for the subject, course, and term.

Parameters
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Required Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Required Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Required Key


p_lock

Procedure p_lock(p_primary_key scrratt.scrratt_primary_key%TYPE DEFAULT NULL,
                 p_subj_code   scrratt.scrratt_subj_code%TYPE DEFAULT NULL,
                 p_crse_numb   scrratt.scrratt_crse_numb%TYPE DEFAULT NULL,
                 p_eff_term    scrratt.scrratt_eff_term%TYPE DEFAULT NULL,
                 p_rec_type    scrratt.scrratt_rec_type%TYPE DEFAULT NULL,
                 p_atts_code   scrratt.scrratt_atts_code%TYPE DEFAULT NULL,
                 p_rowid_inout IN OUT gb_common.internal_record_id_type)

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

Parameters
p_primary_key   Unique sequence number that identifies the record. NUMBER (9) Key
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key
p_atts_code   Code of a student attribute for which registration restrictions exist.  The Include/Exclude field will determine how the student attribute is restricted. An unlimited number of student attributes may be defined. VARCHAR2(4) Key
p_rowid_inout   Database ROWID of the record to be locked. VARCHAR2(18) Required


p_update

Procedure p_update(p_primary_key scrratt.scrratt_primary_key%TYPE DEFAULT NULL,
                   p_subj_code   scrratt.scrratt_subj_code%TYPE DEFAULT NULL,
                   p_crse_numb   scrratt.scrratt_crse_numb%TYPE DEFAULT NULL,
                   p_eff_term    scrratt.scrratt_eff_term%TYPE DEFAULT NULL,
                   p_rec_type    scrratt.scrratt_rec_type%TYPE DEFAULT NULL,
                   p_user_id     scrratt.scrratt_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_atts_ie_cde scrratt.scrratt_atts_ie_cde%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_atts_code   scrratt.scrratt_atts_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_data_origin scrratt.scrratt_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid       gb_common.internal_record_id_type DEFAULT NULL)

Updates a record.

Parameters
p_primary_key   Unique sequence number that identifies the record. NUMBER (9) Key
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Key
p_eff_term   Term in which this version of the course registration student attribute restriction becomes effective. VARCHAR2(6) Key
p_rec_type   Indicator for whether the record contains a student attribute indicator or a student attribute code. Valid values are: 1 - Attribute indicator, 2 - Attribute code. VARCHAR2(1) Key
p_user_id   ID of the user who changed the record. VARCHAR2(30)
p_atts_ie_cde   Indicator for whether the student attribute codes entered should be included or excluded in restricting the course.  Valid values are:  I - Include, E - Exclude. VARCHAR2(1)
p_atts_code   Code of a student attribute for which registration restrictions exist.  The Include/Exclude field will determine how the student attribute is restricted. An unlimited number of student attributes may be defined. VARCHAR2(4) Key
p_data_origin   Source system that generated the data. VARCHAR2(30)
p_rowid   Database ROWID of the record to be updated. VARCHAR2(18)


p_copy_restrictions

Procedure p_copy_restrictions(p_subj_code   scrratt.scrratt_subj_code%TYPE,
                              p_crse_numb   scrratt.scrratt_crse_numb%TYPE,
                              p_from_term   scrratt.scrratt_eff_term%TYPE,
                              p_to_term     scrratt.scrratt_eff_term%TYPE,
                              p_user_id     scrratt.scrratt_user_id%TYPE DEFAULT gb_common.f_sct_user,
                              p_data_origin scrratt.scrratt_data_origin%TYPE DEFAULT NULL)

Copies student attribute restrictions from one term to another.

Parameters
p_subj_code   Code of the subject area of the course. VARCHAR2(4) Required Key
p_crse_numb   Course number associated with the subject for the course. VARCHAR2(5) Required Key
p_from_term   Term from which the course registration student attribute restrictions will be copied. VARCHAR2(6) Required Key
p_to_term   Term to which the course registration student attribute restrictions will be copied. VARCHAR2(6) Required Key
p_user_id   ID of the user who changed the record. VARCHAR2(30)
p_data_origin   Source system that generated the data. VARCHAR2(30)