index

Package gb_cm_data_dictionary

This package provides the Common Business interface for Common Matching Data Dictionary.
 
The Data Dictionary contains the available data elements that may be used for the Common Matching process. The data elements are unique to the SCT Banner Base table and column name.  The data elements that have been delivered will have the SYS_REQ_IND defined as (Y)es and should not be updated or deleted from the Data Dictionary table.
Those data elements that are available for online data entry are defined with the ONLINE_IND as (Y)es.  Those data elements that are required by the Common Matching procedure are defined with the ELEMENT_REQ_IND as (Y)es.


Program units
f_api_version   Returns the API version number.
f_exists   Checks to see if a record exists.
f_sys_req   Checks to see if a record is system required.
f_get_element   Retrieves element given a column name.
f_get_column   Retrieves column given an element.
f_isequal   Compares two records for equality.
f_query_all   Selects all records for the entity.
f_query_one   Selects one record using key.
f_query_by_rowid   Selects one record using ROWID.
f_query_one_lock   Selects one record and locks it for update.
p_create   Creates a record.
p_delete   Deletes a record.
p_lock   Locks a record.
p_update   Updates a record.

Types
cm_data_dictionary_rec   Entity record type
cm_data_dictionary_ref   Entity cursor variable type
cm_data_dictionary_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity name


M_ENTITY_NAME

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

Business Entity name


cm_data_dictionary_rec

TYPE cm_data_dictionary_rec IS RECORD (
   r_table                   gorcmdd.gorcmdd_table%TYPE,
   r_column_name             gorcmdd.gorcmdd_column_name%TYPE,
   r_element                 gorcmdd.gorcmdd_element%TYPE,
   r_max_length              gorcmdd.gorcmdd_max_length%TYPE,
   r_override_length_ind     gorcmdd.gorcmdd_override_length_ind%TYPE,
   r_allow_neg_length_ind    gorcmdd.gorcmdd_allow_neg_length_ind%TYPE,
   r_online_match_ind        gorcmdd.gorcmdd_online_match_ind%TYPE,
   r_sys_req_ind             gorcmdd.gorcmdd_sys_req_ind%TYPE,
   r_element_req_ind         gorcmdd.gorcmdd_element_req_ind%TYPE,
   r_user_id                 gorcmdd.gorcmdd_user_id%TYPE,
   r_data_origin             gorcmdd.gorcmdd_data_origin%TYPE,
   r_internal_record_id      gb_common.internal_record_id_type);

Entity record type


cm_data_dictionary_ref

TYPE cm_data_dictionary_ref IS REF CURSOR RETURN cm_data_dictionary_rec;

Entity cursor variable type


cm_data_dictionary_tab

TYPE cm_data_dictionary_tab IS TABLE OF cm_data_dictionary_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_table       gorcmdd.gorcmdd_table%TYPE DEFAULT NULL,
                  p_column_name gorcmdd.gorcmdd_column_name%TYPE,
                  p_rowid       VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.

Returns
Y if found, otherwise N


f_sys_req

