index

Package gb_bldgdefinition

This package provides the Common Business interface for the Building Definition API (gb_bldgdefinition).
 
Building information can be maintained for any institutional buildings.
Building information is used in various Banner modules:  Location Management, Class Schedule and Event Management.


Program units
f_api_version   Returns the API version number.
f_exists   Checks to see if a record exists.
f_isequal   Compares two records for equality.
f_query_all   Selects all records for the entity.
f_query_one   Selects one record using the key.
f_query_by_rowid   Selects one record using the ROWID.
f_query_one_lock   Selects one record and locks it.
p_create   Creates a record.
p_delete   Deletes a record.
p_lock   Locks a record.
p_update   Updates a record.

Types
bldgdefinition_rec   Entity record type
bldgdefinition_ref   Entity cursor variable type
bldgdefinition_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity name


M_ENTITY_NAME

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

Business Entity name


bldgdefinition_rec

TYPE bldgdefinition_rec IS RECORD(

   r_bldg_code                   slbbldg.slbbldg_bldg_code%TYPE,
   r_camp_code                   slbbldg.slbbldg_camp_code%TYPE,
   r_capacity                    slbbldg.slbbldg_capacity%TYPE,
   r_maximum_capacity            slbbldg.slbbldg_maximum_capacity%TYPE,
   r_rrcd_code                   slbbldg.slbbldg_rrcd_code%TYPE,
   r_prcd_code                   slbbldg.slbbldg_prcd_code%TYPE,
   r_site_code                   slbbldg.slbbldg_site_code%TYPE,
   r_street_line1                slbbldg.slbbldg_street_line1%TYPE,
   r_street_line2                slbbldg.slbbldg_street_line2%TYPE,
   r_street_line3                slbbldg.slbbldg_street_line3%TYPE,
   r_city                        slbbldg.slbbldg_city%TYPE,
   r_stat_code                   slbbldg.slbbldg_stat_code%TYPE,
   r_zip                         slbbldg.slbbldg_zip%TYPE,
   r_cnty_code                   slbbldg.slbbldg_cnty_code%TYPE,
   r_phone_area                  slbbldg.slbbldg_phone_area%TYPE,
   r_phone_number                slbbldg.slbbldg_phone_number%TYPE,
   r_phone_extension             slbbldg.slbbldg_phone_extension%TYPE,
   r_sex                         slbbldg.slbbldg_sex%TYPE,
   r_coll_code                   slbbldg.slbbldg_coll_code%TYPE,
   r_dept_code                   slbbldg.slbbldg_dept_code%TYPE,
   r_key_number                  slbbldg.slbbldg_key_number%TYPE,
   r_pars_code                   slbbldg.slbbldg_pars_code%TYPE,
   r_data_origin                 slbbldg.slbbldg_data_origin%TYPE,
   r_user_id                     slbbldg.slbbldg_user_id%TYPE,
   r_ctry_code_phone             slbbldg.slbbldg_ctry_code_phone%TYPE,
   r_house_number                slbbldg.slbbldg_house_number%TYPE,
   r_street_line4                slbbldg.slbbldg_street_line4%TYPE,
   r_internal_record_id          gb_common.internal_record_id_type);

Entity record type


bldgdefinition_ref

TYPE bldgdefinition_ref IS REF CURSOR
   RETURN bldgdefinition_rec;

Entity cursor variable type


bldgdefinition_tab

TYPE bldgdefinition_tab IS TABLE OF bldgdefinition_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_bldg_code slbbldg.slbbldg_bldg_code%TYPE,
                  p_rowid     VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_bldg_code   Building code associated with the building record. 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 bldgdefinition_rec,
                   rec_two bldgdefinition_rec) RETURN VARCHAR2

Compares two records for equality.

Parameters
rec_one   First record to compare. Defined as type bldgdefinition_rec, required.
rec_two   Second record to compare. Defined as type bldgdefinition_rec, required.

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


f_query_all

FUNCTION f_query_all(p_bldg_code slbbldg.slbbldg_bldg_code%TYPE)
  RETURN bldgdefinition_ref

Selects all records for the entity.

Parameters
p_bldg_code   Building code associated with the building record. Wild card (%) may be used with p_bldg_code. VARCHAR2(6) Required Key

Returns
A cursor variable that will fetch the set of records.  Defined as type bldgdefinition_rec.


f_query_one

FUNCTION f_query_one(p_bldg_code slbbldg.slbbldg_bldg_code%TYPE)
  RETURN bldgdefinition_ref

Selects one record using the key.

Parameters
p_bldg_code   Building code associated with the building record.  VARCHAR2(6) Required Key

Returns
A cursor variable that will fetch exactly one record.  Defined as type bldgdefinition_rec.


f_query_by_rowid

FUNCTION f_query_by_rowid(p_rowid VARCHAR2) RETURN bldgdefinition_ref

Selects one record using the ROWID.

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

Returns
A cursor variable that will fetch exactly one record.  Defined as type bldgdefinition_rec.


