index

Package gb_group_rules

This package provides the Common Business interface for the GROUP RULES API, gb_group_rules.
 
It supports the FGAC VBS Group Rules Attributes Table (GOBFGAC).
 
FGAC VBS Group Rules Attributes define the Active and Effective Date characteristics for FGAC VBS group rules.  Inactive rules ('N') are not included in FGAC processing.  Active rules ('Y') with a date greater than or equal to the Effective Date are included in FGAC processing.
To deactivate a rule set the Active indicator to 'N'.  The Group Rules attributes are applied to one or more domain/predicate combinations (stored in the GORFPRD table) associated with the Group Rule.


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

Types
group_rules_rec   Entity record type.
group_rules_ref   Entity cursor variable type.
group_rules_tab   Entity table type.

Constants
M_ENTITY_NAME   Business Entity name.


M_ENTITY_NAME

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

Business Entity name.


group_rules_rec

TYPE group_rules_rec IS RECORD (
   r_fgac_code               gobfgac.gobfgac_fgac_code%TYPE,
   r_active_ind              gobfgac.gobfgac_active_ind%TYPE,
   r_eff_date                gobfgac.gobfgac_eff_date%TYPE,
   r_user_id                 gobfgac.gobfgac_user_id%TYPE,
   r_internal_record_id      gb_common.internal_record_id_type);

Entity record type.


group_rules_ref

TYPE group_rules_ref IS REF CURSOR RETURN group_rules_rec;

Entity cursor variable type.


group_rules_tab

TYPE group_rules_tab IS TABLE OF group_rules_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. It changes only when the signature changes.


f_exists

FUNCTION f_exists(p_fgac_code gobfgac.gobfgac_fgac_code%TYPE,
                  p_rowid     VARCHAR2 DEFAULT NULL) RETURN VARCHAR2

Checks to see if a group rules record exists.

Parameters
p_fgac_code   FGAC group code.  Required.

Returns
Y if found, otherwise N.


f_isequal

FUNCTION f_isequal(rec_one group_rules_rec,
                   rec_two group_rules_rec) RETURN VARCHAR2

Compares two records for equality.

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


f_query_all

FUNCTION f_query_all(p_fgac_code gobfgac.gobfgac_fgac_code%TYPE)
  RETURN group_rules_ref

Selects all the group rules records for the entity.

Parameters
p_fgac_code   FGAC group code.  Required.

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


f_query_one

FUNCTION f_query_one(p_fgac_code gobfgac.gobfgac_fgac_code%TYPE)
  RETURN group_rules_ref

Selects one group rules record using the key.

Parameters
p_fgac_code   FGAC group code.  Required.

Returns
A cursor variable that will fetch exactly one record.


f_query_by_rowid

FUNCTION f_query_by_rowid(p_rowid VARCHAR2) RETURN group_rules_ref

Selects one group rules record using the ROWID.

Parameters
p_rowid   Database ROWID of the record to be selected.  Required.

Returns
A cursor variable that will fetch exactly one record.


f_query_one_lock

FUNCTION f_query_one_lock(p_fgac_code gobfgac.gobfgac_fgac_code%TYPE,
                          p_rowid     VARCHAR2 DEFAULT NULL)
  RETURN group_rules_ref

Selects one group rules record and locks it.

Parameters
p_fgac_code   FGAC group code.  Required.
p_rowid   Database ROWID of the record to be selected.  Optional.

Returns
A cursor variable for one record and locks the record.


p_create

PROCEDURE p_create(p_fgac_code  gobfgac.gobfgac_fgac_code%TYPE,
                   p_active_ind gobfgac.gobfgac_active_ind%TYPE DEFAULT 'N',
                   p_eff_date   gobfgac.gobfgac_eff_date%TYPE DEFAULT SYSDATE,
                   p_user_id    gobfgac.gobfgac_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_rowid_out  OUT VARCHAR2)

Creates a group rules record.
 
Defines the Active and Effective Date characteristics for FGAC VBS group rules.
A group rule is only processed if its Active indicator equals 'Y' and the current date is greater than or equal to the Effective Date.

Parameters
p_fgac_code   FGAC group code.  Required.
p_active_ind   Indicates if the FGAC rule is active.  Valid values are 'Y' - Active and 'N' - Inactive.  Optional.
p_eff_date   Date when the FGAC rule becomes active.  Optional.
p_user_id   The Oracle User ID, as returned by the gb_common.f_sct_user function, of the user who created or last updated the record.  Optional.
p_rowid_out   Database ROWID of the record created.  Required.


p_delete

PROCEDURE p_delete(p_fgac_code gobfgac.gobfgac_fgac_code%TYPE,
                   p_rowid     VARCHAR2 DEFAULT NULL)

Deletes a group rules record.
 
Will also delete child records with the same group code on the GORFPRD table.

Parameters
p_fgac_code   FGAC group code.  Required.
p_rowid   Database ROWID of the record to be deleted.  Optional.


p_lock

PROCEDURE p_lock(p_fgac_code   gobfgac.gobfgac_fgac_code%TYPE,
                 p_rowid_inout IN OUT VARCHAR2)

Locks a group rules record.
 
If the 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_fgac_code   FGAC group code.  Required.
p_rowid_inout   Database ROWID of record to lock.  Required.


p_update

PROCEDURE p_update(p_fgac_code  gobfgac.gobfgac_fgac_code%TYPE,
                   p_active_ind gobfgac.gobfgac_active_ind%TYPE DEFAULT dml_common.f_unspecified_string,
                   p_eff_date   gobfgac.gobfgac_eff_date%TYPE DEFAULT dml_common.f_unspecified_date,
                   p_user_id    gobfgac.gobfgac_user_id%TYPE DEFAULT gb_common.f_sct_user,
                   p_rowid      VARCHAR2 DEFAULT NULL)

Updates a group rules record.
 
A record with this group code must exist to be updated.
The Active indicator, Effective Date and User ID may be updated.

Parameters
p_fgac_code   FGAC group code.  Required.
p_active_ind   Indicates if the FGAC rule is active.  Valid values are 'Y' - Active and 'N' - Inactive.  Optional.
p_eff_date   Date when the FGAC rule becomes effective.  Optional.
p_user_id   The Oracle User ID, as returned by the gb_common.f_sct_user function, of the user who created or last updated the record.  Optional.
p_rowid   Database ROWID of record to be updated.  Optional.