6.1 SDO_NET.ADD_CHILD_FEATURE

Format

SDO_NET.ADD_CHILD_FEATURE(
     parent_layer_id   IN NUMBER,
     parent_feature_id IN NUMBER,
     child_layer_id    IN NUMBER,
     child_feature_id  IN SDO_NET_LAYER_FEAT,
     sequence_number   IN NUMBER DEFAULT NULL,
     check_integrity   IN BOOLEAN DEFAULT TRUE);

Description

Associates a feature as a child feature of a specified parent feature.

Parameters

parent_layer_id

ID of the parent feature layer.

parent_feature_id

ID of the feature that is to become the parent feature of the specified child feature.

child_layer_id

ID of the child feature layer.

child_feature_id

ID of the feature to be associated as a child feature of the specified parent feature. (The SDO_NET_LAYER_FEAT type is described in Data Types Used for Feature Modeling.)

sequence_number

Sequence number of the child_feature_id feature in the child feature layer. If this parameter is null, a sequence number after the last current number is assigned.

check_integrity

TRUE (the default) checks if the child feature exists; and if it does not exist, an error is generated. FALSE does not check if the child feature exists.

Usage Notes

The specified child feature must already exist.

To associate multiple features as child features, use the SDO_NET.ADD_CHILD_FEATURES procedure.

Examples

The following example adds a child feature at sequence number 2.

DECLARE
  parent_layer_id NUMBER;
  parent_feature_id NUMBER := 1;
  child_layer_id NUMBER;
  child_feature_id NUMBER := 3;
BEGIN
  parent_layer_id := sdo_net.get_feature_layer_id('GRID', 'PARENT_LAYER');
  child_layer_id := sdo_net.get_feature_layer_id('GRID', 'POI');
  sdo_net.add_child_feature(parent_layer_id, parent_feature_id, child_layer_id, child_feature_id, 2, true);
END;
/