index

Package nb_ea_comments

This package provides the Common Business interface for an Electronic Approvals Comment.
 
The Electronic Approvals Comments API provides facility to enter and view multiple comments for EPAF transactions.


Program units
f_api_version   Returns the API version number.
f_exists   Checks to see if an Electronic Approvals Comment record exists.
f_isequal   Compares two Electronic Approvals Comments records for equality.
f_query_all   Selects all Electronic Approvals Comments records for the entity.
f_query_one   Selects one Electronic Approvals Comment record using key.
f_query_by_rowid   Selects one Electronic Approvals Comment record using ROWID.
f_query_one_lock   Selects one Electronic Approvals Comment record and locks it.
p_create   Creates an Electronic Approvals Comment record.
p_delete   Deletes an Electronic Approvals Comment record.
p_lock   Locks an Electronic Approvals Comment record.

Types
ea_comments_rec   Business Entity record type.
ea_comments_ref   Entity cursor variable type.
ea_comments_tab   Entity table type.

Constants
M_ENTITY_NAME   Business Entity Name.


M_ENTITY_NAME

M_ENTITY_NAME    CONSTANT VARCHAR2(11) := 'EA_COMMENTS';

Business Entity Name.


ea_comments_rec

TYPE ea_comments_rec IS RECORD (
  r_transaction_no          norcmnt.norcmnt_transaction_no%TYPE,
  r_seq_no                  norcmnt.norcmnt_seq_no%TYPE,
  r_comments                norcmnt.norcmnt_comments%TYPE,
  r_user_id                 norcmnt.norcmnt_user_id%TYPE,
  r_data_origin             norcmnt.norcmnt_data_origin%TYPE,
  r_internal_record_id      gb_common.internal_record_id_type);

Business Entity record type.


ea_comments_ref

TYPE ea_comments_ref IS REF CURSOR RETURN ea_comments_rec;

Entity cursor variable type.


ea_comments_tab

TYPE ea_comments_tab IS TABLE OF ea_comments_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_transaction_no norcmnt.norcmnt_transaction_no%TYPE,
                  p_seq_no         norcmnt.norcmnt_seq_no%TYPE,
                  p_rowid          gb_common.internal_record_id_type DEFAULT NULL)
  RETURN VARCHAR2

Checks to see if an Electronic Approvals Comment record exists.

Parameters
p_transaction_no   A number that is system generated for an approval transaction.  NUMBER(15) Required Key.
p_seq_no   Sequence number of the comment. NUMBER(6) 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 ea_comments_rec, rec_two ea_comments_rec)
  RETURN VARCHAR2

Compares two Electronic Approvals Comments 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 ea_comments_rec Required.
rec_two   The second record to compare. Type ea_comments_rec Required.

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


f_query_all

Function f_query_all(p_transaction_no norcmnt.norcmnt_transaction_no%TYPE,
                     p_seq_no         norcmnt.norcmnt_seq_no%TYPE DEFAULT NULL)
  RETURN ea_comments_ref

Selects all Electronic Approvals Comments records for the entity.

Parameters
p_transaction_no   A number that is system generated for an approval transaction.  NUMBER(15) Required Key.
p_seq_no   Sequence number of the comment. NUMBER(6) Required Key.

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


f_query_one

Function f_query_one(p_transaction_no norcmnt.norcmnt_transaction_no%TYPE,
                     p_seq_no         norcmnt.norcmnt_seq_no%TYPE)
  RETURN ea_comments_ref

Selects one Electronic Approvals Comment record using key.

Parameters
p_transaction_no   A number that is system generated for an approval transaction.  NUMBER(15) Required Key.
p_seq_no   Sequence number of the comment. NUMBER(6) 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 ea_comments_ref

Selects one Electronic Approvals Comment 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_transaction_no norcmnt.norcmnt_transaction_no%TYPE,
                          p_seq_no         norcmnt.norcmnt_seq_no%TYPE,
                          p_rowid          gb_common.internal_record_id_type DEFAULT NULL)
  RETURN ea_comments_ref

Selects one Electronic Approvals Comment record and locks it.

Parameters
p_transaction_no   A number that is system generated for an approval transaction.  NUMBER(15) Required Key.
p_seq_no   Sequence number of the comment. NUMBER(6) 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_transaction_no norcmnt.norcmnt_transaction_no%TYPE,
                   p_comments       norcmnt.norcmnt_comments%TYPE,
                   p_user_id        norcmnt.norcmnt_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_data_origin    norcmnt.norcmnt_data_origin%TYPE DEFAULT NULL,
                   p_seq_no_out     OUT norcmnt.norcmnt_seq_no%TYPE,
                   p_rowid_out      OUT gb_common.internal_record_id_type)

Creates an Electronic Approvals Comment record.

Parameters
p_transaction_no   A number that is system generated for an approval transaction.  NUMBER(15) Required Key.
p_comments   Comment made by the user id. VARCHAR2(4000) Required.
p_user_id   The Oracle ID of the user who changed the record. VARCHAR2(30).
p_data_origin   Source system that created or updated the row. VARCHAR2(30).
p_seq_no_out   Sequence number of the comment to be created. NUMBER(6) Required Key.
p_rowid_out   Database ROWID of the record to be created. VARCHAR2(18) Required.


p_delete

Procedure p_delete(p_transaction_no norcmnt.norcmnt_transaction_no%TYPE,
                   p_seq_no         norcmnt.norcmnt_seq_no%TYPE,
                   p_rowid          gb_common.internal_record_id_type DEFAULT NULL)

Deletes an Electronic Approvals Comment record.

Parameters
p_transaction_no   A number that is system generated for an approval transaction.  NUMBER(15) Required Key.
p_seq_no   Sequence number of the comment. NUMBER(6) Required Key.
p_rowid   Database ROWID of the record to be deleted. VARCHAR2(18).


p_lock

Procedure p_lock(p_transaction_no norcmnt.norcmnt_transaction_no%TYPE,
                 p_seq_no         norcmnt.norcmnt_seq_no%TYPE,
                 p_rowid_inout    IN OUT gb_common.internal_record_id_type)

Locks an Electronic Approvals Comment 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_transaction_no   A number that is system generated for an approval transaction.  NUMBER(15) Required Key.
p_seq_no   Sequence number of the comment. NUMBER(6) Required Key.
p_rowid_inout   Database ROWID of the record to be locked. VARCHAR2(18) Required.