com.esri.arcgis.geodatabase
Class RelQueryRow

java.lang.Object
  extended bycom.esri.arcgis.geodatabase.RelQueryRow
All Implemented Interfaces:
IFeature, IFeatureBuffer, IFeatureDraw, IFeatureProject, IObject, IRow, IRowBuffer, java.io.Serializable

public class RelQueryRow
extends java.lang.Object
implements IRow, IObject, IRowBuffer, IFeature, IFeatureBuffer, IFeatureDraw, IFeatureProject

A row defined by a join of the datasets in a RelQueryTable.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Remarks

A RelQueryRow represents a row of data in a RelQueryTable. A RelQueryRow can be obtained from a RelQueryCursor (ICursor::NextRow) or methods like ITable::GetRow. The ITable::CreateRow method is not supported and will return an error if used.

The IRow, IRowBuffer and IObject interfaces are always implemented by a RelQueryRow. The IFeature, IFeatureBuffer, and IFeatureDraw interfaces are only implemented if the RelQueryTable has a geometry field.  See the RowBuffer and Row class topics as well as the Object and Feature class topics for more information on rows in general.

A RelQueryRow is read-only, therefore some of the properties and methods in these interfaces may not be supported. The following table lists the unsupported properties and methods. If any of these are used, an error is returned:

Interface Unsupported Property/Method
IRowBuffer Value - Set is unsupported, but Get is supported
IRow Store
Delete
IFeature Shape - Set is unsupported, but Get is supported
IFeatureBuffer Shape - Set is unsupported, but Get is supported

See Also:
Serialized Form

Constructor Summary
RelQueryRow(java.lang.Object obj)
          Construct a RelQueryRow using a reference to such an object returned from ArcGIS Engine or Server.
 
Method Summary
 void delete()
          Deletes the row.
 void draw(int drawPhase, IDisplay display, ISymbol symbol, boolean symbolInstalled, IGeometry geometry, int drawStyle)
          Draws the feature on the display.
 boolean equals(java.lang.Object o)
          Compare this object with another
 IObjectClass esri_getClass()
          The Object Class for the row.
 IFeature getAsIFeature()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IFeatureBuffer getAsIFeatureBuffer()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IFeatureDraw getAsIFeatureDraw()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IFeatureProject getAsIFeatureProject()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IObject getAsIObject()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IRow getAsIRow()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IRowBuffer getAsIRowBuffer()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IEnvelope getExtent()
          The extent of the feature.
 int getFeatureType()
          The type of the feature.
 IFields getFields()
          The fields Collection for this row buffer.
 IInvalidArea getInvalidArea()
          The area to be drawn.
 int getOID()
          The OID for the row.
 IGeometry getShape()
          A reference to the default shape for the feature.
 IGeometry getShapeCopy()
          A cloned copy of the default shape for the feature.
 ITable getTable()
          The Table for the row.
 java.lang.Object getValue(int index)
          The value of the field with the specified index.
 int hashCode()
          the hashcode for this object
 boolean isHasOID()
          Indicates if the row has an OID.
 void project(ISpatialReference outputSR)
          Project the feature geometry to the provided spatial reference.
 void setInvalidAreaByRef(IInvalidArea invalidArea)
          The area to be drawn.
 void setShapeByRef(IGeometry shape)
          A reference to the default shape for the feature.
 void setValue(int index, java.lang.Object value)
          The value of the field with the specified index.
 void store()
          Stores the row.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelQueryRow

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

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

Throws:
java.io.IOException - if there are interop problems
Method Detail

getAsIRow

public IRow getAsIRow()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIObject

public IObject getAsIObject()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIRowBuffer

public IRowBuffer getAsIRowBuffer()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIFeature

public IFeature getAsIFeature()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIFeatureBuffer

public IFeatureBuffer getAsIFeatureBuffer()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIFeatureDraw

public IFeatureDraw getAsIFeatureDraw()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIFeatureProject

public IFeatureProject getAsIFeatureProject()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

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


hashCode

public int hashCode()
the hashcode for this object


isHasOID

public boolean isHasOID()
                 throws java.io.IOException,
                        AutomationException
Description copied from interface: IRow
Indicates if the row has an OID.

Supported Platforms

