com.esri.arcgis.geodatabase
Class AttributedRelationshipClass

java.lang.Object
  extended by com.esri.arcgis.geodatabase.AttributedRelationshipClass
All Implemented Interfaces:
IClass, IDataset, IDatasetEdit, IDatasetEditInfo, IRelationshipClass, IRelationshipClass2, IRelClassSchemaEdit, ITable, ITableCapabilities, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class AttributedRelationshipClass
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IRelationshipClass, IDataset, IRelationshipClass2, ITable, IClass, ITableCapabilities, IDatasetEdit, IDatasetEditInfo, IRelClassSchemaEdit

Esri Attributed Relationship Class object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
AttributedRelationshipClass(Object obj)
          Construct a AttributedRelationshipClass using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void addField(IField field)
          Adds a field to this object class.
 void addIndex(IIndex index)
          Adds an index to this object class.
 void addRelationshipRule(IRule rule)
          Adds a relationship rule to this relationship class.
 void alterBackwardPathLabel(String backwardLabel)
          Changes the backward path label for this relationship class.
 void alterForwardPathLabel(String forwardLabel)
          Changes the forward path label for this relationship class.
 void alterIsComposite(boolean isComposite)
          Changes the type of this relationship class.
 boolean canCopy()
          True if this dataset can be copied.
 boolean canDelete()
          True if this dataset can be deleted.
 boolean canRename()
          True if this dataset can be renamed.
 IDataset copy(String copyName, IWorkspace copyWorkspace)
          Copies this dataset to a new dataset with the specified name.
 IRelationship createRelationship(IObject originObject, IObject destinationObject)
          Creates a new relationship between the two specified objects.
 IRow createRow()
          Creates a row in the database with a system assigned object ID and null property values.
 IRowBuffer createRowBuffer()
          Creates a row buffer that can be used with an insert cursor.
 void delete()
          Deletes this dataset.
 void deleteField(IField field)
          Deletes a field from this object class.
 void deleteIndex(IIndex index)
          Deletes an index from this object class.
 void deleteRelationship(IObject originObject, IObject destinationObject)
          Deletes the relationship that associates the two specified objects.
 void deleteRelationshipRule(IRule rule)
          Deletes a relationship rule from this relationship class.
 void deleteRelationshipsForObject(IObject anObject)
          Deletes all relationships that apply to a specified object.
 void deleteRelationshipsForObjectSet(ISet anObjectSet)
          Deletes all relationships that apply to the specified origin or destination object set.
 void deleteSearchedRows(IQueryFilter queryFilter)
          Delete the Rows in the database selected by the specified query.
 boolean equals(Object o)
          Compare this object with another
 int findField(String name)
          The index of the field with the specified name.
 String getBackwardPathLabel()
          The backward path label for the relationship class.
 String getBrowseName()
          The browse name of the dataset.
 int getCardinality()
          The cardinality for the relationship class.
 String getCategory()
          The category of the dataset.
 IUID getCLSID()
          The GUID for the COM Class (CoClass) corresponding to instances of this object class.
 IObjectClass getDestinationClass()
          The destination object class.
 String getDestinationForeignKey()
          The relationship destination foreign Key.
 String getDestinationPrimaryKey()
          The relationship destination primary Key.
 IUID getEXTCLSID()
          The GUID for the COM Class (CoClass) corresponding to the class extension for this object class.
 Object getExtension()
          The extension for this object class.
 IPropertySet getExtensionProperties()
          The extension properties for this object class.
 IFeatureDataset getFeatureDataset()
          The feature dataset, if any, to which this relationship class belongs.
 IFields getFields()
          The fields collection for this object class.
 String getForwardPathLabel()
          The forward path label for the relationship class.
 IName getFullName()
          The associated name object.
 IIndexes getIndexes()
          The indexes collection for this object class.
 String getName()
          The name of the Dataset.
 int getNotification()
          The notification direction for the relationship class.
 IRelClassEnumRowPairs getObjectsMatchingObjectArray(IArray srcObjectArray, IQueryFilter queryFilterAppliedToMatchingObjects, boolean returnAllObjectMatches)
          Gets rows pairs of objects that are related to the specified origin or destination object array, that also meet the query filter expression.
 IRelClassEnumRowPairs getObjectsMatchingObjectSet(ISet srcObjectSet)
          Gets rows pairs of objects that are related to the specified origin or destination object set.
 IRelClassEnumRowPairs getObjectsMatchingObjectSetEx(ISet srcObjectSet, IQueryFilter queryFilterAppliedToMatchingObjects, boolean returnAllObjectMatches)
          Gets rows pairs of objects that are related to the specified origin or destination object set, that also meet the query filter expression.
 ISet getObjectsRelatedToObject(IObject anObject)
          Gets the objects that are related to the specified object.
 ISet getObjectsRelatedToObjectSet(ISet anObjectSet)
          Gets the objects that are related to the specified origin or destination object set.
 String getOIDFieldName()
          The name of the field corresponding to the OID.
 IObjectClass getOriginClass()
          The origin object class.
 String getOriginForeignKey()
          The relationship origin foreign Key.
 String getOriginPrimaryKey()
          The relationship origin primary Key.
 IPropertySet getPropertySet()
          The set of properties for the dataset.
 IRelationship getRelationship(IObject originObject, IObject destinationObject)
          Get the relationship that associates the two specified objects.
 int getRelationshipClassID()
          The relationship class ID.
 IEnumRule getRelationshipRules()
          The relationship rules that apply to this relationship class.
 IEnumRelationship getRelationshipsForObject(IObject anObject)
          Get all relationships that apply to a specified object.
 IEnumRelationship getRelationshipsForObjectSet(ISet anObjectSet)
          Get all relationships that apply to the specified origin or destination object set.
 IRow getRow(int oID)
          The row from the database with the specified object ID.
 ICursor getRows(Object oids, boolean recycling)
          The cursor of rows based on a set of object ids.
 IEnumDataset getSubsets()
          Datasets contained within this dataset.
 int getType()
          The type of the Dataset.
 IWorkspace getWorkspace()
          The workspace containing this dataset.
 int hashCode()
          the hashcode for this object
 ICursor insert(boolean useBuffering)
          Returns a cursor that can be used to insert new Rows.
 boolean isAttributed()
          Indicates if the relationships in this relationship class have attributes.
 boolean isBeingEdited()
          True if the dataset is being edited.
 boolean isCanEdit()
          True if the dataset supports edit sessions with the ability to discard edits on save.
 boolean isCanRedo()
          True if the dataset supports edit sessions with the ability to redo undone operations.
 boolean isCanSelect()
          Indicates if the table supports selection.
 boolean isCanUndo()
          True if the dataset supports edit sessions with the ability to undo individual edit operations.
 boolean isComposite()
          Indicates if the relationship class represents a composite relationship in which the origin object class represents the composite object.
 boolean isHasOID()
          Indicates if the class has an object identity (OID) field.
 ICursor ITable_search(IQueryFilter queryFilter, boolean recycling)
          An object cursor that can be used to fetch row objects selected by the specified query.
 void rename(String name)
          Renames this Dataset.
 int rowCount(IQueryFilter queryFilter)
          The number of Rows selected by the specified query.
 ISelectionSet select(IQueryFilter queryFilter, int selType, int selOption, IWorkspace selectionContainer)
          A selection that contains the object ids selected by the specified query.
 void setBrowseName(String name)
          The browse name of the dataset.
 ICursor update(IQueryFilter queryFilter, boolean recycling)
          Returns a cursor that can be used to update Rows selected by the specified query.
 void updateSearchedRows(IQueryFilter queryFilter, IRowBuffer buffer)
          Update the Rows in the database selected by the specified query.
 
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

