index

Package px_mass_roe

This package provides the common business interface for the Canadian Mass Record of Employment API (PX_MASS_ROE).


Program units
f_api_version   Returns the API version number.
f_exists   Checks if a record exists.
f_valid_empr_code   Checks if a valid employer code record exists.
f_pict_code_exists   Checks if a record exists.
f_empr_code_exists   Checks if a record exists.
f_roec_code_exists   Checks if a record exists.
f_employee_exists   Checks if a record exists.
f_employee_deceased   Checks if a record exists.
f_job_exists   Checks if a Job exists 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
mass_roe_rec   Business Entity record type
mass_roe_ref   Entity cursor variable type
mass_roe_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(8) := 'MASS_ROE';

Business Entity Name


M_BASE_TABLE_NAME

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

Base table name


mass_roe_rec

TYPE mass_roe_rec IS RECORD (
  r_pidm                    pxrmroe.pxrmroe_pidm%TYPE,
  r_pict_code               pxrmroe.pxrmroe_pict_code%TYPE,
  r_empr_code               pxrmroe.pxrmroe_empr_code%TYPE,
  r_language_ind            pxrmroe.pxrmroe_language_ind%TYPE,
  r_roec_code               pxrmroe.pxrmroe_roec_code%TYPE,
  r_first_day_worked        pxrmroe.pxrmroe_first_day_worked%TYPE,
  r_last_day_worked         pxrmroe.pxrmroe_last_day_worked%TYPE,
  r_user_id                 pxrmroe.pxrmroe_user_id%TYPE,
  r_recall_ind              pxrmroe.pxrmroe_recall_ind%TYPE,
  r_recall_date             pxrmroe.pxrmroe_recall_date%TYPE,
  r_data_origin             pxrmroe.pxrmroe_data_origin%TYPE,
  r_internal_record_id      gb_common.internal_record_id_type);

Business Entity record type


mass_roe_ref

TYPE mass_roe_ref IS REF CURSOR RETURN mass_roe_rec;

Entity cursor variable type


mass_roe_tab

TYPE mass_roe_tab IS TABLE OF mass_roe_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_pidm      pxrmroe.pxrmroe_pidm%TYPE,
                  p_pict_code pxrmroe.pxrmroe_pict_code%TYPE,
                  p_empr_code pxrmroe.pxrmroe_empr_code%TYPE,
                  p_rowid     gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks if a record exists.

Parameters
p_pidm   Internal Identification Number. NUMBER(8) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key
p_empr_code   Employer Code. VARCHAR2(4) Required Key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
Y if found, otherwise N.


f_valid_empr_code

Function f_valid_empr_code(p_pidm      pxrroec.pxrroec_pidm%TYPE,
                           p_empr_code pxrroec.pxrroec_empr_code%TYPE,
                           p_pict_code pxrroec.pxrroec_pict_code%TYPE)
  RETURN VARCHAR2

Checks if a valid employer code record exists.

Parameters
p_pidm   Employee Identification Number. NUMBER(8) Required Key
p_empr_code   Employer Code. VARCHAR2(4) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key

Returns
Y if found, otherwise N.


f_pict_code_exists

Function f_pict_code_exists(p_code  ptrpict.ptrpict_code%TYPE,
                            p_rowid gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks if a record exists.

Parameters
p_code   Payroll ID. VARCHAR2(2) Required Key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
Y if found, otherwise N.


f_empr_code_exists

Function f_empr_code_exists(p_code  ptrempr.ptrempr_code%TYPE,
                            p_rowid gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks if a record exists.

Parameters
p_code   Employer code. VARCHAR2(4) Required Key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
Y if found, otherwise N.


f_roec_code_exists

Function f_roec_code_exists(p_code  ptvroer.ptvroer_code%TYPE,
                            p_rowid gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks if a record exists.

Parameters
p_code   Reason for employer issuing this ROE. VARCHAR2(3) Required Key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
Y if found, otherwise N.


f_employee_exists

Function f_employee_exists(p_pidm pebempl.pebempl_pidm%TYPE)
  RETURN VARCHAR2

Checks if a record exists.

Parameters
p_pidm   Person Identification. NUMBER(8) Required Key

Returns
Y if found, otherwise N.


f_employee_deceased

Function f_employee_deceased(p_pidm spbpers.spbpers_pidm%TYPE)
  RETURN VARCHAR2

Checks if a record exists.

Parameters
p_pidm   Person Identification. NUMBER(8) Required Key

Returns
Y if found, otherwise N.


f_job_exists

Function f_job_exists(p_pidm      nbrjobs.nbrjobs_pidm%TYPE,
                      p_pict_code nbrjobs.nbrjobs_pict_code%TYPE)
  RETURN VARCHAR2

Checks if a Job exists exists.

Parameters
p_pidm   Person Identification. NUMBER(8) Required Key
p_pict_code   Employer ID. VARCHAR2(2) Required Key

Returns
Y if found, otherwise N.


f_isequal

Function f_isequal(rec_one mass_roe_rec, rec_two mass_roe_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 mass_roe_rec Required
rec_two   The second record to compare. Type mass_roe_rec Required

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


f_query_all

Function f_query_all(p_pidm      pxrmroe.pxrmroe_pidm%TYPE,
                     p_pict_code pxrmroe.pxrmroe_pict_code%TYPE,
                     p_empr_code pxrmroe.pxrmroe_empr_code%TYPE)
  RETURN mass_roe_ref

Selects all records for the entity.

Parameters
p_pidm   Internal Identification Number. NUMBER(8) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key
p_empr_code   Employer Code. VARCHAR2(4) Required Key

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


f_query_one

Function f_query_one(p_pidm      pxrmroe.pxrmroe_pidm%TYPE,
                     p_pict_code pxrmroe.pxrmroe_pict_code%TYPE,
                     p_empr_code pxrmroe.pxrmroe_empr_code%TYPE)
  RETURN mass_roe_ref

Selects one record using key.

Parameters
p_pidm   Internal Identification Number. NUMBER(8) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key
p_empr_code   Employer Code. VARCHAR2(4) 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 mass_roe_ref

Selects one record using 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_pidm      pxrmroe.pxrmroe_pidm%TYPE,
                          p_pict_code pxrmroe.pxrmroe_pict_code%TYPE,
                          p_empr_code pxrmroe.pxrmroe_empr_code%TYPE,
                          p_rowid     gb_common.internal_record_id_type DEFAULT NULL)
  RETURN mass_roe_ref

Selects one record and locks it.

Parameters
p_pidm   Internal Identification Number. NUMBER(8) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key
p_empr_code   Employer Code. VARCHAR2(4) 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_pidm             pxrmroe.pxrmroe_pidm%TYPE,
                   p_pict_code        pxrmroe.pxrmroe_pict_code%TYPE,
                   p_empr_code        pxrmroe.pxrmroe_empr_code%TYPE,
                   p_language_ind     pxrmroe.pxrmroe_language_ind%TYPE,
                   p_roec_code        pxrmroe.pxrmroe_roec_code%TYPE,
                   p_first_day_worked pxrmroe.pxrmroe_first_day_worked%TYPE,
                   p_last_day_worked  pxrmroe.pxrmroe_last_day_worked%TYPE,
                   p_user_id          pxrmroe.pxrmroe_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_recall_ind       pxrmroe.pxrmroe_recall_ind%TYPE DEFAULT NULL,
                   p_recall_date      pxrmroe.pxrmroe_recall_date%TYPE DEFAULT NULL,
                   p_data_origin      pxrmroe.pxrmroe_data_origin%TYPE DEFAULT NULL,
                   p_rowid_out        OUT gb_common.internal_record_id_type)

Creates a record.

Parameters
p_pidm   Internal Identification Number. NUMBER(8) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key
p_empr_code   Employer Code. VARCHAR2(4) Required Key
p_language_ind   E - English; F - French;. VARCHAR2(1) Required
p_roec_code   Reason of the employer issuing this ROE. VARCHAR2(3) Required
p_first_day_worked   Employee first worked date. DATE Required
p_last_day_worked   Employee last worked date. DATE Required
p_user_id   User that created or updated the record. VARCHAR2(30) Required
p_recall_ind   The employee will return to active employment indicator. VARCHAR2(1)
p_recall_date   The expected date of the employee return to active employment. DATE
p_data_origin   Source system that created or updated the row. VARCHAR2(30)
p_rowid_out   Database ROWID of the record to be created. VARCHAR2(18) Required


p_delete

Procedure p_delete(p_pidm      pxrmroe.pxrmroe_pidm%TYPE,
                   p_pict_code pxrmroe.pxrmroe_pict_code%TYPE,
                   p_empr_code pxrmroe.pxrmroe_empr_code%TYPE,
                   p_user_id   pxrmroe.pxrmroe_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_rowid     gb_common.internal_record_id_type DEFAULT NULL)

Deletes a record.

Parameters
p_pidm   Internal Identification Number. NUMBER(8) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key
p_empr_code   Employer Code. VARCHAR2(4) Required Key
p_user_id   User that created or updated the record. VARCHAR2(30) Required
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18)


p_lock

Procedure p_lock(p_pidm        pxrmroe.pxrmroe_pidm%TYPE,
                 p_pict_code   pxrmroe.pxrmroe_pict_code%TYPE,
                 p_empr_code   pxrmroe.pxrmroe_empr_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_pidm   Internal Identification Number. NUMBER(8) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key
p_empr_code   Employer Code. VARCHAR2(4) Required Key
p_rowid_inout   Database ROWID of the record to be locked. VARCHAR2(18) Required


p_update

Procedure p_update(p_pidm             pxrmroe.pxrmroe_pidm%TYPE,
                   p_pict_code        pxrmroe.pxrmroe_pict_code%TYPE,
                   p_empr_code        pxrmroe.pxrmroe_empr_code%TYPE,
                   p_language_ind     pxrmroe.pxrmroe_language_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_roec_code        pxrmroe.pxrmroe_roec_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_first_day_worked pxrmroe.pxrmroe_first_day_worked%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_last_day_worked  pxrmroe.pxrmroe_last_day_worked%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_user_id          pxrmroe.pxrmroe_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_recall_ind       pxrmroe.pxrmroe_recall_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_recall_date      pxrmroe.pxrmroe_recall_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_data_origin      pxrmroe.pxrmroe_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_rowid            gb_common.internal_record_id_type DEFAULT NULL)

Updates a record.

Parameters
p_pidm   Internal Identification Number. NUMBER(8) Required Key
p_pict_code   Payroll ID. VARCHAR2(2) Required Key
p_empr_code   Employer Code. VARCHAR2(4) Required Key
p_language_ind   E - English; F - French;. VARCHAR2(1) Required
p_roec_code   Reason of the employer issuing this ROE. VARCHAR2(3) Required
p_first_day_worked   Employee first worked date. DATE Required
p_last_day_worked   Employee last worked date. DATE Required
p_user_id   User that created or updated the record. VARCHAR2(30) Required
p_recall_ind   The employee will return to active employment indicator. VARCHAR2(1)
p_recall_date   The expected date of the employee return to active employment. DATE
p_data_origin   Source system that created or updated the row. VARCHAR2(30)
p_rowid   Database ROWID of the record to be updated. VARCHAR2(18)