IRelationshipClassContainer Interface

Provides access to members that create, add and hand out relationship classes.

Description

The IRelationshipClassContainerinterface lets you create a relationship class within a feature dataset rather than a workspace.

When To Use

The IRelationshipClassContainerinterface lets you create a relationship class within a feature dataset rather than a workspace. The AddRelationshipClassmethod is effectively superseded by IDatasetContainer::AddDataset.

Members

Name Description
Method AddRelationshipClass Transfers ownership of a relationship class to this container.
Method CreateRelationshipClass Creates a new relationship class in this container.
Read-only property RelationshipClasses An enumerator over the RelationshipClasses in this container.

IRelationshipClassContainer.AddRelationshipClass Method

Transfers ownership of a relationship class to this container.

Public Sub AddRelationshipClass ( _
    ByVal RelationshipClass As IRelationshipClass _
)
public void AddRelationshipClass (
    IRelationshipClass RelationshipClass
);

IRelationshipClassContainer.CreateRelationshipClass Method

Creates a new relationship class in this container.

Public Function CreateRelationshipClass ( _
    ByVal relClassName As String, _
    ByVal OriginClass As IObjectClass, _
    ByVal DestinationClass As IObjectClass, _
    ByVal ForwardLabel As String, _
    ByVal BackwardLabel As String, _
    ByVal Cardinality As esriRelCardinality, _
    ByVal Notification As esriRelNotification, _
    ByVal IsComposite As Boolean, _
    ByVal IsAttributed As Boolean, _
    ByVal relAttrFields As IFields, _
    ByVal OriginPrimaryKey As String, _
    ByVal destPrimaryKey As String, _
    ByVal OriginForeignKey As String, _
    ByVal destForeignKey As String _
) As IRelationshipClass
public IRelationshipClass CreateRelationshipClass (
    string relClassName,
    IObjectClass OriginClass,
    IObjectClass DestinationClass,
    string ForwardLabel,
    string BackwardLabel,
    esriRelCardinality Cardinality,
    esriRelNotification Notification,
    bool IsComposite,
    bool IsAttributed,
    IFields relAttrFields,
    string OriginPrimaryKey,
    string destPrimaryKey,
    string OriginForeignKey,
    string destForeignKey
);

IRelationshipClassContainer.RelationshipClasses Property

An enumerator over the RelationshipClasses in this container.

Public ReadOnly Property RelationshipClasses As IEnumRelationshipClass
public IEnumRelationshipClass RelationshipClasses {get;}

Classes that implement IRelationshipClassContainer

Classes Description

Remarks

The AddRelationshipClassmethod is effectively superseded by IDatasetContainer::AddDataset. The IDatasetContainerinterface lets you move datasets between feature datasets and workspaces�both objects implement the interface.

public void MoveDataset(IFeatureDataset featureDataset, IDataset dataset, Boolean requiredStandAlone)

    {

        //This function moves a dataset (for example, a feature class or relationship class) 

        //from a feature dataset to being standalone in a workspace, or vice versa.

        IDatasetContainer datasetContainer;

        if (requiredStandAlone)

        {

            datasetContainer = featureDataset.Workspace as IDatasetContainer;

        }

        else

        {

            datasetContainer = featureDataset as IDatasetContainer;

        }

        datasetContainer.AddDataset(dataset);

    }

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close