index

Package sb_curriculum_default

This package provides the Common Business interface for the Curriculum Default API (sb_curriculum_default).
The defaults are defined by the user for each learner module to facilitate data entry.
The default values  populate curricular elements such as level, college, degree, campus, program, major and department when a new curriculum or field of study is inserted.  Curriculum defaults are available only for data entry on the Curricula tab on SHADEGR, SAAADMS, SRARECR, SGASTDN and SFAREGS and the two quick entry forms SAAQUIK and SRAQUIK.  The user curriculum defaults are not used on SAAQUIK and SRAQUIK if curriculum defaults have been defined on SAAQKER or on the Default tab on SRAQUIK.


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
curriculum_default_rec   Business Entity record type
curriculum_default_ref   Entity cursor variable type
curriculum_default_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity Name
M_BASE_TABLE_NAME   Base table name


M_ENTITY_NAME

M_ENTITY_NAME        CONSTANT VARCHAR2(18) := 'CURRICULUM_DEFAULT';

Business Entity Name


M_BASE_TABLE_NAME

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

Base table name


curriculum_default_rec

TYPE curriculum_default_rec IS RECORD (
  r_user_id                 sorlcdf.sorlcdf_user_id%TYPE,
  r_lmod_code               sorlcdf.sorlcdf_lmod_code%TYPE,
  r_camp_code               sorlcdf.sorlcdf_camp_code%TYPE,
  r_coll_code               sorlcdf.sorlcdf_coll_code%TYPE,
  r_levl_code               sorlcdf.sorlcdf_levl_code%TYPE,
  r_program                 sorlcdf.sorlcdf_program%TYPE,
  r_degc_code               sorlcdf.sorlcdf_degc_code%TYPE,
  r_majr_code               sorlcdf.sorlcdf_majr_code%TYPE,
  r_dept_code               sorlcdf.sorlcdf_dept_code%TYPE,
  r_data_origin             sorlcdf.sorlcdf_data_origin%TYPE,
  r_internal_record_id      gb_common.internal_record_id_type);

Business Entity record type


curriculum_default_ref

TYPE curriculum_default_ref IS REF CURSOR RETURN curriculum_default_rec;

Entity cursor variable type


curriculum_default_tab

TYPE curriculum_default_tab IS TABLE OF curriculum_default_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_user_id   sorlcdf.sorlcdf_user_id%TYPE,
                  p_lmod_code sorlcdf.sorlcdf_lmod_code%TYPE,
                  p_rowid     gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_user_id   Oracle user ID of the user to whom the curriculum preferences belong. VARCHAR2(30) Required Key
p_lmod_code   Learner module code for the curriculum preferences. VARCHAR2(15) 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 curriculum_default_rec,
                   rec_two curriculum_default_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 curriculum_default_rec Required
rec_two   The second record to compare. Type curriculum_default_rec Required

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


f_query_all

Function f_query_all(p_user_id   sorlcdf.sorlcdf_user_id%TYPE,
                     p_lmod_code sorlcdf.sorlcdf_lmod_code%TYPE DEFAULT NULL)
  RETURN curriculum_default_ref

Selects all records for the entity.

Parameters
p_user_id   Oracle user ID of the user to whom the curriculum preferences belong. VARCHAR2(30) Required Key
p_lmod_code   Learner module code for the curriculum preferences. VARCHAR2(15) Required Key

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


f_query_one

Function f_query_one(p_user_id   sorlcdf.sorlcdf_user_id%TYPE,
                     p_lmod_code sorlcdf.sorlcdf_lmod_code%TYPE)
  RETURN curriculum_default_ref

Selects one record using the key.

Parameters
p_user_id   Oracle user ID of the user to whom the curriculum preferences belong. VARCHAR2(30) Required Key
p_lmod_code   Learner module code for the curriculum preferences. VARCHAR2(15) Required 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 curriculum_default_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_user_id   sorlcdf.sorlcdf_user_id%TYPE,
                          p_lmod_code sorlcdf.sorlcdf_lmod_code%TYPE,
                          p_rowid     gb_common.internal_record_id_type DEFAULT NULL)
  RETURN curriculum_default_ref

Selects one record and locks it.

