Interface IMemoryRelationshipClassFactory

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll

Provides access to members that open a memory relationship class.

[Guid("9AAE7F41-E171-4BBA-9D77-AB6A02309116")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IMemoryRelationshipClassFactory

Remarks

The IMemoryRelationshipClassFactory interface provides an Open method that creates a new MemoryRelationshipClass.

See MemoryRelationshipClass for more information on MemoryRelationship Classes.

Methods

Open(string, IObjectClass, string, IObjectClass, string, string, string, esriRelCardinality)

Opens the memory relationship class specified by the given properties.

IRelationshipClass Open(string Name, IObjectClass originPrimaryClass, string originPrimaryKeyField, IObjectClass originForeignClass, string originForeignKeyField, string ForwardPathLabel, string BackwardPathLabel, esriRelCardinality Cardinality)

Parameters

Name string
originPrimaryClass IObjectClass
originPrimaryKeyField string
originForeignClass IObjectClass
originForeignKeyField string
ForwardPathLabel string
BackwardPathLabel string
Cardinality esriRelCardinality

Returns

IRelationshipClass

Remarks

The Open method either creates a new MemoryRelationshipClass or returns a reference to an existing MemoryRelationshipClass if that class has already been created.

When creating a MemoryRelationshipClass, much of the same information that is required for a RelationshipClass in the Geodatabase is needed. However, MemoryRelationshipClasses are always simple and non-attributed so only two tables and two fields need to be specified. The originPrimaryKeyField refers to the field in the originPrimaryClass while the originForeignKeyField refers to the field in the originForeignClass.

Once the MemoryRelationshipClass is created, the IRelationshipClass interface can be used to find the tables and fields specified in the Open method. Here is how the properties from IRelationshipClass are mapped to the parameters of the Open method:

IRelationshipClass Property Open method parameter      
DestinationClass originForeignClass
OriginClass originPrimaryClass
OriginPrimaryKey originPrimaryKeyField
OriginForeignKey originPrimaryKeyField
ForwardPathLabel ForwardPathLabel
BackwardPathLabel BackwardPathLabel
Cardinality Cardinality

The diagram below describes the associations that define a MemoryRelationshipClass.