com.esri.arcgis.geodatabase
Class AttributedRelationship

java.lang.Object
  extended by com.esri.arcgis.geodatabase.AttributedRelationship
All Implemented Interfaces:
IRelationship, IRow, IRowBuffer, IRowChanges, IRowCompare, IRowEdit, IRowEvents, IValidate, com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, Serializable

public class AttributedRelationship
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IRow, IRowBuffer, IRowEvents, IValidate, IRowChanges, IRowCompare, IRowEdit, IRelationship, ISupportErrorInfo

Esri Attributed Relationship object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
AttributedRelationship()
          Constructs a AttributedRelationship using ArcGIS Engine.
AttributedRelationship(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
AttributedRelationship theAttributedRelationship = (AttributedRelationship) obj;
 
Method Summary
 void delete()
          Deletes the row.
 void deleteSet(ISet rows)
          Deletes the set of rows.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 IObject getDestinationObject()
          The destination object.
 IFields getFields()
          The fields Collection for this row buffer.
 IFields getInvalidFields()
          Returns all invalid fields.
 IEnumRule getInvalidRules()
          The set of all invalid rules.
 IEnumRule getInvalidRulesByField(String fieldName)
          The set of all invalid rules for the specified field.
 int getOID()
          The OID for the row.
 Object getOriginalValue(int index)
          The value of the field at the specified index immediately after the last call to Store on the Row object.
 IObject getOriginObject()
          The origin object.
 IRelationshipClass getRelationshipClass()
          The relationship class to which this relationship belongs.
 ITable getTable()
          The Table for the row.
 Object getValue(int index)
          The value of the field with the specified index.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 boolean isEqual(IRow otherRow)
          Indicates if the rows (which may be from two different versions) are the same (oid + values).
 boolean isHasOID()
          Indicates if the row has an OID.
 boolean isValueChanged(int index)
          Indicates whether the value of the field at the specified index has changed since the last call to Store on the Row object.
 void onChanged()
          An after event that is fired when a custom object is changed.
 void onDelete()
          An after event that is fired when a custom object is deleted.
 void onInitialize()
          An after event that is fired when a custom object is initialized.
 void onNew()
          An after event that is fired when a custom object is Stored for the first time.
 void onValidate()
          An after event that is fired when a custom object is validated.
 void setValue(int index, Object value)
          The value of the field with the specified index.
 void store()
          Stores the row.
 boolean validate(String[] errorMessage)
          Validates the row.
 
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

AttributedRelationship

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

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

AttributedRelationship

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

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

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

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

isHasOID

public boolean isHasOID()
                 throws IOException,
                        AutomationException
Indicates if the row has an OID.

Remarks

If the table has been registered with the geodatabase it will have unique Object ID, automatically created by the register tool, and the HasOID property will be set to True. Tables not registered with the geodatabase will not have an OID column and the HasOID property will be set to False. See the IClassSchemaEdit::RegisterAsObjectClass method for more information.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getOID

public int getOID()
           throws IOException,
                  AutomationException
The OID for the row.

Description

Gets the OID for a row in a table that has a unique Object ID, such as tables registered with the geodatabase.

Example:

if (pRow.isHasOID()) {

        System.out.print(pRow.getOID());

      }

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getTable

public ITable getTable()
                throws IOException,
                       AutomationException
The Table for the row.

Description

Returns a pointer to the table the row belongs to.

Example:

ITable pTable;

pTable = pRow.getTable();


Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

store

public void store()
           throws IOException,
                  AutomationException
Stores the row.

Remarks

The Store method is called by an application once it has modified the values of a Row. Once Store is called on a Row object, all subsequent queries within the same edit session, using the Geodatabase API, will reflect the modified state of the Row object.

All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.

Calling the Store method triggers the following actions:

- The IRowEvents::OnChanged is called for the row being stored. The OnNew is called if this is a newly created row being stored for the first time. A custom row object can implement the OnChanged method and take some special action when it is called - for example; update a special column in the row

- The IRelatedObjectEvents::RelatedObjectChanged method is called for related objects in a related object class if the table for this row is an object class that participates in relationship classes with notification

Store should not be used for batch operations, such as updates or inserts. For performing a number of inserts or updates using cursors, refer to the ITable::Insert, ITable::Update, ITable::UpdateSearchedRows , IFeatureClass::Update andIFeatureClass::Insert. If an insert or update cursor is used on non-simple features (such as network features), the cursor will revert to using Store.

It is not necessary to explicitly call Connect on network features, this is handled polymorphically when Store is called on the feature. This is also the case with features in a Topology, Dirty Area creation is handled internally when Store is called.

Store should not be called inside of edit events, such as OnCreateFeature, OnChangeFeature or OnDeleteFeature. Even if you are modifying the geometry or other field values, Store will be called once the event is complete.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

delete

public void delete()
            throws IOException,
                   AutomationException
Deletes the row.

Remarks

All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getValue

public Object getValue(int index)
                throws IOException,
                       AutomationException
The value of the field with the specified index.

Product Availability

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

Specified by:
getValue in interface IRowBuffer
Parameters:
index - The index (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setValue

public void setValue(int index,
                     Object value)
              throws IOException,
                     AutomationException
The value of the field with the specified index.

Product Availability

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

Specified by:
setValue in interface IRowBuffer
Parameters:
index - The index (in)
value - A Variant (in)
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 row buffer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFields in interface IRowBuffer
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.

onChanged

public void onChanged()
               throws IOException,
                      AutomationException
An after event that is fired when a custom object is changed.

Remarks

The OnChanged method is called by the geodatabase when an application program calls Store on an existing Row object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

onDelete

public void onDelete()
              throws IOException,
                     AutomationException
An after event that is fired when a custom object is deleted.

Remarks

The OnDelete method is called by the geodatabase when an application program calls Delete on a Row object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

onInitialize

public void onInitialize()
                  throws IOException,
                         AutomationException
An after event that is fired when a custom object is initialized.

Remarks

The OnInitialize method is called by the geodatabase after hydrating a cocreated Row object with its state (its set of field values) but before handing the Row to an application program. This is an opportunity for the Row object to initialize further state and derived member variables.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

onNew

public void onNew()
           throws IOException,
                  AutomationException
An after event that is fired when a custom object is Stored for the first time.

Remarks

The OnNew method is called by the geodatabase when an application program calls Store on a newly created Row object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

onValidate

public void onValidate()
                throws IOException,
                       AutomationException
An after event that is fired when a custom object is validated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getInvalidFields

public IFields getInvalidFields()
                         throws IOException,
                                AutomationException
Returns all invalid fields.

Description

The GetInvalidFields method returns a field set containing the row's invalid fields.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getInvalidFields in interface IValidate
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.

getInvalidRules

public IEnumRule getInvalidRules()
                          throws IOException,
                                 AutomationException
The set of all invalid rules.

Description

The GetInvalidRules method returns an enumerator of rules that are currently violated by the row.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getInvalidRules in interface IValidate
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.

getInvalidRulesByField

public IEnumRule getInvalidRulesByField(String fieldName)
                                 throws IOException,
                                        AutomationException
The set of all invalid rules for the specified field.

Description

The GetInvalidRulesByField method returns an enumerator of rules violated by the specified field of the row.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getInvalidRulesByField in interface IValidate
Parameters:
fieldName - The fieldName (in)
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.

validate

public boolean validate(String[] errorMessage)
                 throws IOException,
                        AutomationException
Validates the row.

Description

The Validate method indicates whether the row is violating any of its class's rules. A return value of true indicates the row is valid, while a return value of false indicates the row is violating one or more rules.

Remarks

Validate on a row occurs in five steps:

  1. Validate the subtype

  2. Validate the attribute rules

  3. Validate the network connectivity rules (if network feature)

  4. Validate the relationship rules

  5. Perform custom validation (using optional class extension)

The validate process stops once a row is found invalid. For example, if a network feature violates an attribute rule, the validation process stops and the feature's network connectivity rules are not evaluated until the attribute rule violation is corrected.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
validate in interface IValidate
Parameters:
errorMessage - The errorMessage (out: use single element array)
Returns:
The isValid
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isValueChanged

public boolean isValueChanged(int index)
                       throws IOException,
                              AutomationException
Indicates whether the value of the field at the specified index has changed since the last call to Store on the Row object.

Product Availability

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

Specified by:
isValueChanged in interface IRowChanges
Parameters:
index - The index (in)
Returns:
The changed
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOriginalValue

public Object getOriginalValue(int index)
                        throws IOException,
                               AutomationException
The value of the field at the specified index immediately after the last call to Store on the Row object.

Product Availability

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

Specified by:
getOriginalValue in interface IRowChanges
Parameters:
index - The index (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEqual

public boolean isEqual(IRow otherRow)
                throws IOException,
                       AutomationException
Indicates if the rows (which may be from two different versions) are the same (oid + values).

Product Availability

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

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

deleteSet

public void deleteSet(ISet rows)
               throws IOException,
                      AutomationException
Deletes the set of rows.

Remarks

All edits to features that participate in a Topology or Geometric Network must be performed within an edit session and bracketed within an edit operation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
deleteSet in interface IRowEdit
Parameters:
rows - 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.

getRelationshipClass

public IRelationshipClass getRelationshipClass()
                                        throws IOException,
                                               AutomationException
The relationship class to which this relationship belongs.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getOriginObject

public IObject getOriginObject()
                        throws IOException,
                               AutomationException
The origin object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDestinationObject

public IObject getDestinationObject()
                             throws IOException,
                                    AutomationException
The destination object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.