index

Package gb_telephone

Common Business interface for the TELEPHONE API (gb_telephone).


Program units
f_api_version   Returns the API version number.
f_exists   Checks to see if a telephone record exists.
f_isequal   Compares two records for equality.
f_query_all   Selects all telephone records for the person.
f_query_one   Selects one record using the key.
f_query_by_rowid   Selects one record using ROWID.
f_query_one_lock   Selects one record and locks it.
p_create   Creates a telephone record.
p_delete   Deletes a telephone record.
p_lock   Locks a record.
p_update   Updates a record.

Types
telephone_rec   Business Entity record type
telephone_ref   Entity cursor variable type
telephone_tab   Entity table type

Constants
M_ENTITY_NAME   Business Entity name


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(9) := 'TELEPHONE';

Business Entity name


telephone_rec

TYPE telephone_rec IS RECORD (
  r_pidm                    sprtele.sprtele_pidm%TYPE,
  r_seqno                   sprtele.sprtele_seqno%TYPE,
  r_tele_code               sprtele.sprtele_tele_code%TYPE,
  r_phone_area              sprtele.sprtele_phone_area%TYPE,
  r_phone_number            sprtele.sprtele_phone_number%TYPE,
  r_phone_ext               sprtele.sprtele_phone_ext%TYPE,
  r_status_ind              sprtele.sprtele_status_ind%TYPE,
  r_atyp_code               sprtele.sprtele_atyp_code%TYPE,
  r_addr_seqno              sprtele.sprtele_addr_seqno%TYPE,
  r_primary_ind             sprtele.sprtele_primary_ind%TYPE,
  r_unlist_ind              sprtele.sprtele_unlist_ind%TYPE,
  r_comment                 sprtele.sprtele_comment%TYPE,
  r_intl_access             sprtele.sprtele_intl_access%TYPE,
  r_data_origin             sprtele.sprtele_data_origin%TYPE,
  r_user_id                 sprtele.sprtele_user_id%TYPE,
  r_ctry_code_phone         sprtele.sprtele_ctry_code_phone%TYPE,         
  r_internal_record_id      gb_common.internal_record_id_type);

Business Entity record type


telephone_ref

TYPE telephone_ref IS REF CURSOR RETURN telephone_rec;

Entity cursor variable type


telephone_tab

TYPE telephone_tab IS TABLE OF telephone_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      sprtele.sprtele_pidm%TYPE,
                  p_tele_code sprtele.sprtele_tele_code%TYPE,
                  p_seqno     sprtele.sprtele_seqno%TYPE,
                  p_rowid     gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks to see if a telephone record exists.

Parameters
p_pidm   Internal identification number of the person. NUMBER(8) Required Key
p_tele_code   Telephone Type Code. VARCHAR2(4) Required Key
p_seqno   Unique sequence number for telephone numbers associated with the person. NUMBER(3) 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 telephone_rec,
                   rec_two telephone_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 telephone_rec Required
rec_two   The second record to compare. Type telephone_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      sprtele.sprtele_pidm%TYPE,
                     p_tele_code sprtele.sprtele_tele_code%TYPE DEFAULT NULL,
                     p_seqno     sprtele.sprtele_seqno%TYPE DEFAULT NULL)
  RETURN telephone_ref

Selects all telephone records for the person.

Parameters
p_pidm   Internal identification number of the person. NUMBER(8) Required Key
p_tele_code   Telelphone Type Code. VARCHAR2(4) Required Key
p_seqno   Unique sequence number for telephone numbers associated with the person. NUMBER(3) Required Key

Returns
A cursor variable that will fetch the set of telephone records.


f_query_one

FUNCTION f_query_one(p_pidm      sprtele.sprtele_pidm%TYPE,
                     p_tele_code sprtele.sprtele_tele_code%TYPE,
                     p_seqno     sprtele.sprtele_seqno%TYPE)
  RETURN telephone_ref

Selects one record using the key.

Parameters
p_pidm   Internal identification number of the person. NUMBER(8) Required Key
p_tele_code   Telephone Type Code. VARCHAR2(4) Required Key
p_seqno   Unique sequence number for telephone numbers associated with the person. NUMBER(3) 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 telephone_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      sprtele.sprtele_pidm%TYPE,
                          p_tele_code sprtele.sprtele_tele_code%TYPE,
                          p_seqno     sprtele.sprtele_seqno%TYPE,
                          p_rowid     gb_common.internal_record_id_type DEFAULT NULL)
  RETURN telephone_ref

Selects one record and locks it.