f_query_one_lock

FUNCTION f_query_one_lock(p_bldg_code slbbldg.slbbldg_bldg_code%TYPE,
                          p_rowid     VARCHAR2 DEFAULT NULL)
  RETURN bldgdefinition_ref

Selects one record and locks it.

Parameters
p_bldg_code   Building code associated with the building record. 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.  Defined as type bldgdefinition_rec.


p_create

PROCEDURE p_create(p_bldg_code        slbbldg.slbbldg_bldg_code%TYPE,
                   p_camp_code        slbbldg.slbbldg_camp_code%TYPE,
                   p_capacity         slbbldg.slbbldg_capacity%TYPE,
                   p_maximum_capacity slbbldg.slbbldg_maximum_capacity%TYPE DEFAULT NULL,
                   p_rrcd_code        slbbldg.slbbldg_rrcd_code%TYPE DEFAULT NULL,
                   p_prcd_code        slbbldg.slbbldg_prcd_code%TYPE DEFAULT NULL,
                   p_site_code        slbbldg.slbbldg_site_code%TYPE DEFAULT NULL,
                   p_street_line1     slbbldg.slbbldg_street_line1%TYPE DEFAULT NULL,
                   p_street_line2     slbbldg.slbbldg_street_line2%TYPE DEFAULT NULL,
                   p_street_line3     slbbldg.slbbldg_street_line3%TYPE DEFAULT NULL,
                   p_city             slbbldg.slbbldg_city%TYPE DEFAULT NULL,
                   p_stat_code        slbbldg.slbbldg_stat_code%TYPE DEFAULT NULL,
                   p_zip              slbbldg.slbbldg_zip%TYPE DEFAULT NULL,
                   p_cnty_code        slbbldg.slbbldg_cnty_code%TYPE DEFAULT NULL,
                   p_phone_area       slbbldg.slbbldg_phone_area%TYPE DEFAULT NULL,
                   p_phone_number     slbbldg.slbbldg_phone_number%TYPE DEFAULT NULL,
                   p_phone_extension  slbbldg.slbbldg_phone_extension%TYPE DEFAULT NULL,
                   p_sex              slbbldg.slbbldg_sex%TYPE DEFAULT NULL,
                   p_coll_code        slbbldg.slbbldg_coll_code%TYPE DEFAULT NULL,
                   p_dept_code        slbbldg.slbbldg_dept_code%TYPE DEFAULT NULL,
                   p_key_number       slbbldg.slbbldg_key_number%TYPE DEFAULT NULL,
                   p_pars_code        slbbldg.slbbldg_pars_code%TYPE DEFAULT NULL,
                   p_data_origin      slbbldg.slbbldg_data_origin%TYPE DEFAULT gb_common.data_origin,
                   p_user_id          slbbldg.slbbldg_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_ctry_code_phone  slbbldg.slbbldg_ctry_code_phone%TYPE DEFAULT NULL,
                   p_house_number     slbbldg.slbbldg_house_number%TYPE DEFAULT NULL,
                   p_street_line4     slbbldg.slbbldg_street_line4%TYPE DEFAULT NULL,
                   p_rowid_out        OUT VARCHAR2)

Creates a record.

Parameters
p_bldg_code   Building code associated with the building record.  VARCHAR2(6) Required Key
p_camp_code   Code of the campus in which the building is located.  VARCHAR2(3) Required
p_capacity   Capacity of the building.  NUMBER(5) Required
p_maximum_capacity   Maximum capacity of the building.  NUMBER(5)
p_rrcd_code   Default room rate for all rooms defined for the building.  VARCHAR2(4)
p_prcd_code   Default phone rate for all rooms defined for the building.  VARCHAR2(4)
p_site_code   Site of the building.  VARCHAR2(2)
p_street_line1   First street line for the address of the building.  VARCHAR2(75)
p_street_line2   Second street line of the address of the building.  VARCHAR2(75)
p_street_line3   Third street line of the address of the building.  VARCHAR2(75)
p_city   City where the building is located.  VARCHAR2(20)
p_stat_code   State or province code of the building's address. Validated against the STVSTAT table.  VARCHAR2(3)
p_zip   ZIP or postal code of the building.  VARCHAR2(10)
p_cnty_code   County code of the building.  VARCHAR2(5)
p_phone_area   Area code of the phone number for the building.  VARCHAR2(6)
p_phone_number   Phone number for the building.  VARCHAR2(12)
p_phone_extension   Phone extension of the phone number for the building.  VARCHAR2(10)
p_sex   Gender associated with the building.  VARCHAR2(1)
p_coll_code   College associated with the building.  VARCHAR2(2)
p_dept_code   Department associated with the building.  VARCHAR2(4)
p_key_number   Number of the key to the building.  VARCHAR2(5)
p_pars_code   Partition code associated with the building.  Partition codes define campus zones, which are categories or groupings of rooms. Partitions can be defined for buildings, rooms, subjects, courses and sections.  VARCHAR2(7)
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_house_number   Building number in a street or area.  VARCHAR2(10) Required
p_ctry_code_phone   Telephone code designating the region and country  VARCHAR2(4) Required
p_street_line4   Fourth street line of the address of the building.  VARCHAR2(75) Required
p_rowid_out   Database ROWID of the record to be created.  VARCHAR2(18) Required


