com.esri.arcgis.geodatabase
Class MemoryRelationshipClassFactory

java.lang.Object
  extended by com.esri.arcgis.geodatabase.MemoryRelationshipClassFactory
All Implemented Interfaces:
IMemoryRelationshipClassFactory, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class MemoryRelationshipClassFactory
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IMemoryRelationshipClassFactory

Object used to create memory relationship class objects.

Remarks

A MemoryRelationshipClassFactory is an object that manages the MemoryRelationshipClasses that exist in the application. You must use either a MemoryRelationshipClassFactory or a MemoryRelationshipClassName object to create new MemoryRelationshipClasses.

Like WorkspaceFactory, a MemoryRelationshipClassFactory is a singleton object. This means that you can only have one instance of this object per COM STA apartment / per thread.

MemoryRelationshipClassFactory is the one and only instance of its class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Singleton:

This type is a singleton.

See Also:
Serialized Form

Constructor Summary
MemoryRelationshipClassFactory()
          Constructs a MemoryRelationshipClassFactory using ArcGIS Engine.
MemoryRelationshipClassFactory(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MemoryRelationshipClassFactory theMemoryRelationshipClassFactory = (MemoryRelationshipClassFactory) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

MemoryRelationshipClassFactory

public MemoryRelationshipClassFactory()
                               throws IOException,
                                      UnknownHostException
Constructs a MemoryRelationshipClassFactory using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

MemoryRelationshipClassFactory

public MemoryRelationshipClassFactory(Object obj)
                               throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MemoryRelationshipClassFactory theMemoryRelationshipClassFactory = (MemoryRelationshipClassFactory) obj;

Construct a MemoryRelationshipClassFactory using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to MemoryRelationshipClassFactory.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

open

public 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

Specified by:
open in interface IMemoryRelationshipClassFactory
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.