Windows, Solaris, Linux

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.

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

getOID

public int getOID()
           throws java.io.IOException,
                  AutomationException
Description copied from interface: IRow
The OID for the row.

Supported Platforms

Windows, Solaris, Linux

Description

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

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

getTable

public ITable getTable()
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IRow
The Table for the row.

Supported Platforms

Windows, Solaris, Linux

Description

Returns a pointer to the table the row belongs to.

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

store

public void store()
           throws java.io.IOException,
                  AutomationException
Description copied from interface: IRow
Stores the row.

Supported Platforms

Windows, Solaris, Linux

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.

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

delete

public void delete()
            throws java.io.IOException,
                   AutomationException
Description copied from interface: IRow
Deletes the row.

Supported Platforms

Windows, Solaris, Linux

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.

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

getValue

public java.lang.Object getValue(int index)
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IRowBuffer
The value of the field with the specified index.

Supported Platforms

Windows, Solaris, Linux

Remarks

The Index parameter is a zero based index.

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

setValue

public void setValue(int index,
                     java.lang.Object value)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IRowBuffer
The value of the field with the specified index.

Supported Platforms

Windows, Solaris, Linux

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

getFields

public IFields getFields()
                  throws java.io.IOException,
                         AutomationException
Description copied from interface: IRowBuffer
The fields Collection for this row buffer.

Supported Platforms

Windows, Solaris, Linux

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

esri_getClass

public IObjectClass esri_getClass()
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IObject
The Object Class for the row.

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

getShapeCopy

public IGeometry getShapeCopy()
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IFeature
A cloned copy of the default shape for the feature.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getShapeCopy in interface IFeature
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getShape

public IGeometry getShape()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IFeature
A reference to the default shape for the feature.

Supported Platforms

Windows, Solaris, Linux

Remarks

The basic process to change the shape of a feature is:

1) Get the feature's existing geometry through IFeature.Shape or create a new geometry
2) Modify the geometry
3) Set the feature's geometry using IFeature.Shape
4) Store the feature

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.

Specified by:
getShape in interface IFeature
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setShapeByRef

public void setShapeByRef(IGeometry shape)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IFeature
A reference to the default shape for the feature.

Specified by:
setShapeByRef in interface IFeature
Parameters:
shape - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExtent

public IEnvelope getExtent()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IFeature
The extent of the feature.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getExtent in interface IFeature
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getFeatureType

public int getFeatureType()
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IFeature
The type of the feature.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFeatureType in interface IFeature
Returns:
A com.esri.arcgis.geodatabase.esriFeatureType constant
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

draw

public void draw(int drawPhase,
                 IDisplay display,
                 ISymbol symbol,
                 boolean symbolInstalled,
                 IGeometry geometry,
                 int drawStyle)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IFeatureDraw
Draws the feature on the display.

Supported Platforms

Windows, Solaris, Linux

Specified by:
draw in interface IFeatureDraw
Parameters:
drawPhase - A com.esri.arcgis.system.esriDrawPhase constant (in)
display - A reference to a com.esri.arcgis.display.IDisplay (in)
symbol - A reference to a com.esri.arcgis.display.ISymbol (in)
symbolInstalled - The symbolInstalled (in)
geometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
drawStyle - A com.esri.arcgis.geodatabase.esriDrawStyle constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setInvalidAreaByRef

public void setInvalidAreaByRef(IInvalidArea invalidArea)
                         throws java.io.IOException,
                                AutomationException
Description copied from interface: IFeatureDraw
The area to be drawn.

Specified by:
setInvalidAreaByRef in interface IFeatureDraw
Parameters:
invalidArea - A reference to a com.esri.arcgis.geodatabase.IInvalidArea (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getInvalidArea

public IInvalidArea getInvalidArea()
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IFeatureDraw
The area to be drawn.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getInvalidArea in interface IFeatureDraw
Returns:
A reference to a com.esri.arcgis.geodatabase.IInvalidArea
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

project

public void project(ISpatialReference outputSR)
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IFeatureProject
Project the feature geometry to the provided spatial reference.

Remarks

Projects the feature from the current spatial reference to the output spatial reference.

Specified by:
project in interface IFeatureProject
Parameters:
outputSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.