Class MemoryRelationshipClassFactoryClass
- Namespace
- ESRI.ArcGIS.Geodatabase
- Assembly
- ESRI.Server.Geodatabase.dll
[Guid("2FC5C57B-EB92-4A61-BBC5-434E388BF3B9")]
[ClassInterface(ClassInterfaceType.None)]
public class MemoryRelationshipClassFactoryClass : MemoryRelationshipClassFactory, IMemoryRelationshipClassFactory
- Inheritance
-
MemoryRelationshipClassFactoryClass
- Implements
- Inherited Members
Constructors
MemoryRelationshipClassFactoryClass()
public MemoryRelationshipClassFactoryClass()
Explicit Interface Implementations
Open(string, IObjectClass, string, IObjectClass, string, string, string, esriRelCardinality)
Opens the memory relationship class specified by the given properties.
virtual IRelationshipClass Open(string Name, IObjectClass originPrimaryClass, string originPrimaryKeyField, IObjectClass originForeignClass, string originForeignKeyField, string ForwardPathLabel, string BackwardPathLabel, esriRelCardinality Cardinality)
Parameters
NamestringoriginPrimaryClassIObjectClassoriginPrimaryKeyFieldstringoriginForeignClassIObjectClassoriginForeignKeyFieldstringForwardPathLabelstringBackwardPathLabelstringCardinalityesriRelCardinality
Returns
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.