AttributedRelationshipClass

public AttributedRelationshipClass(Object obj)
                            throws IOException
Construct a AttributedRelationshipClass using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to AttributedRelationshipClass.
Casting to this class from the return value of a method will not work, as this class represents an abstract class in ArcObjects.
*
AttributedRelationshipClass o = (AttributedRelationshipClass)obj; // will not work

AttributedRelationshipClass o = new AttributedRelationshipClass(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server

Throws:
IOException - if there are interop problems AttributedRelationshipClass theAttributedRelationshipClass = (AttributedRelationshipClass) obj;
Method Detail

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

getOriginPrimaryKey

public String getOriginPrimaryKey()
                           throws IOException,
                                  AutomationException
The relationship origin primary Key.

Example:

IRelationshipClassSet pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

String sPrimaryKeyField = pRelationshipClass.getOriginPrimaryKey();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getOriginPrimaryKey in interface IRelationshipClass
Returns:
The relOrigPKey
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDestinationPrimaryKey

public String getDestinationPrimaryKey()
                                throws IOException,
                                       AutomationException
The relationship destination primary Key.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

String  sPrimaryKeyField = pRelationshipClass.getDestinationPrimaryKey();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDestinationPrimaryKey in interface IRelationshipClass
Returns:
The relDestPKey
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOriginForeignKey

public String getOriginForeignKey()
                           throws IOException,
                                  AutomationException
The relationship origin foreign Key.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

String   sPrimaryKeyField = pRelationshipClass.getOriginForeignKey();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getOriginForeignKey in interface IRelationshipClass
Returns:
The relOrigFKey
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDestinationForeignKey

public String getDestinationForeignKey()
                                throws IOException,
                                       AutomationException
The relationship destination foreign Key.

Remarks

The DestinationForeignKey property returns the name of the destination foreign key field. This property is null except in the case of attributed relationship classes, in which case it is the name of a field in the relationship table. The values in this field reference values in the field designated as the destination primary key.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

String   sPrimaryKeyField = pRelationshipClass.getDestinationForeignKey();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDestinationForeignKey in interface IRelationshipClass
Returns:
The relDestFKey
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRelationshipClassID

public int getRelationshipClassID()
                           throws IOException,
                                  AutomationException
The relationship class ID.

Remarks

The RelationshipClassID property returns the ID of the relationship class. This ID uniquely identifies a relationship class within its geodatabase relative to other relationship classes. It is equivalent to IObjectClass::ObjectClassID except that it applies to relationship classes rather than object classes.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

long lClassID = pRelationshipClass.getRelationshipClassID();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRelationshipClassID in interface IRelationshipClass
Returns:
The relClassId
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOriginClass

public IObjectClass getOriginClass()
                            throws IOException,
                                   AutomationException
The origin object class.

Remarks

When using a relationship class, the OriginClass property is used for returning an interface to the origin objectclass .

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getOriginClass in interface IRelationshipClass
Returns:
A reference to a com.esri.arcgis.geodatabase.IObjectClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDestinationClass

public IObjectClass getDestinationClass()
                                 throws IOException,
                                        AutomationException
The destination object class.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

IObjectClass pObjectClass = pRelationshipClass.getDestinationClass();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDestinationClass in interface IRelationshipClass
Returns:
A reference to a com.esri.arcgis.geodatabase.IObjectClass
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFeatureDataset

public IFeatureDataset getFeatureDataset()
                                  throws IOException,
                                         AutomationException
The feature dataset, if any, to which this relationship class belongs.

Remarks

The FeatureDataset property returns the feature dataset that this relationship class belongs to. If the relationship class exists outside of a feature dataset, a null value will be returned.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

IFeatureDataset pFeatureDataset = pRelationshipClass.getFeatureDataset();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFeatureDataset in interface IRelationshipClass
Returns:
A reference to a com.esri.arcgis.geodatabase.IFeatureDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getForwardPathLabel

public String getForwardPathLabel()
                           throws IOException,
                                  AutomationException
The forward path label for the relationship class.

Remarks

The ForwardPathLabel property returns the path label for the forward direction path. An example can be shown by using a relationship between a pump station and its pumps. A forward path label may be something like "Contains". It would be read as a pump station 'Contains' pumps.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

String sPathLabel = pRelationshipClass.getForwardPathLabel();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getForwardPathLabel in interface IRelationshipClass
Returns:
The forwardLabel
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBackwardPathLabel

public String getBackwardPathLabel()
                            throws IOException,
                                   AutomationException
The backward path label for the relationship class.

Remarks

The BackwardPathLabel property returns the path label for the backward direction path. An example can be shown by using a relationship between a pump station and its pumps. A backward path label may be something like "Contained by". It would be read as a pump is 'Contained by' the pump station.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

String sPathLabel = pRelationshipClass.getBackwardPathLabel();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBackwardPathLabel in interface IRelationshipClass
Returns:
The backwardLabel
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCardinality

public int getCardinality()
                   throws IOException,
                          AutomationException
The cardinality for the relationship class.

Remarks

The Cardinality property returns the cardinality of the relationship class as an esriRelCardinality enumeration value. It refers to the type of relationship formed between an origin class and a destination class. It can be one of three types: esriRelCardinalityOneToOne (1-1), esriRelCardinalityOneToMany (1-M), or esriRelCardinalityManyToMany (M-N).

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

esriRelCardinality eCardinality = pRelationshipClass.getCardinality();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCardinality in interface IRelationshipClass
Returns:
A com.esri.arcgis.geodatabase.esriRelCardinality constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getNotification

public int getNotification()
                    throws IOException,
                           AutomationException
The notification direction for the relationship class.

Remarks

The Notification property returns the relationship class' notification behavior as as esriRelNotification enumeration value. A notification occurs when an event happens, such as a deletion or an edit. It can be one of four type: esriRelNotificationNone, esriRelNotificationForward, esriRelNotificationBackward, or esriRelNotificationBoth. None means no notification will take place, forward means that notification will happen from the origin to the destination, backward means notification occurs from the destination to the origin, and both means notification will happen both ways when an event occurs.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

esriRelNotification eNotification = pRelationshipClass.getNotification();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getNotification in interface IRelationshipClass
Returns:
A com.esri.arcgis.geodatabase.esriRelNotification constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAttributed

public boolean isAttributed()
                     throws IOException,
                            AutomationException
Indicates if the relationships in this relationship class have attributes.

Remarks

The IsAttributed property indicates whether this relationship class is attributed or not. An attributed relationship class has extra attributes that are being maintained for each relationship. For example, in a relationship class between parcels and owners, percentage of ownership each particular owner has could be stored as a relationship attribute.

The IsAttributed property will only return true if there are extra relationship attributes beyond those required to relate the objects. In the case of relationship classes with M:N cardinality, there will be a relationship table (see 'AttributedRelationshipClass' in the object model diagram), but IsAttributed will return False, unless there are additional attributes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isAttributed in interface IRelationshipClass
Returns:
The isAttributed
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isComposite

public boolean isComposite()
                    throws IOException,
                           AutomationException
Indicates if the relationship class represents a composite relationship in which the origin object class represents the composite object.

Remarks

The IsComposite property indicates whether this relationship class is composite or simple. A composite relationship class is one where objects in the origin class control the lifetime of the objects in the destination class. When the origin object is deleted, the related destination object is also deleted. Composite relationship classes are always one to many relationships, but this can be constrained to one to one through the use of relationship rules.

If a relationship class is not composite, it is considered 'simple', and related objects are independent of each other. Simple relationships can be of any cardinality.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isComposite in interface IRelationshipClass
Returns:
The isComposite
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createRelationship

public IRelationship createRelationship(IObject originObject,
                                        IObject destinationObject)
                                 throws IOException,
                                        AutomationException
Creates a new relationship between the two specified objects.

Remarks

The CreateRelationship method creates a relationship between the origin object and the destination object specified in the parameters. By default, when a relationship class is created, a relationship is created between the objects with corresponding primary and foreign key values. When subsequently using CreateRelationship, remember that this operation will write a value into the foreign key field. Therefore, in the case of 1:1 and 1:M relationship classes, it is possible that you could overwrite, and therefore delete, an existing relationship.

This method should be called within an edit session.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

ITable pOriginTable = new ITableProxy(pFeatureWorkspace.openTable("origintable"));

ITable pDestinationTable = new ITableProxy(pFeatureWorkspace.openTable("destinationtable"));

IFeature pOriginFeature = new IFeatureProxy(pOriginTable.getRow(2));

IFeature pDestinationFeature = new IFeatureProxy(pDestinationTable.getRow(2));

IWorkspaceEdit pWorkspaceEdit = pWorkspace;

pWorkspaceEdit.startEditing(true);

pWorkspaceEdit.startEditOperation();

IRelationship pRelationship = pRelationshipClass.createRelationship(pOriginFeature, pDestinationFeature);

pWorkspaceEdit.stopEditOperation();

pWorkspaceEdit.stopEditing(true);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createRelationship in interface IRelationshipClass
Parameters:
originObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
destinationObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRelationship
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRelationship

public IRelationship getRelationship(IObject originObject,
                                     IObject destinationObject)
                              throws IOException,
                                     AutomationException
Get the relationship that associates the two specified objects.

Remarks

When using a relationship class, the GetRelationship method is used for returning a relationship interface to the relationship between the origin object and destination object specified in the function parameters. This can be used to retrieve the relationship between two objects.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRelationship in interface IRelationshipClass
Parameters:
originObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
destinationObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRelationship
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteRelationship

public void deleteRelationship(IObject originObject,
                               IObject destinationObject)
                        throws IOException,
                               AutomationException
Deletes the relationship that associates the two specified objects.

Remarks

The DeleteRelationship method deletes the relationship between the origin object and destination object specified in the parameters. This will remove the entry for this relationship from the relationship class.

This method should be called within an edit session.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

ITable pOriginTable = new ITableProxy(pFeatureWorkspace.openTable("origintable"));

ITable pDestinationTable = new ITableProxy(pFeatureWorkspace.openTable("destinationtable"));

IFeature pOriginFeature = new IFeatureProxy(pOriginTable.getRow(2));

IFeature pDestinationFeature = new IFeatureProxy(pDestinationTable.getRow(2));

pRelationshipClass.deleteRelationship(pOriginFeature, pDestinationFeature);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteRelationship in interface IRelationshipClass
Parameters:
originObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
destinationObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObjectsRelatedToObject

public ISet getObjectsRelatedToObject(IObject anObject)
                               throws IOException,
                                      AutomationException
Gets the objects that are related to the specified object.

Remarks

The GetObjectsRelatedToObject method returns a set of Objects (or subtypes of Object, such as features) that are related to the anObject object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getObjectsRelatedToObject in interface IRelationshipClass
Parameters:
anObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
Returns:
A reference to a com.esri.arcgis.system.ISet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRelationshipsForObject

public IEnumRelationship getRelationshipsForObject(IObject anObject)
                                            throws IOException,
                                                   AutomationException
Get all relationships that apply to a specified object.

Remarks

The GetRelationshipsForObject method returns an IEnumRelationship enumerator containing the relationships that the anObject parameter participates in.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRelationshipsForObject in interface IRelationshipClass
Parameters:
anObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumRelationship
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteRelationshipsForObject

public void deleteRelationshipsForObject(IObject anObject)
                                  throws IOException,
                                         AutomationException
Deletes all relationships that apply to a specified object.

Remarks

The DeleteRelationshipsForObject method is used for removing all of the relationships in the relationship class that the specified object belongs to. Note that this method is bi-directional; the specified object could belong to the origin class or destination class.

This method should be called within an edit session.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

ITable pOriginTable = new ITableProxy(pFeatureWorkspace.openTable("origintable"));

IFeature pOriginFeature = new IFeatureProxy(pOriginTable.getRow(2));

pRelationshipClass.DeleteRelationshipsForObject(pOriginFeature)

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteRelationshipsForObject in interface IRelationshipClass
Parameters:
anObject - A reference to a com.esri.arcgis.geodatabase.IObject (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObjectsRelatedToObjectSet

public ISet getObjectsRelatedToObjectSet(ISet anObjectSet)
                                  throws IOException,
                                         AutomationException
Gets the objects that are related to the specified origin or destination object set.

Remarks

The GetObjectsRelatedToObjectSet method returns a set of objects that are related to the objects contained by the anObjectSet parameter. It behaves the same as GetObjectsRelatedToObject, except that it accepts a set of objects as a parameter.

If multiple objects in the input set are related to a common object, that object will only be included once in the returned set.

If the input set is constructed with a cursor, ensure that a non-recycling cursor is used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getObjectsRelatedToObjectSet in interface IRelationshipClass
Parameters:
anObjectSet - A reference to a com.esri.arcgis.system.ISet (in)
Returns:
A reference to a com.esri.arcgis.system.ISet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRelationshipsForObjectSet

public IEnumRelationship getRelationshipsForObjectSet(ISet anObjectSet)
                                               throws IOException,
                                                      AutomationException
Get all relationships that apply to the specified origin or destination object set.

Remarks

The GetRelationshipsForObjectSet method returns an IEnumRelationship enumerator containing the relationships that the objects in anObjectSet parameter participate in.

If the input set is constructed with a cursor, ensure that a non-recycling cursor is used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRelationshipsForObjectSet in interface IRelationshipClass
Parameters:
anObjectSet - A reference to a com.esri.arcgis.system.ISet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumRelationship
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObjectsMatchingObjectSet

public IRelClassEnumRowPairs getObjectsMatchingObjectSet(ISet srcObjectSet)
                                                  throws IOException,
                                                         AutomationException
Gets rows pairs of objects that are related to the specified origin or destination object set.

Remarks

The GetObjectsMatchingObjectSet method returns an enumerator of related object pairs based on the object set provided as a parameter. The enumerator contains a related object pair for each relationship participated in by the input objects. For example, in a relationship class with 1:1 cardinality, passing three objects into this method will return three related object pairs, assuming all three objects participate in a relationship. In a relationship class with 1:M or M:N cardinality, passing in a single object could conceivably result in an enumerator with multiple related object pairs, if the object participates in several relationships.

If the input set is constructed with a cursor, ensure that a non-recycling cursor is used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getObjectsMatchingObjectSet in interface IRelationshipClass
Parameters:
srcObjectSet - A reference to a com.esri.arcgis.system.ISet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRelClassEnumRowPairs
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteRelationshipsForObjectSet

public void deleteRelationshipsForObjectSet(ISet anObjectSet)
                                     throws IOException,
                                            AutomationException
Deletes all relationships that apply to the specified origin or destination object set.

Remarks

The DeleteRelationshipsForObjectSet method is used for removing all relationships in a particular relationship class for the specified set of objects.

This method works in the same way as the DeleteRelationshipsForObject method, except on a set of objects rather than a single one. If a cursor is used to populate the set with objects, ensure that a non-recycling cursor is used.

This method should be called within an edit session.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

ITable pOriginTable = new ITableProxy(pFeatureWorkspace.openTable("origintable"));

IFeature pOriginFeature = new IFeatureProxy(pOriginTable.getRow(2));

ISet pVSet = new  ISet();

pVSet.add(pOriginTable.getRow(1));

pVSet.add(pOriginTable.getRow(2));

pVSet.add(pOriginTable.getRow(3));

pVSet.reset();

pRelationshipClass.deleteRelationshipsForObjectSet(pVSet);

pVSet = null;

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteRelationshipsForObjectSet in interface IRelationshipClass
Parameters:
anObjectSet - A reference to a com.esri.arcgis.system.ISet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRelationshipRules

public IEnumRule getRelationshipRules()
                               throws IOException,
                                      AutomationException
The relationship rules that apply to this relationship class.

Remarks

The RelationshipRules property retrieves the relationship rules of the relationship class as an IEnumRule enumerator. These rules are used to control which object subtypes from the origin class can be related to which object subtypes in the destination class. They can also be used to specify a valid cardinality range for all permissable subtype pairs. For example, in a feature class containing utility poles divided into wooden and steel subtypes, relationship rules could be used to specify that wooden poles may have one to three transformers attached, but steel poles may have one to five transformers attached.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

IEnumRule pEnumRule = pRelationshipClass.getRelationshipRules();

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRelationshipRules in interface IRelationshipClass
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumRule
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addRelationshipRule

public void addRelationshipRule(IRule rule)
                         throws IOException,
                                AutomationException
Adds a relationship rule to this relationship class.

Remarks

The AddRelationshipRule method adds a new relationship rule to the relationship class. Relationship classes can have an associated set of relationship rules. These rules are used to control which object subtypes from the origin class can be related to which object subtypes in the destination class. They can also be used to specify a valid cardinality range for all permissable subtype pairs. For example, in a feature class containing utility poles divided into wooden and steel subtypes, relationship rules could be used to specify that wooden poles may have one to three transformers attached, but steel poles may have one to five transformers attached.

Example:

IRelationshipClass pRelationshipClass = null;

pRelationshipClass = pFeatureWorkspace.openRelationshipClass("relclass");

IFeatureClass pPoleFeatureClass = null;

IFeatureClass pPoleFeatureClass = new

IFeatureClassProxy(pFeatureWorkspace.OpenFeatureClass("poles"));

IFeatureClass pTransFeatureClass = null;

IFeatureClass pTransFeatureClass = new

IFeatureClassProxy(pFeatureWorkspace.OpenFeatureClass("transformers"));

IRelationshipRule pRelationshipRule = null;

IRelationshipRule pRelationshipRule = new RelationshipRule();

pRelationshipRule.setDestinationClassID(pTransFeatureClass.getObjectClassID());

pRelationshipRule.setDestinationSubtypeCode (178);

pRelationshipRule.setDestinationMaximumCardinality ( 1);

pRelationshipRule.setDestinationMinimumCardinality ( 5);

pRelationshipRule.setOriginClassID(pPoleFeatureClass.getObjectClassID());

pRelationshipRule.setOriginSubtypeCode ( 101);

pRelationshipRule.setOriginMaximumCardinality ( 1);

pRelationshipRule.setOriginMinimumCardinality ( 1);

pRelationshipClass.addRelationshipRule(pRelationshipRule);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addRelationshipRule in interface IRelationshipClass
Parameters:
rule - A reference to a com.esri.arcgis.geodatabase.IRule (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteRelationshipRule

public void deleteRelationshipRule(IRule rule)
                            throws IOException,
                                   AutomationException
Deletes a relationship rule from this relationship class.

Remarks

The DeleteRelationshipRule method deletes a relationship rule from the relationship class. Relationship classes can have an associated set of relationship rules. These rules are used to control which object subtypes from the origin class can be related to which object subtypes in the destination class. They can also be used to specify a valid cardinality range for all permissable subtype pairs. For example, in a feature class containing utility poles divided into wooden and steel subtypes, relationship rules could be used to specify that wooden poles may have one to three transformers attached, but steel poles may have one to five transformers attached.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteRelationshipRule in interface IRelationshipClass
Parameters:
rule - A reference to a com.esri.arcgis.geodatabase.IRule (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getName

public String getName()
               throws IOException,
                      AutomationException
The name of the Dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getName in interface IDataset
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFullName

public IName getFullName()
                  throws IOException,
                         AutomationException
The associated name object.

Remarks

The FullName property returns a Name object for the dataset. The Name object can be persisted and provides a way to get back to the dataset in a future session of the application, via the Open method on the Name object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFullName in interface IDataset
Returns:
A reference to a com.esri.arcgis.system.IName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBrowseName

public String getBrowseName()
                     throws IOException,
                            AutomationException
The browse name of the dataset.

Remarks

BrowseName returns file names without their extension. For example, States.shp would appear as States.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getBrowseName in interface IDataset
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setBrowseName

public void setBrowseName(String name)
                   throws IOException,
                          AutomationException
The browse name of the dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setBrowseName in interface IDataset
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

public int getType()
            throws IOException,
                   AutomationException
The type of the Dataset.

Remarks

The Type property returns the an esriDatasetType value indicating the dataset type, such as esriDTTable or esriDTFeatureClass.

Example:


// Assume we have a reference to an IfeatureClass (pFeatureClass) IDataset pDataset = null;
pDataset = new IDatasetProxy(pFeatureClass);
System.out.println(pDataset.getName() + " " + pDataset.getType());
if(pFeatureClass != null){
pDataset = pFeatureClass.getFeatureDataset();
System.out.println(pDataset.getName() + " " + pDataset.getType());
}
pDataset = new IDatasetProxy(pDataset.getWorkspace());
System.out.println(pDataset.getName() + " " +
pDataset.getType());

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getType in interface IDataset
Returns:
A com.esri.arcgis.geodatabase.esriDatasetType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCategory

public String getCategory()
                   throws IOException,
                          AutomationException
The category of the dataset.

Remarks

IDataset::Category returns a description of the category of the dataset. The description returned from the Category property is the same value that is displayed in the Type column within the Contents tab in ArcCatalog. The value will contain a description of the dataset such as "Topology" prefixed with a description of the type of workspace containing the dataset such as "File Geodatabase".

The description returned from IDataset::Category may change between releases of ArcGIS. In addition to this, returned strings are localized, meaning that code relying on a specific string being provided may fail when deployed with a different version of ArcGIS than it was developed with, or when deployed to a client using a different language than it was developed with.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCategory in interface IDataset
Returns:
The category
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubsets

public IEnumDataset getSubsets()
                        throws IOException,
                               AutomationException
Datasets contained within this dataset.

Description

The Subsets property returns other Dataset objects contained in this dataset.

Remarks

IDataset::Subsets is not supported for Graph objects such as a Geometric Network. To return the feature classes contained in a Geometric Network, use the IFeatureClassContainer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSubsets in interface IDataset
Returns:
A reference to a com.esri.arcgis.geodatabase.IEnumDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWorkspace

public IWorkspace getWorkspace()
                        throws IOException,
                               AutomationException
The workspace containing this dataset.

Description

The Workspace property returns the containing workspace for this dataset.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getWorkspace in interface IDataset
Returns:
A reference to a com.esri.arcgis.geodatabase.IWorkspace
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPropertySet

public IPropertySet getPropertySet()
                            throws IOException,
                                   AutomationException
The set of properties for the dataset.

Description

The PropertySet property is used to return any additional intrinsic properties (but not metadata properties) that may apply to the dataset. One use of this property is to distinguish between the types of File Geodatabase datafile formats. If called on a Feature Class or Table in a File Geodatabase the Datafile Format property can either be esriFGDBStandardDatafile or esriFGDBCompressedDatafile.

Most datasets do not implement this property and will either raise an error or return a null value if it's called. There are a handful of exceptions that will return property sets; these include the datasets from file geodatabases (as mentioned above) and coverages.

Remarks

Examples of intrinsic properties for which explicit methods exist include the SpatialReference and the Extent methods available on the IGeoDataset interface. In most cases this PropertySet will be empty.

IDataset::PropertySet is not supported for Graph objects such as a Geometric Network.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getPropertySet in interface IDataset
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canCopy

public boolean canCopy()
                throws IOException,
                       AutomationException
True if this dataset can be copied.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

The CanCopy method is supported by:

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canCopy in interface IDataset
Returns:
The canCopy
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

copy

public IDataset copy(String copyName,
                     IWorkspace copyWorkspace)
              throws IOException,
                     AutomationException
Copies this dataset to a new dataset with the specified name.

Remarks

IDataset::Copy should only be used with datasets from file-based data sources, such as shapefiles and coverages.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
copy in interface IDataset
Parameters:
copyName - The copyName (in)
copyWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canDelete

public boolean canDelete()
                  throws IOException,
                         AutomationException
True if this dataset can be deleted.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canDelete in interface IDataset
Returns:
The canDelete
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

delete

public void delete()
            throws IOException,
                   AutomationException
Deletes this dataset.

Remarks

Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
delete in interface IDataset
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canRename

public boolean canRename()
                  throws IOException,
                         AutomationException
True if this dataset can be renamed.

Remarks

The CanCopy, CanDelete, and CanRename properties are meant to be used in conjunction with the Copy, Delete, and Rename methods and signify whether a dataset is supported by these methods. For example, you may not delete or rename a network feature class nor can you use the Copy method on a Geodatabase feature class. To copy Geodatabase datasets, including feature classes, geometric networks, topologies, etc., use the IGeoDBDataTransfer interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canRename in interface IDataset
Returns:
The canRename
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rename

public void rename(String name)
            throws IOException,
                   AutomationException
Renames this Dataset.

Remarks

IDataset::Rename does not support the renaming of Graph objects such as a Geometric Network. In addition, certain feature classes, such as network feature classes, cannot be renamed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
rename in interface IDataset
Parameters:
name - The name (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObjectsMatchingObjectSetEx

public IRelClassEnumRowPairs getObjectsMatchingObjectSetEx(ISet srcObjectSet,
                                                           IQueryFilter queryFilterAppliedToMatchingObjects,
                                                           boolean returnAllObjectMatches)
                                                    throws IOException,
                                                           AutomationException
Gets rows pairs of objects that are related to the specified origin or destination object set, that also meet the query filter expression.

Remarks

The returnAllObjectMatches parameter indicates whether the first matching object or if all matching objects are returned. A value of True will return all object matches.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getObjectsMatchingObjectSetEx in interface IRelationshipClass2
Parameters:
srcObjectSet - A reference to a com.esri.arcgis.system.ISet (in)
queryFilterAppliedToMatchingObjects - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
returnAllObjectMatches - The returnAllObjectMatches (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRelClassEnumRowPairs
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getObjectsMatchingObjectArray

public IRelClassEnumRowPairs getObjectsMatchingObjectArray(IArray srcObjectArray,
                                                           IQueryFilter queryFilterAppliedToMatchingObjects,
                                                           boolean returnAllObjectMatches)
                                                    throws IOException,
                                                           AutomationException
Gets rows pairs of objects that are related to the specified origin or destination object array, that also meet the query filter expression.

Remarks

The returnAllObjectMatches parameter indicates whether the first matching object or if all matching objects are returned. A value of True will return all object matches.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getObjectsMatchingObjectArray in interface IRelationshipClass2
Parameters:
srcObjectArray - A reference to a com.esri.arcgis.system.IArray (in)
queryFilterAppliedToMatchingObjects - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
returnAllObjectMatches - The returnAllObjectMatches (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRelClassEnumRowPairs
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createRow

public IRow createRow()
               throws IOException,
                      AutomationException
Creates a row in the database with a system assigned object ID and null property values.

Remarks

The CreateRow method creates a new row in the underlying database with a system assigned object id value. A row object representing the created row is returned to the caller. The row object returned has the system assigned object ID as the value of the OIDField. All other fields are initialized to null values if they can be made null and to built-in default values appropriate to the type of the field if they cannot be made null.

The caller is responsible for setting the desired field values into the row and calling the Store method on the row. If the table represents an object class with subtypes, then it is the caller’s responsibility to set the default subtype code into the row and call the InitDefaultValues method on the row before storing, if that is the desired result. For tables without object behavior, insert cursors offer a more efficient way for inserting new rows.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createRow in interface ITable
Returns:
A reference to a com.esri.arcgis.geodatabase.IRow
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRow

public IRow getRow(int oID)
            throws IOException,
                   AutomationException
The row from the database with the specified object ID.

Remarks

The GetRow method returns an existing row object, given its object ID value. The caller can query the returned row object for additional object specific interfaces. The retrieved row may be modified; calling Store on the row object after changing it will trigger messages to related objects and will mark the row for committing to the database.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getRow in interface ITable
Parameters:
oID - The oID (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRow
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRows

public ICursor getRows(Object oids,
                       boolean recycling)
                throws IOException,
                       AutomationException
The cursor of rows based on a set of object ids.

Remarks

The GetRows method returns a cursor that may be used to retrieve a set of rows specified by the input array of object id values. See the description of the Search method to understand the meaning of the recycling parameter. It is far more efficient to retrieve a set of rows using the GetRows method than it is to retrieve each individual row using the GetRow method. The retrieved rows may be modified; Store should be called on the row objects after changing them.

The oids parameter should be passed an integer array. For example:

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

// Get a recycling cursor for the OID array.

int[] oids = new int[] { 10844, 10853, 10871 };

ICursor cursor = table.getRows(oids, true);

Specified by:
getRows in interface ITable
Parameters:
oids - A Variant (in)
recycling - The recycling (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ICursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

createRowBuffer

public IRowBuffer createRowBuffer()
                           throws IOException,
                                  AutomationException
Creates a row buffer that can be used with an insert cursor.

Remarks

The CreateRowBuffer method creates a new row buffer object in memory and returns it to the caller. No row is created in the database. The returned row buffer does not have an object ID value. The caller can set values into the row buffer and use it as an argument to the InsertRow method on an insert cursor; the latter is obtained by calling the Insert method on the Table.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
createRowBuffer in interface ITable
Returns:
A reference to a com.esri.arcgis.geodatabase.IRowBuffer
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

updateSearchedRows

public void updateSearchedRows(IQueryFilter queryFilter,
                               IRowBuffer buffer)
                        throws IOException,
                               AutomationException
Update the Rows in the database selected by the specified query.

Description

This method will edit the rows matching the query filter's constraints. The values in each row will be replaced with the corresponding field's value in the provided row buffer. The fields being edited should be specified in the query filter's SubFields property. If the row buffer contains null values, and the SubFields property is not properly set, the row's values will be overwritten with the row buffer's null values.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
updateSearchedRows in interface ITable
Parameters:
queryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
buffer - A reference to a com.esri.arcgis.geodatabase.IRowBuffer (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteSearchedRows

public void deleteSearchedRows(IQueryFilter queryFilter)
                        throws IOException,
                               AutomationException
Delete the Rows in the database selected by the specified query.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteSearchedRows in interface ITable
Parameters:
queryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rowCount

public int rowCount(IQueryFilter queryFilter)
             throws IOException,
                    AutomationException
The number of Rows selected by the specified query.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
rowCount in interface ITable
Parameters:
queryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
Returns:
The numRows
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

ITable_search

public ICursor ITable_search(IQueryFilter queryFilter,
                             boolean recycling)
                      throws IOException,
                             AutomationException
An object cursor that can be used to fetch row objects selected by the specified query.

Product Availability

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

Specified by:
ITable_search in interface ITable
Parameters:
queryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
recycling - The recycling (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ICursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

update

public ICursor update(IQueryFilter queryFilter,
                      boolean recycling)
               throws IOException,
                      AutomationException
Returns a cursor that can be used to update Rows selected by the specified query.

Remarks

The Update method returns an update cursor that can be used to update or delete rows. It offers somewhat faster performance than multiple calls to Store or Delete on row objects fetched using a non-recycling search cursor for tables storing simple rows and simple features. There is no difference in performance for complex objects and features.

When using cursors within an edit session, they should always be scoped to edit operations. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
update in interface ITable
Parameters:
queryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
recycling - The recycling (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ICursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insert

public ICursor insert(boolean useBuffering)
               throws IOException,
                      AutomationException
Returns a cursor that can be used to insert new Rows.

Remarks

The Insert method returns an insert cursor that can be used to bulk insert rows. It offers significantly faster performance than multiple calls to CreateRow and Store for tables storing simple rows and simple features (that is, for tables whose CLSID is esriGeoDatabase.Row, esriGeoDatabase.Object, or esriGeoDatabase.Feature).

Insert cursors on tables containing complex objects use the CreateRow and Store methods to achieve polymorphism, and there is no difference in performance in these cases.

When using cursors within an edit session, they should always be scoped to edit operations. In other words, a cursor should be created after an edit operation has begun and should not be used once that edit operation has been stopped or aborted.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
insert in interface ITable
Parameters:
useBuffering - The useBuffering (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ICursor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

select

public ISelectionSet select(IQueryFilter queryFilter,
                            int selType,
                            int selOption,
                            IWorkspace selectionContainer)
                     throws IOException,
                            AutomationException
A selection that contains the object ids selected by the specified query.

Remarks

The Select method returns a selection set that holds either row IDs or row objects from the Table depending on the selection option. Multiple selection sets can be created on the same table. It is up to a client application or object to keep a reference on created selections and use them as appropriate. For example, a FeatureLayer creates and uses selections on a FeatureClass (a type of Table).

The selType parameter determines the type of selection set that will be created: an ID set, a snapshot, or a hybrid. See the ISelectionSet interface for a comparison of the three types.

When calling Select the selectionContainer parameter is no longer required. A null value should be passed as this parameter.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
select in interface ITable
Parameters:
queryFilter - A reference to a com.esri.arcgis.geodatabase.IQueryFilter (in)
selType - A com.esri.arcgis.geodatabase.esriSelectionType constant (in)
selOption - A com.esri.arcgis.geodatabase.esriSelectionOption constant (in)
selectionContainer - A reference to a com.esri.arcgis.geodatabase.IWorkspace (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.ISelectionSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findField

public int findField(String name)
              throws IOException,
                     AutomationException
The index of the field with the specified name.

Remarks

If FindField returns -1, the Field could not be found in the Fields collection.

Developers working with SDE should be aware of qualified field names and their impact on calls to FindField. For more information, see the IFields2 interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findField in interface IClass
Parameters:
name - The name (in)
Returns:
The fieldIndex
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFields

public IFields getFields()
                  throws IOException,
                         AutomationException
The fields collection for this object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFields in interface IClass
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIndexes

public IIndexes getIndexes()
                    throws IOException,
                           AutomationException
The indexes collection for this object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getIndexes in interface IClass
Returns:
A reference to a com.esri.arcgis.geodatabase.IIndexes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addField

public void addField(IField field)
              throws IOException,
                     AutomationException
Adds a field to this object class.

Remarks

Prior to adding a new field to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.

Attempting to add a new field that does not allow null values will fail, if the class already has data in it. The only solution is to recreate the class with the non-nullable field, then copy the rows from the original class into the new class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addField in interface IClass
Parameters:
field - A reference to a com.esri.arcgis.geodatabase.IField (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteField

public void deleteField(IField field)
                 throws IOException,
                        AutomationException
Deletes a field from this object class.

Remarks

DeleteField removes the specified field from a table, object class or feature class. Fields that are required by the Geodatabase and cannot be removed include:

Prior to deleting a field from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.

Example:

// Assume we have a reference to a FeatureClass (pFC)

      IFields pFields;

      IField pField;



      pFields = pFC.getFields();

      pField = pFields.getField(pFields.findField("MyField"));



      pFC.deleteField(pField);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteField in interface IClass
Parameters:
field - A reference to a com.esri.arcgis.geodatabase.IField (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addIndex

public void addIndex(IIndex index)
              throws IOException,
                     AutomationException
Adds an index to this object class.

Remarks

Prior to adding a new index to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addIndex in interface IClass
Parameters:
index - A reference to a com.esri.arcgis.geodatabase.IIndex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteIndex

public void deleteIndex(IIndex index)
                 throws IOException,
                        AutomationException
Deletes an index from this object class.

Remarks

Prior to deleting an index from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteIndex in interface IClass
Parameters:
index - A reference to a com.esri.arcgis.geodatabase.IIndex (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasOID

public boolean isHasOID()
                 throws IOException,
                        AutomationException
Indicates if the class has an object identity (OID) field.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isHasOID in interface IClass
Returns:
The hasOID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOIDFieldName

public String getOIDFieldName()
                       throws IOException,
                              AutomationException
The name of the field corresponding to the OID.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getOIDFieldName in interface IClass
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCLSID

public IUID getCLSID()
              throws IOException,
                     AutomationException
The GUID for the COM Class (CoClass) corresponding to instances of this object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCLSID in interface IClass
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEXTCLSID

public IUID getEXTCLSID()
                 throws IOException,
                        AutomationException
The GUID for the COM Class (CoClass) corresponding to the class extension for this object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getEXTCLSID in interface IClass
Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtension

public Object getExtension()
                    throws IOException,
                           AutomationException
The extension for this object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtension in interface IClass
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtensionProperties

public IPropertySet getExtensionProperties()
                                    throws IOException,
                                           AutomationException
The extension properties for this object class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtensionProperties in interface IClass
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanSelect

public boolean isCanSelect()
                    throws IOException,
                           AutomationException
Indicates if the table supports selection.

Remarks

Use CanSelect to determine if you can open a selection set on the table. A situation where CanSelect will be False is a standalone database table without an OID column.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanSelect in interface ITableCapabilities
Returns:
The canSelect
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isBeingEdited

public boolean isBeingEdited()
                      throws IOException,
                             AutomationException
True if the dataset is being edited.

Remarks

Once an edit session has been started on a workspace, the IsBeingEdited method on the IDatasetEdit interface can be used to determine if a particular dataset is participating in the edit session.

The reasons why a dataset may not participate include the connected user has no privileges or permission to edit the dataset, the connected user is not licensed to edit this type of dataset, or the dataset is not versioned but a versioned edit session has been started (or vice versa).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isBeingEdited in interface IDatasetEdit
Returns:
The pIsBeingEdited
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanEdit

public boolean isCanEdit()
                  throws IOException,
                         AutomationException
True if the dataset supports edit sessions with the ability to discard edits on save.

Remarks

This property is to be used within an active edit session, results cannot be guaranteed if called on a dataset outside of an edit session.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanEdit in interface IDatasetEditInfo
Returns:
The pCanEdit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanUndo

public boolean isCanUndo()
                  throws IOException,
                         AutomationException
True if the dataset supports edit sessions with the ability to undo individual edit operations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanUndo in interface IDatasetEditInfo
Returns:
The pCanUndo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isCanRedo

public boolean isCanRedo()
                  throws IOException,
                         AutomationException
True if the dataset supports edit sessions with the ability to redo undone operations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isCanRedo in interface IDatasetEditInfo
Returns:
The pCanUndo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

alterForwardPathLabel

public void alterForwardPathLabel(String forwardLabel)
                           throws IOException,
                                  AutomationException
Changes the forward path label for this relationship class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
alterForwardPathLabel in interface IRelClassSchemaEdit
Parameters:
forwardLabel - The forwardLabel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

alterBackwardPathLabel

public void alterBackwardPathLabel(String backwardLabel)
                            throws IOException,
                                   AutomationException
Changes the backward path label for this relationship class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
alterBackwardPathLabel in interface IRelClassSchemaEdit
Parameters:
backwardLabel - The backwardLabel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

alterIsComposite

public void alterIsComposite(boolean isComposite)
                      throws IOException,
                             AutomationException
Changes the type of this relationship class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
alterIsComposite in interface IRelClassSchemaEdit
Parameters:
isComposite - The isComposite (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.