FUNCTION f_sys_req(p_table       gorcmdd.gorcmdd_table%TYPE,
                   p_column_name gorcmdd.gorcmdd_column_name%TYPE,
                   p_rowid       VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a record is system required.

Parameters
p_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.

Returns
Y if found, otherwise N


f_get_element

FUNCTION f_get_element(p_column_name gorcmdd.gorcmdd_column_name%TYPE,
                       p_rowid       VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Retrieves element given a column name.

Parameters
p_column_name   Column name associated with element to be used by Common Matching Rules.

Returns
element if found


f_get_column

FUNCTION f_get_column(p_element gorcmdd.gorcmdd_element%TYPE,
                      p_rowid   VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Retrieves column given an element.

Parameters
p_element   Element name associated with column to be used by Common Matching Rules.

Returns
column if found


f_isequal

FUNCTION f_isequal(rec_one cm_data_dictionary_rec,
                   rec_two cm_data_dictionary_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. Defined as type cm_data_dictionary_rec.
rec_two   The second record to compare. Defined as type cm_data_dictionary_rec.

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


f_query_all

FUNCTION f_query_all(p_table           gorcmdd.gorcmdd_table%TYPE DEFAULT NULL,
                     p_column_name     gorcmdd.gorcmdd_column_name%TYPE DEFAULT NULL,
                     p_element_req_ind gorcmdd.gorcmdd_element_req_ind%TYPE DEFAULT NULL)
  RETURN cm_data_dictionary_ref

Selects all records for the entity.
This query uses all the key values to locate a record.

Parameters
p_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.
p_element_req_ind   Allows return of required or non-required elements.

Returns
A cursor variable that will fetch the set of records


f_query_one

FUNCTION f_query_one(p_column_name gorcmdd.gorcmdd_column_name%TYPE,
                     p_table       gorcmdd.gorcmdd_table%TYPE DEFAULT NULL)
  RETURN cm_data_dictionary_ref

Selects one record using key.
Always returns the current record for the table, column_name.

Parameters
p_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.

Returns
A cursor variable that will fetch exactly one record


f_query_by_rowid

FUNCTION f_query_by_rowid(p_rowid VARCHAR2) RETURN cm_data_dictionary_ref

Selects one record using ROWID.

Parameters
p_rowid   Database ROWID of record to select

Returns
A cursor variable that will fetch exactly one record


f_query_one_lock

FUNCTION f_query_one_lock(p_table       gorcmdd.gorcmdd_table%TYPE,
                          p_column_name gorcmdd.gorcmdd_column_name%TYPE,
                          p_rowid       VARCHAR2 DEFAULT NULL)
  RETURN cm_data_dictionary_ref

Selects one record and locks it for update.

Parameters
p_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.
p_rowid   Database ROWID of record to select

Returns
A cursor variable for one record, locking the record


p_create

PROCEDURE p_create(p_table                gorcmdd.gorcmdd_table%TYPE,
                   p_column_name          gorcmdd.gorcmdd_column_name%TYPE,
                   p_element              gorcmdd.gorcmdd_element%TYPE,
                   p_max_length           gorcmdd.gorcmdd_max_length%TYPE,
                   p_override_length_ind  gorcmdd.gorcmdd_override_length_ind%TYPE DEFAULT 'Y',
                   p_allow_neg_length_ind gorcmdd.gorcmdd_allow_neg_length_ind%TYPE DEFAULT 'N',
                   p_online_match_ind     gorcmdd.gorcmdd_online_match_ind%TYPE DEFAULT 'N',
                   p_sys_req_ind          gorcmdd.gorcmdd_sys_req_ind%TYPE DEFAULT 'N',
                   p_element_req_ind      gorcmdd.gorcmdd_element_req_ind%TYPE DEFAULT 'N',
                   p_user_id              gorcmdd.gorcmdd_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_data_origin          gorcmdd.gorcmdd_data_origin%TYPE DEFAULT NULL,
                   p_rowid_out            OUT VARCHAR2)

Creates a record.
 
A data element can be defined by associating the database table and column name.
The maximum length of the data should be defined as the column length. If the element is available for data entry from a form, the online indicator should be set to (Y)es.
If the number of characters to compare in the Common Matching process can be less than the length of the field, the override_length_ind should be set to (Y)es; if set to (N)o, the length of field will be used to compare in matching. The element_req_ind is set to (Y) for those elements that must beused in the Common Matching process.

Parameters
p_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.
p_element   Element to be used by Common Matching  Rules.
p_max_length   Maximum length of data for associated element.
p_override_length_ind   Indicator will denote whether to allow update to the number of characters being used in matching.
p_allow_neg_length_ind   Negative length indicator.
Y   Allows a negative length to be used for this data element, causing the character string to be compared for length specified starting from the last character.
N   Disallow negative length.

p_online_match_ind   Online match indicator
Y   Element is available for online Common Matching.
N   Element is not available for online Common Matching.

p_sys_req_ind   System required indicator
Y   Element is required data that was delivered by SCT and should not be removed or changed.
N   Element may be modified or removed.

p_element_req_ind   Element required indicator.
Y   Element is required data for all Common Matching rules.
N   Element is not required data for all Common Matching rules.

p_user_id   Oracle ID of the User who created or last updated the record.
p_data_origin   Application source for this database row.
p_rowid_out   Database ROWID of record created


p_delete

PROCEDURE p_delete(p_table       gorcmdd.gorcmdd_table%TYPE,
                   p_column_name gorcmdd.gorcmdd_column_name%TYPE,
                   p_rowid       VARCHAR2 DEFAULT NULL)

Deletes a record.
 
A Data Dictionary element may not be deleted if the sys_req_ind is (Y)es.
Data Dictionary elements with the sys_req_ind of (Y)es have been delivered by SCT and should not be removed.

Parameters
p_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.
p_rowid   Database ROWID of record to delete


p_lock

PROCEDURE p_lock(p_table       gorcmdd.gorcmdd_table%TYPE,
                 p_column_name gorcmdd.gorcmdd_column_name%TYPE,
                 p_rowid_inout IN OUT VARCHAR2)

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_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.
p_rowid_inout   Database ROWID of record to lock


p_update

PROCEDURE p_update(p_table                gorcmdd.gorcmdd_table%TYPE,
                   p_column_name          gorcmdd.gorcmdd_column_name%TYPE,
                   p_element              gorcmdd.gorcmdd_element%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_max_length           gorcmdd.gorcmdd_max_length%TYPE DEFAULT dml_common.f_unspecified_number,
                   p_override_length_ind  gorcmdd.gorcmdd_override_length_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_allow_neg_length_ind gorcmdd.gorcmdd_allow_neg_length_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_online_match_ind     gorcmdd.gorcmdd_online_match_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_sys_req_ind          gorcmdd.gorcmdd_sys_req_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_element_req_ind      gorcmdd.gorcmdd_element_req_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_user_id              gorcmdd.gorcmdd_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_data_origin          gorcmdd.gorcmdd_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid                VARCHAR2 DEFAULT NULL)

Updates a record.
 
A Data Dictionary element may not be updated if the sys-req_ind is (Y)es.
Data Dictionary elements with the sys_req_ind of (Y)es have been delivered by SCT and should not be changed.

Parameters
p_table   Database table associated with column name and element.
p_column_name   Column name associated with element to be used by Common Matching Rules.
p_element   Element to be used by Common Matching  Rules.
p_max_length   Maximum length of data for associated element.
p_override_length_ind   Indicator will denote whether to allow update to the number of characters being used in matching.
p_allow_neg_length_ind   Negative length indicator.
Y   Allows a negative length to be used for this data element, causing the character string to be compared for length specified starting from the last character.
N   Disallow negative length.

p_online_match_ind   Online match indicator
Y   Element is available for online Common Matching.
N   Element is not available for online Common Matching.

p_sys_req_ind   System required indicator
Y   Element is required data that was delivered by SCT and should not be removed or changed.
N   Element may be modified or removed.

p_element_req_ind   Element required indicator.
Y   Element is required data for all Common Matching rules.
N   Element is not required data for all Common Matching rules.

p_user_id   Oracle ID of the User who created or last updated the record.
p_data_origin   Application source for this database row.
p_rowid   Database ROWID of record to update