index

Package gb_cm_user_procedure

This package provides the Common Business interface for Common Matching User Procedure.
 
The Common Matching User Procedure will associate packaged procedures that include data elements from product specific tables, such as the High School table, SORHSCH, to be used by the Common Matching procedure.  When the Common Matching procedure is executed, the User Procedures associated with the Common Matching Source Code and Priority Number will automatically be included. A sequence number must be defined as part of the User Procedures to determine the order the User procedures should be executed.


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 key.
f_query_by_rowid   Selects one record using 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
cm_user_procedure_rec   Entity record type
cm_user_procedure_ref   Entity cursor variable type
cm_user_procedure_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity name


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(17) := 'CM_USER_PROCEDURE';

Business Entity name


cm_user_procedure_rec

TYPE cm_user_procedure_rec IS RECORD (
   r_cmsc_code               gorcmup.gorcmup_cmsc_code%TYPE,
   r_priority_no             gorcmup.gorcmup_priority_no%TYPE,
   r_seq_no                  gorcmup.gorcmup_seq_no%TYPE,
   r_procedure_name          gorcmup.gorcmup_procedure_name%TYPE,
   r_user_id                 gorcmup.gorcmup_user_id%TYPE,
   r_data_origin             gorcmup.gorcmup_data_origin%TYPE,
   r_internal_record_id      gb_common.internal_record_id_type);

Entity record type


cm_user_procedure_ref

TYPE cm_user_procedure_ref IS REF CURSOR RETURN cm_user_procedure_rec;

Entity cursor variable type


cm_user_procedure_tab

TYPE cm_user_procedure_tab IS TABLE OF cm_user_procedure_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_cmsc_code   gorcmup.gorcmup_cmsc_code%TYPE,
                  p_priority_no gorcmup.gorcmup_priority_no%TYPE DEFAULT NULL,
                  p_seq_no      gorcmup.gorcmup_seq_no%TYPE DEFAULT NULL,
                  p_rowid       VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a record exists.

Parameters
p_cmsc_code   Common Matching Source Code associated with user procedure.
p_priority_no   Priority number associated with the user procedure. If NULL is passed in then any value will be matched.
p_seq_no   The order in which to execute the user procedure. If NULL is passed in then any value will be matched.

Returns
Y if found, otherwise N


f_isequal

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

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


f_query_all

FUNCTION f_query_all(p_cmsc_code   gorcmup.gorcmup_cmsc_code%TYPE,
                     p_priority_no gorcmup.gorcmup_priority_no%TYPE)
  RETURN cm_user_procedure_ref

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

Parameters
p_cmsc_code   Common Matching Source Code associated with user procedure.
p_priority_no   Priority number associated with the user procedure.

Returns
A cursor variable that will fetch the set of records


f_query_one

FUNCTION f_query_one(p_cmsc_code   gorcmup.gorcmup_cmsc_code%TYPE,
                     p_priority_no gorcmup.gorcmup_priority_no%TYPE,
                     p_seq_no      gorcmup.gorcmup_seq_no%TYPE)
  RETURN cm_user_procedure_ref

Selects one record using key.
Always returns the current record for the source code, priority number, sequence number.

Parameters
p_cmsc_code   Common Matching Source Code associated with user procedure.
p_priority_no   Priority number associated with the user procedure.
p_seq_no   The order in which to execute the user procedure.

Returns
A cursor variable that will fetch exactly one record


f_query_by_rowid

FUNCTION f_query_by_rowid(p_rowid VARCHAR2) RETURN cm_user_procedure_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_cmsc_code   gorcmup.gorcmup_cmsc_code%TYPE,
                          p_priority_no gorcmup.gorcmup_priority_no%TYPE,
                          p_seq_no      gorcmup.gorcmup_seq_no%TYPE,
                          p_rowid       VARCHAR2 DEFAULT NULL)
  RETURN cm_user_procedure_ref

Selects one record and locks it.

Parameters
p_cmsc_code   Common Matching Source Code associated with user procedure.
p_priority_no   Priority number associated with the user procedure.
p_seq_no   The order in which to execute the user procedure.
p_rowid   Database ROWID of record to select

Returns
A cursor variable for one record, locking the record


p_create

PROCEDURE p_create(p_cmsc_code      gorcmup.gorcmup_cmsc_code%TYPE,
                   p_priority_no    gorcmup.gorcmup_priority_no%TYPE,
                   p_seq_no         gorcmup.gorcmup_seq_no%TYPE,
                   p_procedure_name gorcmup.gorcmup_procedure_name%TYPE,
                   p_user_id        gorcmup.gorcmup_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_data_origin    gorcmup.gorcmup_data_origin%TYPE DEFAULT NULL,
                   p_rowid_out      OUT VARCHAR2)

Creates a record.
 
Creates the association of the User Procedures to be included in the Common Matching procedure for the Common Matching Source code and Priority Number.

Parameters
p_cmsc_code   Common Matching Source Code associated with user procedure.
p_priority_no   Priority number associated with the user procedure.
p_seq_no   The order in which to execute the user procedure.
p_procedure_name   Procedure name associated with rules to be used for Common Matching.
p_user_id   Oracle user 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_cmsc_code   gorcmup.gorcmup_cmsc_code%TYPE,
                   p_priority_no gorcmup.gorcmup_priority_no%TYPE,
                   p_seq_no      gorcmup.gorcmup_seq_no%TYPE,
                   p_rowid       VARCHAR2 DEFAULT NULL)

Deletes a record.
The User Procedure associated with the Common Matching Source Code and Priority Number will be removed.

Parameters
p_cmsc_code   Common Matching Source Code associated with user procedure.
p_priority_no   Priority number associated with the user procedure.
p_seq_no   The order in which to execute the user procedure.
p_rowid   Database ROWID of record to delete


p_lock

PROCEDURE p_lock(p_cmsc_code   gorcmup.gorcmup_cmsc_code%TYPE,
                 p_priority_no gorcmup.gorcmup_priority_no%TYPE,
                 p_seq_no      gorcmup.gorcmup_seq_no%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_cmsc_code   Common Matching Source Code associated with user procedure.
p_priority_no   Priority number associated with the user procedure.
p_seq_no   The order in which to execute the user procedure.
p_rowid_inout   Database ROWID of record to lock


p_update

PROCEDURE p_update(p_cmsc_code      gorcmup.gorcmup_cmsc_code%TYPE,
                   p_priority_no    gorcmup.gorcmup_priority_no%TYPE,
                   p_seq_no         gorcmup.gorcmup_seq_no%TYPE,
                   p_procedure_name gorcmup.gorcmup_procedure_name%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_user_id        gorcmup.gorcmup_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_data_origin    gorcmup.gorcmup_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid          VARCHAR2 DEFAULT NULL)

Updates a record.
Updates the User Procedure associated with the Common Matching Source Code and Priority Number.

Parameters
p_cmsc_code   Common Matching Source Code associated with user procedure.
p_priority_no   Priority number associated with the user procedure.
p_seq_no   The order in which to execute the user procedure.
p_procedure_name   Procedure name assicated with rules to be used for Common Matching.
p_user_id   Oracle user 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