Oracle Repository API and Model Reference Guide


Contents


API Methods


Element Definitions


Index  


Reference Checking

A 'dangling reference' is one whose target does not exist or is outside an assumed context (context is one of workarea, configuration, container, or arbitrary set of objects).

Note: A reference in this sense is a relationship implemented via a reference property in the object concerned, and does not include the notion of containership, which is implemented via FOLDER_MEMBERs.

The JR_CHECK_REFS package provides the following methods for identifying dangling references:

check_refs - Check an arbitrary set of PAC elements.
check_cfg_refs
- Check all elements in a configuration.
check_fol_refs - Check all elements in a container.
check_wa_refs - Check all elements in a workarea.
check_elem_refs - Check a specific element for unresolved references in the context workarea.

Note: JR_NUM_LIST and JR_STR_LIST are global data types available to all API callers.

Access Requirements



PROCEDURE jr_check_refs.check_refs(elem_ivids     IN JR_NUM_LIST
                                  , elem_types    IN JR_NUM_LIST
                                  , check_el      IN JR_STR_LIST
                                  , el_irid       OUT JR_NUM_LIST
                                  , el_ivid       OUT JR_NUM_LIST
                                  , ref_irid      OUT JR_NUM_LIST
                                  , el_par_irid   OUT JR_NUM_LIST
                                  , el_par_ivid   OUT JR_NUM_LIST
                                  , ref_par_irid  OUT JR_NUM_LIST
                                  , el_type       OUT JR_STR_LIST
                                  , el_typ_sname  OUT JR_STR_LIST
                                  , ref_type      OUT JR_STR_LIST
                                  , ref_typ_sname OUT JR_STR_LIST
                                  , ref_par_sname OUT JR_STR_LIST
                                  , ref_prop      OUT JR_STR_LIST
                                  , mandatory     OUT JR_STR_LIST
                                  , reason        OUT JR_STR_LIST);

Where:

elem_ivids is an array of IVIDs of PAC elements that constitute a set.

elem_types is an array of element type IDs, each referring to the corresponding entry in elem_ivids.

check_el indicates, for each entry in elem_ivids, whether to check that PAC for references outside the set.

For each element found to have external references, and for each such reference, the following is returned:

el_par_ivid on return from the call, contains the IVID of the parent of the referring element. If the element is a PAC, then el_par_ivid is the same as el_ivid.
el_type_sname the short name for the referring element's type.
ref_type_sname the short name for the referenced element's type. If the element is a PAC, ref_type_sname is the same as ref_par_sname.
ref_par_sname the short name for the type of the parent of the referenced element.

For details of other parameters, see Parameters.

Description

Checks for dangling references outside a set of elements defined by the contents of the elem_ivids array.

For each entry in check_el that contains a 'Y', it checks if the corresponding entry in elem_ivids references any entry outside the set. If so, it returns in el_irid and el_ivid the IRID and IVID respectively of the refererring element, and also returns in other parameters information about the referenced element. For details of the other parameters, see Parameters.

See also

API Methods List

Return to Top



PROCEDURE jr_check_refs.check_wa_refs(workarea_id  IN NUMBER
                                    , el_ivid      OUT JR_NUM_LIST
                                    , ref_irid     OUT JR_NUM_LIST
                                    , el_par_ivid  OUT JR_NUM_LIST
                                    , ref_par_irid OUT JR_NUM_LIST
                                    , el_type      OUT JR_STR_LIST
                                    , ref_type     OUT JR_STR_LIST
                                    , ref_prop     OUT JR_STR_LIST
                                    , mandatory    OUT JR_STR_LIST
                                    , reason       OUT JR_STR_LIST);

Where:

workarea_id is the ID of the workarea to be checked.

For details of other parameters, see Parameters.

Description

Checks for dangling references in the context of the specified workarea.

See also

API Methods List

Return to Top