Parameters
p_user_id   Oracle user ID of the user to whom the curriculum preferences belong. VARCHAR2(30) Required Key
p_lmod_code   Learner module code for the curriculum preferences. VARCHAR2(15) 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_user_id     sorlcdf.sorlcdf_user_id%TYPE,
                   p_lmod_code   sorlcdf.sorlcdf_lmod_code%TYPE,
                   p_camp_code   sorlcdf.sorlcdf_camp_code%TYPE DEFAULT NULL,
                   p_coll_code   sorlcdf.sorlcdf_coll_code%TYPE DEFAULT NULL,
                   p_levl_code   sorlcdf.sorlcdf_levl_code%TYPE DEFAULT NULL,
                   p_program     sorlcdf.sorlcdf_program%TYPE DEFAULT NULL,
                   p_degc_code   sorlcdf.sorlcdf_degc_code%TYPE DEFAULT NULL,
                   p_majr_code   sorlcdf.sorlcdf_majr_code%TYPE DEFAULT NULL,
                   p_dept_code   sorlcdf.sorlcdf_dept_code%TYPE DEFAULT NULL,
                   p_data_origin sorlcdf.sorlcdf_data_origin%TYPE,
                   p_rowid_out   OUT gb_common.internal_record_id_type)

Creates a record.

Parameters
p_user_id   Oracle user ID of the user to whom the curriculum preferences belong. VARCHAR2(30) Required Key
p_lmod_code   Learner module code for the curriculum preferences. VARCHAR2(15) Required Key
p_camp_code   Campus code for the curriculum user preference. VARCHAR2(3)
p_coll_code   College code for the curriculum user preference. VARCHAR2(2)
p_levl_code   Level code for the curriculum user preference. VARCHAR2(2)
p_program   Program for the curriculum user preference. VARCHAR2(12)
p_degc_code   Degree code for the curriculum user preference. VARCHAR2(6)
p_majr_code   Primary major field of study code for the curriculum user preference. VARCHAR2(4)
p_dept_code   Department code for the primary major for the curriculum user preference. VARCHAR2(4)
p_data_origin   Source system that created or updated the row. VARCHAR2(30) Required
p_rowid_out   Database ROWID of the record to be created. VARCHAR2(18) Required


p_delete

Procedure p_delete(p_user_id   sorlcdf.sorlcdf_user_id%TYPE,
                   p_lmod_code sorlcdf.sorlcdf_lmod_code%TYPE,
                   p_rowid     gb_common.internal_record_id_type DEFAULT NULL)

Deletes a record.

Parameters
p_user_id   Oracle user ID of the user to whom the curriculum preferences belong. VARCHAR2(30) Required Key
p_lmod_code   Learner module code for the curriculum preferences. VARCHAR2(15) Required Key
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18)


p_lock

Procedure p_lock(p_user_id     sorlcdf.sorlcdf_user_id%TYPE,
                 p_lmod_code   sorlcdf.sorlcdf_lmod_code%TYPE,
                 p_rowid_inout IN OUT gb_common.internal_record_id_type)

Locks a record.
If 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_user_id   Oracle user ID of the user to whom the curriculum preferences belong. VARCHAR2(30) Required Key
p_lmod_code   Learner module code for the curriculum preferences. VARCHAR2(15) Required Key
p_rowid_inout   Database ROWID of the record to be locked. VARCHAR2(18) Required


p_update

Procedure p_update(p_user_id     sorlcdf.sorlcdf_user_id%TYPE,
                   p_lmod_code   sorlcdf.sorlcdf_lmod_code%TYPE,
                   p_camp_code   sorlcdf.sorlcdf_camp_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_coll_code   sorlcdf.sorlcdf_coll_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_levl_code   sorlcdf.sorlcdf_levl_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_program     sorlcdf.sorlcdf_program%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_degc_code   sorlcdf.sorlcdf_degc_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_majr_code   sorlcdf.sorlcdf_majr_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_dept_code   sorlcdf.sorlcdf_dept_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_data_origin sorlcdf.sorlcdf_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid       gb_common.internal_record_id_type DEFAULT NULL)

Updates a record.

Parameters
p_user_id   Oracle user ID of the user to whom the curriculum preferences belong. VARCHAR2(30) Required Key
p_lmod_code   Learner module code for the curriculum preferences. VARCHAR2(15) Required Key
p_camp_code   Campus code for the curriculum user preference. VARCHAR2(3)
p_coll_code   College code for the curriculum user preference. VARCHAR2(2)
p_levl_code   Level code for the curriculum user preference. VARCHAR2(2)
p_program   Program for the curriculum user preference. VARCHAR2(12)
p_degc_code   Degree code for the curriculum user preference. VARCHAR2(6)
p_majr_code   Primary major field of study code for the curriculum user preference. VARCHAR2(4)
p_dept_code   Department code for the primary major for the curriculum user preference. VARCHAR2(4)
p_data_origin   Source system that created or updated the row. VARCHAR2(30) Required
p_rowid   Database ROWID of the record to be updated. VARCHAR2(18)