|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.geodatabase.RelQueryCursor
public class RelQueryCursor
A cursor that is opened from a RelQueryTable.
A RelQueryCursor is a tool that references the
rows in a RelQueryTable. Each row retuned by the cursor includes
fields from both the source and destination tables with the source
fields on the left. Each row from the source and destination tables
are matched according to the join fields to create a single
row.
A RelQueryCursor is created when you open a cursor on a RelQueryTable. You can use methods such as Search from ITable and IFeatureClass to open the cursor. Since it inherits from Cursor, it implements ICursor and will implement IFeatureCursor if the RelQueryTable has geometry.
RelQueryCursors are read-only, therefore performing edits using the IRow::Delete and IRow::Store methods is not supported. Also, trying to open an insert or an update cursor will result in an error, since there is no insert or update RelQueryCursor.
The following is a review of the inheritied interfaces and describes which properties and methods behave differently or are not supported with RelQueryCursor.
ICursor
The table below describes how the methods and properties from
ICursor are implemented by a RelQueryCursor:
Member | Behavior with a MemoryRelationshipClass |
---|---|
Fields | Returns the fields of RelQueryTable. |
DeleteRow | Method is not supported since update cursors are not supported. An error will be returned if you try to use this method. |
FindField | Returns the index of the field with the given name. If the field does not exist, a -1 is returned. It is good practice to provide a fully qualified field name (tablename.fieldname) with this method. If it is not fully qualified, it may not be found in the RelQueryTable. |
Flush | Method is not supported since update and insert cursors are not supported. An error will be returned if you try to use this method. |
InsertRow | Method is not supported since update cursors are not supported. An error will be returned if you try to use this method. |
NextRow | Moves the cursor to the next row and returns the Row object at that position. |
UpdateRow | Method is not supported since update cursors are not supported. An error will be returned if you try to use this method. |
IFeatureCursor
The IFeatureCursor interface provides access to a set of
features in a RelQueryTable and operates the same way as ICursor.
The information provided in the above table for ICursor can also be
applied to IFeatureCursor. As with ICursor, the InsertFeature,
UpdateFeature, DeleteFeature, and Flush methods are not supported
by RelQueryTable.
Constructor Summary | |
---|---|
RelQueryCursor(Object obj)
Construct a RelQueryCursor using a reference to such an object returned from ArcGIS Engine or Server. |
Method Summary | |
---|---|
void |
deleteFeature()
Delete the existing Feature in the database corresponding to the current position of the cursor. |
void |
deleteRow()
Delete the existing Row in the database corresponding to the current position of the cursor. |
boolean |
equals(Object o)
Compare this object with another |
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. |
int |
hashCode()
the hashcode for this object |
Object |
insertFeature(IFeatureBuffer buffer)
Insert a new Feature into the database using the property values in the input buffer. |
Object |
insertRow(IRowBuffer buffer)
Insert a new Row 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. |
IRow |
nextRow()
Advance the position of the cursor by one and return the Row object at that position. |
void |
updateFeature(IFeature object)
Update the existing Feature in the database corresponding to the current position of the cursor. |
void |
updateRow(IRow row)
Update the existing Row in the database corresponding to the current position of the cursor. |
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 |
---|
public RelQueryCursor(Object obj) throws IOException
obj
to RelQueryCursor
. *
RelQueryCursor o = (RelQueryCursor)obj; // will not work
RelQueryCursor o = new RelQueryCursor(obj); // Use this constructor instead
* @param obj an object returned from ArcGIS Engine or Server
IOException
- if there are interop problems
RelQueryCursor theRelQueryCursor = (RelQueryCursor) obj;
Method Detail |
---|
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public int findField(String name) throws IOException, AutomationException
If the specified field cannot be found, this method returns a value of -1.
findField
in interface ICursor
findField
in interface IFeatureCursor
name
- The name (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFields getFields() throws IOException, AutomationException
getFields
in interface ICursor
getFields
in interface IFeatureCursor
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IRow nextRow() throws IOException, AutomationException
The NextRow method on a search or update cursor returns the next row in the result set to the application. The row object returned is allocated and hydrated by the cursor, and a reference to it is handed to the application. To retrieve all rows in a result set containing N rows, the application must make N calls to NextRow. If no rows remain in the result set, this method returns a null value.
nextRow
in interface ICursor
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void updateRow(IRow row) throws IOException, AutomationException
This method should only be called on update cursors.
updateRow
in interface ICursor
row
- A reference to a com.esri.arcgis.geodatabase.IRow (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteRow() throws IOException, AutomationException
The cursor must be initialized to a row (with the NextRow method) before this method can be successfully called.
This should only be called on update cursors. To delete a row retrieved from a search cursor, call IRow.Delete on the row itself.
deleteRow
in interface ICursor
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object insertRow(IRowBuffer buffer) throws IOException, AutomationException
This method should only be called on insert cursors.
insertRow
in interface ICursor
buffer
- A reference to a com.esri.arcgis.geodatabase.IRowBuffer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void flush() throws IOException, AutomationException
This method should only be called on insert cursors.
flush
in interface ICursor
flush
in interface IFeatureCursor
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public IFeature nextFeature() throws IOException, AutomationException
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.
nextFeature
in interface IFeatureCursor
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void updateFeature(IFeature object) throws IOException, AutomationException
This method should only be called on update cursors.
updateFeature
in interface IFeatureCursor
object
- A reference to a com.esri.arcgis.geodatabase.IFeature (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void deleteFeature() throws IOException, AutomationException
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.
deleteFeature
in interface IFeatureCursor
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public Object insertFeature(IFeatureBuffer buffer) throws IOException, AutomationException
This method should only be called on insert cursors.
insertFeature
in interface IFeatureCursor
buffer
- A reference to a com.esri.arcgis.geodatabase.IFeatureBuffer (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |