index

Package gb_telephone_rules

Provides the messaging support and field validation for the TELEPHONE API (gb_telephone).
 
The validation procedure is called by the API, but may be called directly by an application if data validation is needed prior to calling the API.
The API will always run the validation checks regardless.


Program units
p_register_entity   Registers the attribute/value pairs to the message cache.
p_register_entity  
p_validate   Validates all the data in the record.


p_register_entity

PROCEDURE p_register_entity(p_operation_type     NUMBER,
                            p_internal_record_id gb_common.internal_record_id_type)

Registers the attribute/value pairs to the message cache.
This signature uses the ROWID only, for the delete operations.

Parameters
p_internal_record_id   Database ROWID VARCHAR2(18)


p_register_entity

PROCEDURE p_register_entity(p_operation_type     NUMBER,
                            p_pidm               sprtele.sprtele_pidm%TYPE,
                            p_seqno              sprtele.sprtele_seqno%TYPE,
                            p_tele_code          sprtele.sprtele_tele_code%TYPE,
                            p_phone_area         sprtele.sprtele_phone_area%TYPE,
                            p_phone_number       sprtele.sprtele_phone_number%TYPE,
                            p_phone_ext          sprtele.sprtele_phone_ext%TYPE,
                            p_status_ind         sprtele.sprtele_status_ind%TYPE,
                            p_atyp_code          sprtele.sprtele_atyp_code%TYPE,
                            p_addr_seqno         sprtele.sprtele_addr_seqno%TYPE,
                            p_primary_ind        sprtele.sprtele_primary_ind%TYPE,
                            p_unlist_ind         sprtele.sprtele_unlist_ind%TYPE,
                            p_comment            sprtele.sprtele_comment%TYPE,
                            p_intl_access        sprtele.sprtele_intl_access%TYPE,
                            p_data_origin        sprtele.sprtele_data_origin%TYPE,
                            p_user_id            sprtele.sprtele_user_id%TYPE DEFAULT gb_common.f_sct_user,
                            p_ctry_code_phone    sprtele.sprtele_ctry_code_phone%TYPE, -- 82-1
                            p_internal_record_id gb_common.internal_record_id_type)


p_validate

PROCEDURE p_validate(p_pidm            sprtele.sprtele_pidm%TYPE,
                     p_seqno           sprtele.sprtele_seqno%TYPE,
                     p_tele_code       sprtele.sprtele_tele_code%TYPE,
                     p_phone_area      sprtele.sprtele_phone_area%TYPE DEFAULT NULL,
                     p_phone_number    sprtele.sprtele_phone_number%TYPE DEFAULT NULL,
                     p_phone_ext       sprtele.sprtele_phone_ext%TYPE DEFAULT NULL,
                     p_status_ind      sprtele.sprtele_status_ind%TYPE DEFAULT NULL,
                     p_atyp_code       sprtele.sprtele_atyp_code%TYPE DEFAULT NULL,
                     p_addr_seqno      sprtele.sprtele_addr_seqno%TYPE DEFAULT NULL,
                     p_primary_ind     sprtele.sprtele_primary_ind%TYPE DEFAULT NULL,
                     p_unlist_ind      sprtele.sprtele_unlist_ind%TYPE DEFAULT NULL,
                     p_comment         sprtele.sprtele_comment%TYPE DEFAULT NULL,
                     p_intl_access     sprtele.sprtele_intl_access%TYPE DEFAULT NULL,
                     p_data_origin     sprtele.sprtele_data_origin%TYPE DEFAULT NULL,
                     p_user_id         sprtele.sprtele_user_id%TYPE DEFAULT gb_common.f_sct_user,
                     p_ctry_code_phone sprtele.sprtele_ctry_code_phone%TYPE DEFAULT NULL, -- 82-1
                     p_rowid           gb_common.internal_record_id_type DEFAULT NULL)

Validates all the data in the record.

Parameters
p_pidm   Internal identification number. NUMBER(8) Required Key
p_seqno   Unique sequence number for telephone numbers associated with PIDM. NUMBER(3) Required Key
p_tele_code   Telelphone Type Code. VARCHAR2(4) Required Key
p_phone_area   Telephone number area code. VARCHAR2(3)
p_phone_number   Telephone number. VARCHAR2(7)
p_phone_ext   Telephone number extension. VARCHAR2(4)
p_status_ind   Status of telelphone number, active or inactive. VARCHAR2(1)
NULL   Active
I   Inactive

p_atyp_code   Optional Address Type code associated with telephone number. VARCHAR2(2)
p_addr_seqno   Address type sequence number associated with address type. NUMBER(2)
p_primary_ind   Primary indicator to denote primary the telephone numbers based on telephone types. VARCHAR2(1)
Y   The number is the primary number.
Null   The number is a secondary number.

p_unlist_ind   Unlisted telephone number indicator. VARCHAR2(1)
Y   The number is the unlisted.
Null   The number is listed.

p_comment   Comment relating to . VARCHAR2(60)
p_intl_access   Free-format International access code for the telephone number including the country and city codes. VARCHAR2(16)
p_data_origin   Source system that generated the data. VARCHAR2(30)
p_user_id   Oracle User who inserted or last update the data. VARCHAR2(30)
p_ctry_code_phone   Country code for telephone. VARCHAR2(4)
p_rowid   Database ROWID of the record to be validated. VARCHAR2(18) When the record is checked to make sure that there is no other primary record for this Address Type and Sequnce number, p_rowid is used to make sure it actually locates a different row than the one being updated. If p_rowid is null, it is assumed to be called from a create operation, and is ignored. It is only required because a Key field, tele_code, is updatable.