com.esri.arcgis.geodatabase
Interface IMemoryRelationshipClassFactory

All Superinterfaces:
Serializable
All Known Implementing Classes:
MemoryRelationshipClassFactory

public interface IMemoryRelationshipClassFactory
extends Serializable

Provides access to members that open a memory relationship class.

Remarks

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

See MemoryRelationshipClass for more information on MemoryRelationship Classes.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 IRelationshipClass open(String name, IObjectClass originPrimaryClass, String originPrimaryKeyField, IObjectClass originForeignClass, String originForeignKeyField, String forwardPathLabel, String backwardPathLabel, int cardinality)
          Opens the memory relationship class specified by the given properties.
 

Method Detail

open

IRelationshipClass open(String name,
                        IObjectClass originPrimaryClass,
                        String originPrimaryKeyField,
                        IObjectClass originForeignClass,
                        String originForeignKeyField,
                        String forwardPathLabel,
                        String backwardPathLabel,
                        int cardinality)
                        throws IOException,
                               AutomationException
Opens the memory relationship class specified by the given properties.

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
name - The name (in)
originPrimaryClass - A reference to a com.esri.arcgis.geodatabase.IObjectClass (in)
originPrimaryKeyField - The originPrimaryKeyField (in)
originForeignClass - A reference to a com.esri.arcgis.geodatabase.IObjectClass (in)
originForeignKeyField - The originForeignKeyField (in)
forwardPathLabel - The forwardPathLabel (in)
backwardPathLabel - The backwardPathLabel (in)
cardinality - A com.esri.arcgis.geodatabase.esriRelCardinality constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRelationshipClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.