Class AttributedRelationshipClassClass
- Namespace
- ESRI.ArcGIS.Geodatabase
- Assembly
- ESRI.Server.Geodatabase.dll
[Guid("AF10D71E-A61B-11D4-A64C-0008C711C8C1")]
[ClassInterface(ClassInterfaceType.None)]
public class AttributedRelationshipClassClass : AttributedRelationshipClass, IDataset, IRelationshipClass2, IRelationshipClass, ITable, IClass, ITableCapabilities, IDatasetEdit, IDatasetEditInfo, IRelClassSchemaEdit
- Inheritance
-
AttributedRelationshipClassClass
- Implements
- Inherited Members
Explicit Interface Implementations
AddField(IField)
virtual void AddField(IField Field)
Parameters
FieldIField
AddIndex(IIndex)
virtual void AddIndex(IIndex Index)
Parameters
IndexIIndex
AddRelationshipRule(IRule)
Adds a relationship rule to this relationship class.
virtual void AddRelationshipRule(IRule Rule)
Parameters
RuleIRule
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.
Below is a small C# code sample of how to add a relationship rule:
IFeatureClass originFeatureClass = featureWorkspace.OpenFeatureClass("us_counties");
IFeatureClass destFeatureClass = featureWorkspace.OpenFeatureClass("poles");
IRelationshipClass relationshipClass = featureWorkspace.OpenRelationshipClass("transformers");IRelationshipRule relationshipRule = (IRelationshipRule) new RelationshipRuleClass();
relationshipRule.DestinationClassID = destFeatureClass.ObjectClassID;
relationshipRule.DestinationSubtypeCode = 0;
relationshipRule.DestinationMaximumCardinality = 1;
relationshipRule.DestinationMinimumCardinality = 5;
relationshipRule.OriginClassID = originFeatureClass.ObjectClassID;
relationshipRule.OriginSubtypeCode = 0;
relationshipRule.OriginMaximumCardinality = 1;
relationshipRule.OriginMinimumCardinality = 1;relationshipClass.AddRelationshipRule(relationshipRule);
AlterBackwardPathLabel(string)
Changes the backward path label for this relationship class.
virtual void AlterBackwardPathLabel(string BackwardLabel)
Parameters
BackwardLabelstring
AlterForwardPathLabel(string)
Changes the forward path label for this relationship class.
virtual void AlterForwardPathLabel(string ForwardLabel)
Parameters
ForwardLabelstring
AlterIsComposite(bool)
Changes the type of this relationship class.
virtual void AlterIsComposite(bool IsComposite)
Parameters
IsCompositebool
BackwardPathLabel
The backward path label for the relationship class.
virtual string BackwardPathLabel { get; }
Returns
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.
BrowseName
The browse name of the dataset.
virtual string BrowseName { get; set; }
Returns
Remarks
CLSID
virtual UID CLSID { get; }
Returns
CanCopy()
True if this dataset can be copied.
virtual bool CanCopy()
Returns
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:
- CAD Drawings
- Coverages
- DBase Tables
- Info Tables
- Raster Datasets
- SDC datasets
- SDC Network Datasets
- Shapefiles
- Shapefile Network Datasets
CanDelete()
True if this dataset can be deleted.
virtual bool CanDelete()
Returns
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.
CanEdit
True if the dataset supports edit sessions with the ability to discard edits on save.
virtual bool CanEdit { get; }
Returns
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.
CanRedo
True if the dataset supports edit sessions with the ability to redo undone operations.
virtual bool CanRedo { get; }
Returns
CanRename()
True if this dataset can be renamed.
virtual bool CanRename()
Returns
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.
CanSelect
Indicates if the table supports selection.
virtual bool CanSelect { get; }
Returns
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.
CanUndo
True if the dataset supports edit sessions with the ability to undo individual edit operations.
virtual bool CanUndo { get; }
Returns
Cardinality
The cardinality for the relationship class.
virtual esriRelCardinality Cardinality { get; }
Returns
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).
Category
The category of the dataset.
virtual string Category { get; }
Returns
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.
Copy(string, IWorkspace)
Copies this dataset to a new dataset with the specified name.
virtual IDataset Copy(string copyName, IWorkspace copyWorkspace)
Parameters
copyNamestringcopyWorkspaceIWorkspace
Returns
Remarks
IDataset::Copy should only be used with datasets from file-based data sources, such as shapefiles and coverages.
CreateRelationship(IObject, IObject)
Creates a new relationship between the two specified objects.
virtual IRelationship CreateRelationship(IObject OriginObject, IObject DestinationObject)
Parameters
Returns
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.
CreateRow()
Creates a row in the database with a system assigned object ID and null property values.
virtual IRow CreateRow()
Returns
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.
CreateRowBuffer()
Creates a row buffer that can be used with an insert cursor.
virtual IRowBuffer CreateRowBuffer()
Returns
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.
Delete()
Deletes this dataset.
virtual void Delete()
Remarks
Certain feature classes, such as network and topology feature classes, cannot be deleted until their containing objects are deleted.
DeleteField(IField)
virtual void DeleteField(IField Field)
Parameters
FieldIField
DeleteIndex(IIndex)
virtual void DeleteIndex(IIndex Index)
Parameters
IndexIIndex
DeleteRelationship(IObject, IObject)
Deletes the relationship that associates the two specified objects.
virtual void DeleteRelationship(IObject OriginObject, IObject DestinationObject)
Parameters
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.
DeleteRelationshipRule(IRule)
Deletes a relationship rule from this relationship class.
virtual void DeleteRelationshipRule(IRule Rule)
Parameters
RuleIRule
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.
DeleteRelationshipsForObject(IObject)
Deletes all relationships that apply to a specified object.
virtual void DeleteRelationshipsForObject(IObject anObject)
Parameters
anObjectIObject
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.
DeleteRelationshipsForObjectSet(ISet)
Deletes all relationships that apply to the specified origin or destination object set.
virtual void DeleteRelationshipsForObjectSet(ISet anObjectSet)
Parameters
anObjectSetISet
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.
//e.g., nameOfRelClass = "relclass"
// nameOfOriginTable = "origintable"
public void IRelationshipClass__DeleteRelationshipsForObjectSet(IWorkspace workspace, string nameOfRelClass, string nameOfOriginTable)
{
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;
IRelationshipClass relationshipClass = featureWorkspace.OpenRelationshipClass(nameOfRelClass);
ITable originTable = featureWorkspace.OpenTable(nameOfOriginTable);
ESRI.ArcGIS.esriSystem.ISet objectSet = new ESRI.ArcGIS.esriSystem.SetClass();
objectSet.Add(originTable.GetRow(1));
objectSet.Add(originTable.GetRow(2));
objectSet.Add(originTable.GetRow(3));
objectSet.Reset();
IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace;
workspaceEdit.StartEditing(true);
workspaceEdit.StartEditOperation();
relationshipClass.DeleteRelationshipsForObjectSet(objectSet);
workspaceEdit.StopEditOperation();
workspaceEdit.StopEditing(true);
objectSet = null;
}
DeleteSearchedRows(IQueryFilter)
Delete the Rows in the database selected by the specified query.
virtual void DeleteSearchedRows(IQueryFilter QueryFilter)
Parameters
QueryFilterIQueryFilter
DestinationClass
The destination object class.
virtual IObjectClass DestinationClass { get; }
Returns
DestinationForeignKey
The relationship destination foreign Key.
virtual string DestinationForeignKey { get; }
Returns
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.
DestinationPrimaryKey
The relationship destination primary Key.
virtual string DestinationPrimaryKey { get; }
Returns
EXTCLSID
virtual UID EXTCLSID { get; }
Returns
Extension
virtual object Extension { get; }
Returns
ExtensionProperties
virtual IPropertySet ExtensionProperties { get; }
Returns
FeatureDataset
The feature dataset, if any, to which this relationship class belongs.
virtual IFeatureDataset FeatureDataset { get; }
Returns
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.
Fields
virtual IFields Fields { get; }
Returns
FindField(string)
virtual int FindField(string Name)
Parameters
Namestring
Returns
ForwardPathLabel
The forward path label for the relationship class.
virtual string ForwardPathLabel { get; }
Returns
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.
FullName
The associated name object.
virtual IName FullName { get; }
Returns
Remarks
GetObjectsMatchingObjectArray(IArray, IQueryFilter, bool)
Gets rows pairs of objects that are related to the specified origin or destination object array, that also meet the query filter expression.
virtual IRelClassEnumRowPairs GetObjectsMatchingObjectArray(IArray srcObjectArray, IQueryFilter queryFilterAppliedToMatchingObjects, bool returnAllObjectMatches)
Parameters
srcObjectArrayIArrayqueryFilterAppliedToMatchingObjectsIQueryFilterreturnAllObjectMatchesbool
Returns
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.
GetObjectsMatchingObjectSet(ISet)
Gets rows pairs of objects that are related to the specified origin or destination object set.
virtual IRelClassEnumRowPairs GetObjectsMatchingObjectSet(ISet srcObjectSet)
Parameters
srcObjectSetISet
Returns
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.
GetObjectsMatchingObjectSetEx(ISet, IQueryFilter, bool)
Gets rows pairs of objects that are related to the specified origin or destination object set, that also meet the query filter expression.
virtual IRelClassEnumRowPairs GetObjectsMatchingObjectSetEx(ISet srcObjectSet, IQueryFilter queryFilterAppliedToMatchingObjects, bool returnAllObjectMatches)
Parameters
srcObjectSetISetqueryFilterAppliedToMatchingObjectsIQueryFilterreturnAllObjectMatchesbool
Returns
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.
GetObjectsRelatedToObject(IObject)
Gets the objects that are related to the specified object.
virtual ISet GetObjectsRelatedToObject(IObject anObject)
Parameters
anObjectIObject
Returns
Remarks
The GetObjectsRelatedToObject method returns a set of Objects (or subtypes of Object, such as features) that are related to the anObject object.
GetObjectsRelatedToObjectSet(ISet)
Gets the objects that are related to the specified origin or destination object set.
virtual ISet GetObjectsRelatedToObjectSet(ISet anObjectSet)
Parameters
anObjectSetISet
Returns
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.
//e.g., nameOfRelClass = "relclass"
// nameOfOriginTable = "origintable"
public void IRelationshipClass__GetObjectsRelatedToObjectSet(IWorkspace workspace, string nameOfRelClass, string nameOfOriginTable)
{
IFeatureWorkspace featureWorkspace = (IFeatureWorkspace)workspace;
IRelationshipClass relationshipClass = featureWorkspace.OpenRelationshipClass(nameOfRelClass);
ITable originTable = featureWorkspace.OpenTable(nameOfOriginTable);
ESRI.ArcGIS.esriSystem.ISet objectSet = new ESRI.ArcGIS.esriSystem.SetClass();
objectSet.Add(originTable.GetRow(1));
objectSet.Add(originTable.GetRow(2));
objectSet.Add(originTable.GetRow(3));
objectSet.Reset();
ESRI.ArcGIS.esriSystem.ISet resultSet = relationshipClass.GetObjectsRelatedToObjectSet(objectSet);
objectSet = null;
}
GetRelationship(IObject, IObject)
Get the relationship that associates the two specified objects.
virtual IRelationship GetRelationship(IObject OriginObject, IObject DestinationObject)
Parameters
Returns
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.
GetRelationshipsForObject(IObject)
Get all relationships that apply to a specified object.
virtual IEnumRelationship GetRelationshipsForObject(IObject anObject)
Parameters
anObjectIObject
Returns
Remarks
The GetRelationshipsForObject method returns an IEnumRelationship enumerator containing the relationships that the anObject parameter participates in.
GetRelationshipsForObjectSet(ISet)
Get all relationships that apply to the specified origin or destination object set.
virtual IEnumRelationship GetRelationshipsForObjectSet(ISet anObjectSet)
Parameters
anObjectSetISet
Returns
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.
GetRow(long)
The row from the database with the specified object ID.
virtual IRow GetRow(long OID)
Parameters
OIDlong
Returns
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.
GetRows(object, bool)
The cursor of rows based on a set of object ids.
virtual ICursor GetRows(object oids, bool Recycling)
Parameters
Returns
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:
// Get a recycling cursor for the OID array.
int[] oidArray = new int[] { 10844, 10853, 10871 };
ICursor cursor = table.GetRows(oidArray, true);
HasOID
virtual bool HasOID { get; }
Returns
IClass_AddField(IField)
Adds a field to this object class.
virtual void IClass_AddField(IField Field)
Parameters
FieldIField
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.
IClass_AddIndex(IIndex)
Adds an index to this object class.
virtual void IClass_AddIndex(IIndex Index)
Parameters
IndexIIndex
Remarks
Prior to adding a new index to a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
IClass_CLSID
The GUID for the COM Class (CoClass) corresponding to instances of this object class.
virtual UID IClass_CLSID { get; }
Returns
IClass_DeleteField(IField)
Deletes a field from this object class.
virtual void IClass_DeleteField(IField Field)
Parameters
FieldIField
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:
- OBJECTID field
- SHAPE and shape dependent fields such as SHAPE_Length
- Enabled, AncillaryRole and Weight field for network feature classes
- Subtype fields. In order to delete a subtype field, it must first be removed as the subtype field, see the help on ISubtypes::SubtypeFieldName
Prior to deleting a field from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
IClass_DeleteIndex(IIndex)
Deletes an index from this object class.
virtual void IClass_DeleteIndex(IIndex Index)
Parameters
IndexIIndex
Remarks
Prior to deleting an index from a class, an exclusive schema lock should be obtained using the ISchemaLock interface.
IClass_EXTCLSID
The GUID for the COM Class (CoClass) corresponding to the class extension for this object class.
virtual UID IClass_EXTCLSID { get; }
Returns
IClass_Extension
The extension for this object class.
virtual object IClass_Extension { get; }
Returns
IClass_ExtensionProperties
The extension properties for this object class.
virtual IPropertySet IClass_ExtensionProperties { get; }
Returns
IClass_Fields
The fields collection for this object class.
virtual IFields IClass_Fields { get; }
Returns
Remarks
<P>Each table in a database has an ordered collection of fields, there is always at least one field in a table. The ordered collection behaves like a list, so it is possible to access individual fields by a numbered position (or index) in the list.</P> <P>A <STRONG>Fields </STRONG>collection can also exist independently of a table, for example when creating an index on a table you will need to define which fields take part in the index. There are many interfaces which either require or return a <STRONG>Fields </STRONG>collection; these include <STRONG>IClass </STRONG>(therefore also <STRONG>IObjectClass </STRONG>and <STRONG>IFeatureClass</STRONG>), <STRONG>ICursor</STRONG>, <STRONG>IIndex</STRONG>, <STRONG>IFeatureClassDraw</STRONG>, <STRONG>IRowBuffer</STRONG>, <STRONG>ISimpleDataConverter</STRONG>, <STRONG>ITableSort </STRONG>and <STRONG>IValidate</STRONG>.</P>
IClass_FindField(string)
The index of the field with the specified name.
virtual int IClass_FindField(string Name)
Parameters
Namestring
Returns
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.
IClass_HasOID
Indicates if the class has an object identity (OID) field.
virtual bool IClass_HasOID { get; }
Returns
IClass_Indexes
The indexes collection for this object class.
virtual IIndexes IClass_Indexes { get; }
Returns
Remarks
<P>The <STRONG>Indexes </STRONG>object represents a collection of indexes on a table. Indexes are designed to improve access times to data. The <STRONG>Indexes </STRONG>collection object operates in a very similar way to the Fields collection object.</P>
IClass_OIDFieldName
The name of the field corresponding to the OID.
virtual string IClass_OIDFieldName { get; }
Returns
IRelationshipClass2_AddRelationshipRule(IRule)
virtual void IRelationshipClass2_AddRelationshipRule(IRule Rule)
Parameters
RuleIRule
IRelationshipClass2_BackwardPathLabel
virtual string IRelationshipClass2_BackwardPathLabel { get; }
Returns
IRelationshipClass2_Cardinality
virtual esriRelCardinality IRelationshipClass2_Cardinality { get; }
Returns
IRelationshipClass2_CreateRelationship(IObject, IObject)
virtual IRelationship IRelationshipClass2_CreateRelationship(IObject OriginObject, IObject DestinationObject)
Parameters
Returns
IRelationshipClass2_DeleteRelationship(IObject, IObject)
virtual void IRelationshipClass2_DeleteRelationship(IObject OriginObject, IObject DestinationObject)
Parameters
IRelationshipClass2_DeleteRelationshipRule(IRule)
virtual void IRelationshipClass2_DeleteRelationshipRule(IRule Rule)
Parameters
RuleIRule
IRelationshipClass2_DeleteRelationshipsForObject(IObject)
virtual void IRelationshipClass2_DeleteRelationshipsForObject(IObject anObject)
Parameters
anObjectIObject
IRelationshipClass2_DeleteRelationshipsForObjectSet(ISet)
virtual void IRelationshipClass2_DeleteRelationshipsForObjectSet(ISet anObjectSet)
Parameters
anObjectSetISet
IRelationshipClass2_DestinationClass
virtual IObjectClass IRelationshipClass2_DestinationClass { get; }
Returns
IRelationshipClass2_DestinationForeignKey
virtual string IRelationshipClass2_DestinationForeignKey { get; }
Returns
IRelationshipClass2_DestinationPrimaryKey
virtual string IRelationshipClass2_DestinationPrimaryKey { get; }
Returns
IRelationshipClass2_FeatureDataset
virtual IFeatureDataset IRelationshipClass2_FeatureDataset { get; }
Returns
IRelationshipClass2_ForwardPathLabel
virtual string IRelationshipClass2_ForwardPathLabel { get; }
Returns
IRelationshipClass2_GetObjectsMatchingObjectSet(ISet)
virtual IRelClassEnumRowPairs IRelationshipClass2_GetObjectsMatchingObjectSet(ISet srcObjectSet)
Parameters
srcObjectSetISet
Returns
IRelationshipClass2_GetObjectsRelatedToObject(IObject)
virtual ISet IRelationshipClass2_GetObjectsRelatedToObject(IObject anObject)
Parameters
anObjectIObject
Returns
IRelationshipClass2_GetObjectsRelatedToObjectSet(ISet)
virtual ISet IRelationshipClass2_GetObjectsRelatedToObjectSet(ISet anObjectSet)
Parameters
anObjectSetISet
Returns
IRelationshipClass2_GetRelationship(IObject, IObject)
virtual IRelationship IRelationshipClass2_GetRelationship(IObject OriginObject, IObject DestinationObject)
Parameters
Returns
IRelationshipClass2_GetRelationshipsForObject(IObject)
virtual IEnumRelationship IRelationshipClass2_GetRelationshipsForObject(IObject anObject)
Parameters
anObjectIObject
Returns
IRelationshipClass2_GetRelationshipsForObjectSet(ISet)
virtual IEnumRelationship IRelationshipClass2_GetRelationshipsForObjectSet(ISet anObjectSet)
Parameters
anObjectSetISet
Returns
IRelationshipClass2_IsAttributed
virtual bool IRelationshipClass2_IsAttributed { get; }
Returns
IRelationshipClass2_IsComposite
virtual bool IRelationshipClass2_IsComposite { get; }
Returns
IRelationshipClass2_Notification
virtual esriRelNotification IRelationshipClass2_Notification { get; }
Returns
IRelationshipClass2_OriginClass
virtual IObjectClass IRelationshipClass2_OriginClass { get; }
Returns
IRelationshipClass2_OriginForeignKey
virtual string IRelationshipClass2_OriginForeignKey { get; }
Returns
IRelationshipClass2_OriginPrimaryKey
virtual string IRelationshipClass2_OriginPrimaryKey { get; }
Returns
IRelationshipClass2_RelationshipClassID
virtual int IRelationshipClass2_RelationshipClassID { get; }
Returns
IRelationshipClass2_RelationshipRules
virtual IEnumRule IRelationshipClass2_RelationshipRules { get; }
Returns
Indexes
virtual IIndexes Indexes { get; }
Returns
Insert(bool)
Returns a cursor that can be used to insert new Rows.
virtual ICursor Insert(bool useBuffering)
Parameters
useBufferingbool
Returns
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.
IsAttributed
Indicates if the relationships in this relationship class have attributes.
virtual bool IsAttributed { get; }
Returns
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.
IsBeingEdited()
True if the dataset is being edited.
virtual bool IsBeingEdited()
Returns
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).
IsComposite
Indicates if the relationship class represents a composite relationship in which the origin object class represents the composite object.
virtual bool IsComposite { get; }
Returns
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.
Name
The name of the Dataset.
virtual string Name { get; }
Returns
Notification
The notification direction for the relationship class.
virtual esriRelNotification Notification { get; }
Returns
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.
OIDFieldName
virtual string OIDFieldName { get; }
Returns
OriginClass
The origin object class.
virtual IObjectClass OriginClass { get; }
Returns
Remarks
When using a relationship class, the OriginClass property is used for returning an interface to the origin objectclass .
OriginForeignKey
The relationship origin foreign Key.
virtual string OriginForeignKey { get; }
Returns
OriginPrimaryKey
The relationship origin primary Key.
virtual string OriginPrimaryKey { get; }
Returns
PropertySet
The set of properties for the dataset.
virtual IPropertySet PropertySet { get; }
Returns
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.
RelationshipClassID
The relationship class ID.
virtual int RelationshipClassID { get; }
Returns
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.
RelationshipRules
The relationship rules that apply to this relationship class.
virtual IEnumRule RelationshipRules { get; }
Returns
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.
Rename(string)
Renames this Dataset.
virtual void Rename(string Name)
Parameters
Namestring
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.
RowCount(IQueryFilter)
The number of Rows selected by the specified query.
virtual long RowCount(IQueryFilter QueryFilter)
Parameters
QueryFilterIQueryFilter
Returns
Search(IQueryFilter, bool)
An object cursor that can be used to fetch row objects selected by the specified query.
virtual ICursor Search(IQueryFilter QueryFilter, bool Recycling)
Parameters
QueryFilterIQueryFilterRecyclingbool
Returns
Remarks
The Search method returns a search cursor that can be used to retrieve rows specified by a query filter. The recycling parameter controls row object allocation behavior. Recycling cursors rehydrate a single row object on each fetch and can be used to optimize read-only access, for example, when drawing. It is illegal to maintain a reference on a row object returned by a recycling cursor across multiple calls to NextRow on the cursor.
Row objects returned by a recycling cursor should not be modified. Non-recycling cursors return a separate row object on each fetch. The objects returned by a non-recycling cursor may be modified and stored with polymorphic behavior. The geodatabase guarantees ‘unique instance semantics’ on non-recycling row objects fetched during an edit session. If the row object to be retrieved by a call to search has already been instantiated and is being referenced by the calling application, then a reference to the existing row object is returned.
Non-recycling feature cursors returned from the Search method *MUST* be used when copying features from the cursor into an insert cursor of another class. This is because a recycling cursor reuses the same geometry and under some circumstances all of the features inserted into the insert cursor may have the same geometry. Using a non-recycling cursor ensures that each geometry is unique.
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.
Select(IQueryFilter, esriSelectionType, esriSelectionOption, IWorkspace)
A selection that contains the object ids selected by the specified query.
virtual ISelectionSet Select(IQueryFilter QueryFilter, esriSelectionType selType, esriSelectionOption selOption, IWorkspace selectionContainer)
Parameters
QueryFilterIQueryFilterselTypeesriSelectionTypeselOptionesriSelectionOptionselectionContainerIWorkspace
Returns
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.
Subsets
Datasets contained within this dataset.
virtual IEnumDataset Subsets { get; }
Returns
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.
Type
The type of the Dataset.
virtual esriDatasetType Type { get; }
Returns
Remarks
Update(IQueryFilter, bool)
Returns a cursor that can be used to update Rows selected by the specified query.
virtual ICursor Update(IQueryFilter QueryFilter, bool Recycling)
Parameters
QueryFilterIQueryFilterRecyclingbool
Returns
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.
UpdateSearchedRows(IQueryFilter, IRowBuffer)
Update the Rows in the database selected by the specified query.
virtual void UpdateSearchedRows(IQueryFilter QueryFilter, IRowBuffer buffer)
Parameters
QueryFilterIQueryFilterbufferIRowBuffer
Workspace
The workspace containing this dataset.
virtual IWorkspace Workspace { get; }
Returns
Remarks
<p>A Workspace is a container of spatial and non-spatial datasets such as feature classes, raster datasets, and tables. It provides methods to instantiate existing datasets and to create new datasets. Workspaces are classified into types specified by the <b><a href="esriWorkspaceType.htm">esriWorkspaceType</a></b> enumerator: FileSystemWorkspace, LocalDatabaseWorkspace, and RemoteDatabaseWorkspace. Shapefiles and ArcGIS for Desktop Advanced workspaces are examples of FileSystemWorkspace. A personal geodatabase stored in an Access or a File Geodatabase is an example of a LocalDatabaseWorkspace. A geodatabase stored in an RDBMS such as Oracle, DB2, SQL Server, or Informix and accessed via ArcSDE is an example of a RemoteDatabaseWorkspace.</p> <p>A Workspace hands out a <b><a href="WorkspaceName.htm">WorkspaceName</a> </b>object as the value of its FullName property. For example, the WorkspaceName for a workspace can be persisted in a map document. An application can call the <b>Open()</b> method on the workspace name after loading it from persistent storage to connect to and get an object reference to the workspace.</p>