PROCEDURE jr_check_refs.check_cfg_refs(config_id    IN NUMBER
                                     , el_ivid      OUT JR_NUM_LIST
                                     , ref_irid     OUT JR_NUM_LIST
                                     , el_par_ivid  OUT JR_NUM_LIST
                                     , ref_par_irid OUT JR_NUM_LIST
                                     , el_type      OUT JR_STR_LIST
                                     , ref_type     OUT JR_STR_LIST
                                     , ref_prop     OUT JR_STR_LIST
                                     , mandatory    OUT JR_STR_LIST
                                     , reason       OUT JR_STR_LIST);

Where:

config_id is the IVID of the configuration to be checked.

For details of other parameters, see Parameters.

Description

Checks for dangling references in the context of the specified configuration.

See also

API Methods List

Return to Top



PROCEDURE jr_check_refs.check_fol_refs(container_id IN NUMBER
                                     , recurse      IN BOOLEAN
                                     , el_ivid      OUT JR_NUM_LIST
                                     , ref_irid     OUT JR_NUM_LIST
                                     , el_par_ivid  OUT JR_NUM_LIST
                                     , ref_par_irid OUT JR_NUM_LIST
                                     , el_type      OUT JR_STR_LIST
                                     , ref_type     OUT JR_STR_LIST
                                     , ref_prop     OUT JR_STR_LIST
                                     , mandatory    OUT JR_STR_LIST
                                     , reason       OUT JR_STR_LIST); 

Where:

container_id is the the IVID of the container to be checked.

recurse if TRUE, specifies that sub-containers of container_id are to be checked.

For details of other parameters, see Parameters.

Description

Checks for dangling references in the in the context of the specified container. A context workarea must be set.

See also

API Methods List

Return to Top



PROCEDURE jr_check_refs.check_elem_refs (elem_irid    IN NUMBER
                                       , elem_ivid    IN NUMBER
                                       , elem_type    IN NUMBER
                                       , el_ivid      OUT JR_NUM_LIST
                                       , ref_irid     OUT JR_NUM_LIST
                                       , el_par_ivid  OUT JR_NUM_LIST
                                       , ref_par_irid OUT JR_NUM_LIST
                                       , el_type      OUT JR_STR_LIST
                                       , ref_type     OUT JR_STR_LIST
                                       , ref_prop     OUT JR_STR_LIST
                                       , mandatory    OUT JR_STR_LIST
                                       , reason       OUT JR_STR_LIST);  

Where:

elem_irid is the IRID of the element to be checked.

elem_ivid is its IVID.

elem_type is its type ID.

For details of other parameters, see Parameters.

Description

Checks the single specified element for any references that are unresolved in the current context workarea.

Can be used for PACs or SACs. A context workarea must be set when calling this method.

For PACs only, elem_ivid and elem_type can be NULL.

See also

The methods:

API Methods List

Return to Top


Parameters

The remaining parameters are parallel indexed arrays (nested tables), each containing, on return, an equal number of entries, as follows:

el_irid contains a list of IRIDs, the object versions that reference objects outside the specified context (workarea, configuration, container, or set).

el_ivid contains a list of IVIDs, the object versions that reference objects outside the specified context (workarea, configuration, container, or set).

ref_irid contains a list of IRIDs, the objects outside the specified workarea that are referenced by object versions in the context.

el_par_ivid is the IVID of the parent of each of the corresponding el_ivids. If el_ivid is a SAC, the corresponding el_par_ivid is its owning PAC. If a PAC, then el_par_ivid is a repeat of the corresponding el_ivid.

ref_par_irid is the parent of the corresponding ref_irid. If ref_irid is a SAC, the corresponding ref_par_irid is its owning PAC. If a PAC, then ref_par_irid is a repeat of the corresponding ref_irid.

el_type is the NLS display name of the element type to which the corresponding el_ivid belongs.

ref_type is the NLS display name of the element type to which the corresponding ref_irid belongs.

ref_prop is the NLS display name of the property linking the corresponding el_ivid and the corresponding ref_irid.

mandatory is one of:

reason indicates why the corresponding reference is being treated as a dangling reference, and is one of:

Note: In the set of nested tables used by these methods, each 'row' describes a single occurrence of a reference. Therefore, the same el_irid or el_ivid can appear multiple times.

Return to Top