Parameters
p_pidm   Internal identification number of the person. NUMBER(8) Required Key
p_tele_code   Telephone Type Code. VARCHAR2(4) Required Key
p_seqno   Unique sequence number for telephone numbers associated with the person. NUMBER(3) Required Key
p_rowid   Database ROWID of the record to be selected. VARCHAR2(18)

Returns
A cursor variable for one telephone record, locking the record.


p_create

PROCEDURE p_create(p_pidm            sprtele.sprtele_pidm%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_seqno_out       OUT sprtele.sprtele_seqno%TYPE,
                   p_rowid_out       OUT gb_common.internal_record_id_type)

Creates a telephone record.

Parameters
p_pidm   Internal identification number of the person. NUMBER(8) Required Key
p_tele_code   Telephone 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 Telephone number. VARCHAR2(1)
NULL   Active
I   Inactive

p_atyp_code   Address Type code associated with the telephone number. VARCHAR2(2)
p_addr_seqno   Sequence number associated with the address. NUMBER(2)
p_primary_ind   Specifies if the telephone number is the primary telephone number, based on telephone types. VARCHAR2(1)
Y   The number is the primary number.
Null   The number is a secondary number.

p_unlist_ind   Specifies if the telephone number is unlisted. VARCHAR2(1)
Y   The number is the unlisted.
Null   The number is listed.

p_comment   Comments relating to the telephone number. VARCHAR2(60)
p_intl_access   Free-format International access code for the the telephone number including the country and city codes. VARCHAR2(16)
p_data_origin   Source system that created or updated the row. 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_seqno_out   Generated unique sequence number for telephone numbers associated with the person. NUMBER(3) Required Key
p_rowid_out   Database ROWID of the record to be created. VARCHAR2(18) Required


p_delete

PROCEDURE p_delete(p_pidm      sprtele.sprtele_pidm%TYPE,
                   p_tele_code sprtele.sprtele_tele_code%TYPE,
                   p_seqno     sprtele.sprtele_seqno%TYPE,
                   p_rowid     gb_common.internal_record_id_type DEFAULT NULL)

Deletes a telephone record.

Parameters
p_pidm   Internal identification number of the person. NUMBER(8) Required Key
p_tele_code   Telephone Type Code. VARCHAR2(4) Required Key
p_seqno   Unique sequence number for telephone numbers associated with the person. NUMBER(3) Required Key
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18)


p_lock

PROCEDURE p_lock(p_pidm        sprtele.sprtele_pidm%TYPE,
                 p_tele_code   sprtele.sprtele_tele_code%TYPE,
                 p_seqno       sprtele.sprtele_seqno%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 of the person. NUMBER(8) Required Key
p_tele_code   Telephone Type Code. VARCHAR2(4) Required Key
p_seqno   Unique sequence number for telephone numbers associated with the person. NUMBER(3) Required Key
p_rowid_inout   Database ROWID of record to lock. VARCHAR2(18) Required


p_update

PROCEDURE p_update(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 dml_common.f_unspecified_string,
                   p_phone_number    sprtele.sprtele_phone_number%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_phone_ext       sprtele.sprtele_phone_ext%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_status_ind      sprtele.sprtele_status_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_atyp_code       sprtele.sprtele_atyp_code%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_addr_seqno      sprtele.sprtele_addr_seqno%TYPE DEFAULT dml_common.f_unspecified_number,
                   p_primary_ind     sprtele.sprtele_primary_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_unlist_ind      sprtele.sprtele_unlist_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_comment         sprtele.sprtele_comment%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_intl_access     sprtele.sprtele_intl_access%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_data_origin     sprtele.sprtele_data_origin%TYPE DEFAULT dml_common.f_unspecified_string,
                   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 dml_common.f_unspecified_string, -- 82-1
                   p_rowid           gb_common.internal_record_id_type DEFAULT NULL)

Updates a record.

Parameters
p_pidm   Internal identification number of the person. NUMBER(8) Required Key
p_seqno   Unique sequence number for telephone numbers associated with the person. NUMBER(3) Required Key
p_tele_code   Telephone 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 Telephone number. VARCHAR2(1)
NULL   Active
I   Inactive

p_atyp_code   Address Type code associated with telephone number. VARCHAR2(2)
p_addr_seqno   Sequence number associated with the address. NUMBER(2)
p_primary_ind   Specifies if the telephone number is the primary telephone number, based on telephone types. VARCHAR2(1)
Y   The number is the primary number.
Null   The number is a secondary number.

p_unlist_ind   Specifies if the telephone number is unlisted. VARCHAR2(1)
Y   The number is the unlisted.
Null   The number is listed.

p_comment   Comments relating to telephone number. 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 created or updated the row. 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 updated. VARCHAR2(18)