com.esri.arcgis.geodatabase
Class IFeatureCursorProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IFeatureCursorProxy
All Implemented Interfaces:
IFeatureCursor, Externalizable, Serializable
Direct Known Subclasses:
ITemporalCursorProxy

public class IFeatureCursorProxy
extends com.esri.arcgis.interop.Dispatch
implements IFeatureCursor, Serializable

Provides access to members that hand out enumerated features, field collections and allows for the updating, deleting and inserting of features.

Remarks

The IFeatureCursor interface provides access to a set of features in a feature class. It operates in the same way as ICursor, although it does not inherit from that interface. This saves you from having to use Query-Interface when dealing with features rather than rows.

Feature cursors can be used as an input to IFeatureCursorBuffer, which lets you spatially buffer the features by a distance.

You can also draw the features from a cursor on the display. For more information, see the IFeatureRenderer::Draw method.

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.

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IFeatureCursorProxy()
           
  IFeatureCursorProxy(Object obj)
           
protected IFeatureCursorProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void deleteFeature()
          Delete the existing Feature in the database corresponding to the current position of the cursor.
 int findField(String name)
          The index of the field with the specified name.
 void flush()
          Flush any outstanding buffered writes to the database.
 IFields getFields()
          The fields Collection for this cursor.
 Object insertFeature(IFeatureBuffer buffer)
          Insert a new Feature into the database using the property values in the input buffer.
 IFeature nextFeature()
          Advance the position of the cursor by one and return the Feature object at that position.
 void removeListener(String iidStr, Object theListener)
           
 void updateFeature(IFeature object)
          Update the existing Feature in the database corresponding to the current position of the cursor.
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IFeatureCursorProxy

public IFeatureCursorProxy()

IFeatureCursorProxy

public IFeatureCursorProxy(Object obj)
                    throws IOException
Throws:
IOException

IFeatureCursorProxy

protected IFeatureCursorProxy(Object obj,
                              String iid)
                       throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

findField

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

Remarks

If the specified field cannot be found, this method returns a value of -1.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
findField in interface IFeatureCursor
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 cursor.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

nextFeature

public IFeature nextFeature()
                     throws IOException,
                            AutomationException
Advance the position of the cursor by one and return the Feature object at that position.

Remarks

If you fetch features out of a geodatabase using a cursor (recycling or non recycling), the spatial reference of the feature, as returned by NextFeature, is guaranteed to be in the spatial reference that you specified in the query filter .

No guarantee however is made that the geometry of the feature will continue to remain in this spatial reference. In particular, if you use a non recycling cursor, then the feature you fetch will be shared with other consumers and any one of these may change its spatial reference at any time. It is the developers responsibility to test the spatial reference or the geometry you get from the feature (via IFeature::Shape) if you retrieve the geometry at a later time and rely on its spatial reference being a specified spatial reference.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

updateFeature

public void updateFeature(IFeature object)
                   throws IOException,
                          AutomationException
Update the existing Feature in the database corresponding to the current position of the cursor.

Remarks

This method should only be called on update cursors.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deleteFeature

public void deleteFeature()
                   throws IOException,
                          AutomationException
Delete the existing Feature in the database corresponding to the current position of the cursor.

Remarks

The cursor must be initialized to a feature (with the NextFeature() method) before this method can be successfully called.

This should only be called on update cursors. To delete a feature retrieved from a search cursor, call IFeature.Delete on the feature itself.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertFeature

public Object insertFeature(IFeatureBuffer buffer)
                     throws IOException,
                            AutomationException
Insert a new Feature into the database using the property values in the input buffer. The ID of the new Feature is returned.

Remarks

This method should only be called on insert cursors.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
insertFeature in interface IFeatureCursor
Parameters:
buffer - A reference to a com.esri.arcgis.geodatabase.IFeatureBuffer (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

flush

public void flush()
           throws IOException,
                  AutomationException
Flush any outstanding buffered writes to the database.

Remarks

This method should only be called on insert cursors.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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