|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.arcgis.interop.Dispatch com.esri.arcgis.geodatabase.ICursorProxy
public class ICursorProxy
Provides access to members that hand out enumerated rows, field collections and allows for the updating, deleting and inserting of rows.
Cursors are forward only; they do not support backing up and retrieving rows that have already been retrieved or making multiple passes over data. If an application needs to make multiple passes over the data, the application needs to reexecute the query that returned the cursor. If both executions of the query are made within the same edit session (or database transaction with the appropriate level of isolation), the application is guaranteed not to see any changes made to the data by other concurrently executing applications.
Note that while a cursor is created in the client's memory after a call to methods such as ITable.Search or ITable.Insert, the DBMS cursor is not created until a call to NextRow (or a similar method) is made. This is why retrieving the first row may take longer than subsequent rows, and because underlying DBMS errors might be raised on the call, error handling is recommended.
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.
Field Summary | |
---|---|
boolean |
noncastable
|
Fields inherited from class com.esri.arcgis.interop.Dispatch |
---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef |
Constructor Summary | |
---|---|
|
ICursorProxy()
|
|
ICursorProxy(Object obj)
|
protected |
ICursorProxy(Object obj,
String iid)
|
Method Summary | |
---|---|
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
void |
deleteRow()
Delete the existing Row 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 |
insertRow(IRowBuffer buffer)
Insert a new Row into the database using the property values in the input buffer. |
IRow |
nextRow()
Advance the position of the cursor by one and return the Row object at that position. |
void |
removeListener(String iidStr,
Object theListener)
|
void |
updateRow(IRow row)
Update the existing Row 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 |
---|
public boolean noncastable
Constructor Detail |
---|
public ICursorProxy()
public ICursorProxy(Object obj) throws IOException
IOException
protected ICursorProxy(Object obj, String iid) throws IOException
IOException
Method Detail |
---|
public void addListener(String iidStr, Object theListener, Object theSource) throws IOException
addListener
in class com.esri.arcgis.interop.Dispatch
IOException
public void removeListener(String iidStr, Object theListener) throws IOException
removeListener
in class com.esri.arcgis.interop.Dispatch
IOException
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
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
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
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 |