p_delete

PROCEDURE p_delete(p_bldg_code slbbldg.slbbldg_bldg_code%TYPE,
                   p_rowid     VARCHAR2 DEFAULT NULL)

Deletes a record.

Parameters
p_bldg_code   Building code associated with the building record.  VARCHAR2(6) Required Key
p_rowid   Database ROWID of the record to be deleted.  VARCHAR2(18)


p_lock

PROCEDURE p_lock(p_bldg_code   slbbldg.slbbldg_bldg_code%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_bldg_code   Building code associated with the building record.  VARCHAR2(6) Required Key
p_rowid_inout   Database ROWID of the record to be locked.  VARCHAR2(18)


p_update

PROCEDURE p_update(p_bldg_code        slbbldg.slbbldg_bldg_code%TYPE,
                   p_camp_code        slbbldg.slbbldg_camp_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_capacity         slbbldg.slbbldg_capacity%TYPE DEFAULT dml_common.f_unspecified_number,
                   p_maximum_capacity slbbldg.slbbldg_maximum_capacity%TYPE DEFAULT dml_common.f_unspecified_number,
                   p_rrcd_code        slbbldg.slbbldg_rrcd_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_prcd_code        slbbldg.slbbldg_prcd_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_site_code        slbbldg.slbbldg_site_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_street_line1     slbbldg.slbbldg_street_line1%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_street_line2     slbbldg.slbbldg_street_line2%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_street_line3     slbbldg.slbbldg_street_line3%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_city             slbbldg.slbbldg_city%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_stat_code        slbbldg.slbbldg_stat_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_zip              slbbldg.slbbldg_zip%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_cnty_code        slbbldg.slbbldg_cnty_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_phone_area       slbbldg.slbbldg_phone_area%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_phone_number     slbbldg.slbbldg_phone_number%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_phone_extension  slbbldg.slbbldg_phone_extension%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_sex              slbbldg.slbbldg_sex%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_coll_code        slbbldg.slbbldg_coll_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_dept_code        slbbldg.slbbldg_dept_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_key_number       slbbldg.slbbldg_key_number%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_pars_code        slbbldg.slbbldg_pars_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_data_origin      slbbldg.slbbldg_data_origin%TYPE DEFAULT gb_common.data_origin,
                   p_user_id          slbbldg.slbbldg_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_ctry_code_phone  slbbldg.slbbldg_ctry_code_phone%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_house_number     slbbldg.slbbldg_house_number%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_street_line4     slbbldg.slbbldg_street_line4%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid            VARCHAR2 DEFAULT NULL)

Updates a record.

Parameters
p_bldg_code   Building code associated with the building record.  VARCHAR2(6) Required Key
p_camp_code   Code of the campus in which the building is located.  VARCHAR2(3)
p_capacity   Capacity of the building.  NUMBER(5) Required
p_maximum_capacity   Maximum capacity of the building.  NUMBER(5)
p_rrcd_code   Default room rate for all rooms defined for the building.  VARCHAR2(4)
p_prcd_code   Default phone rate for all rooms defined for the building.  VARCHAR2(4)
p_site_code   Site of the building.  VARCHAR2(2)
p_street_line1   First street line for the address of the building.  VARCHAR2(75)
p_street_line2   Second street line of the address of the building.  VARCHAR2(75)
p_street_line3   Third street line of the address of the building.  VARCHAR2(75)
p_city   City where the building is located.  VARCHAR2(20)
p_stat_code   State or province code of the building's address. Validated against the STVSTAT table.  VARCHAR2(3)
p_zip   ZIP or postal code of the building.  VARCHAR2(10)
p_cnty_code   County code of the building.  VARCHAR2(5)
p_phone_area   Area code of the phone number for the building.  VARCHAR2(6)
p_phone_number   Phone number for the building.  VARCHAR2(12)
p_phone_extension   Phone extension of the phone number for the building.  VARCHAR2(10)
p_sex   Gender associated with the building.  VARCHAR2(1)
p_coll_code   College that is associated with the building.  VARCHAR2(2)
p_dept_code   Department that is associated with the building.  VARCHAR2(4)
p_key_number   Number of the key to the building.  VARCHAR2(5)
p_pars_code   Partition code associated with the building.  Partition codes define campus zones, which are categories or groupings of rooms. Partitions can be defined for buildings, rooms, subjects, courses and sections.  VARCHAR2(7)
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_house_number   Building number in a street or area.  VARCHAR2(10) Required
p_ctry_code_phone   Telephone code designating the region and country  VARCHAR2(4) Required
p_street_line4   Fourth street line of the address of the building.  VARCHAR2(75) Required
p_rowid   Database ROWID of the record to be updated.  VARCHAR2(18)