|
|||||||||
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.ITransactionsProxy
public class ITransactionsProxy
Provides access to members that control Transaction management.
ITransactions is an optional interface that allows an application to explicitly control database transactions. The interface does not support nested transactions. The InTransaction property should be used to test if the workspace is already within a transaction. Applications are responsible for starting a new transaction (using the StartTransaction method) on the workspace only if the workspace is not already within a transaction. An application is responsible for stopping only those transactions (using CommitTransaction or AbortTransaction) that were started by the application. If there is an open transaction on the workspace and StartTransaction is called it will amount to a no operation call. With this being said, any calls to CommitTransaction or AbortTransaction will act on the original open transaction.
Applications can use transactions to manage direct updates, for example, updates made outside of an edit session, on object and feature classes that are tagged as not requiring an edit session. This interface should only be used if it is the desire to control the transactional scope while making edits outside of an edit session. For example, it is possible to commit an number of sequential updates to a non-versioned table using the ITransactions interface. When using transactions to manage direct updates, applications are responsible for discarding any cached row objects at transaction boundaries.
Applications should not use transactions when performing updates within an edit session (see the documentation on IWorkspaceEdit for information on edit sessions). In the context of an edit session, transactions are managed by the workspace and automatically started and stopped as needed.
Applications should be aware that DDL operations made through the geodatabase API (for example, deleting a feature dataset, creating a new feature class or adding a field to a feature class) use database transactions to ensure integrity of the data dictionary tables and commit the transaction at the end of the operation. It is for this reason that the ITransactions interface should also not be used to make any kind of schema edits; this would constitute a nested transaction. Applications should not invoke DDL operations within an application transaction, application transactions should be restricted to DML operations (such as feature edits).
Applications can use transactions to manage direct updates, for example, updates made outside of an edit session, on object and feature classes that are tagged as not requiring an edit session.
Field Summary | |
---|---|
boolean |
noncastable
|
Fields inherited from class com.esri.arcgis.interop.Dispatch |
---|
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef |
Constructor Summary | |
---|---|
|
ITransactionsProxy()
|
|
ITransactionsProxy(Object obj)
|
protected |
ITransactionsProxy(Object obj,
String iid)
|
Method Summary | |
---|---|
void |
abortTransaction()
Aborts the current transaction. |
void |
addListener(String iidStr,
Object theListener,
Object theSource)
|
void |
commitTransaction()
Commits the current transaction. |
boolean |
isInTransaction()
Indicates if there is already a transaction in progress. |
void |
removeListener(String iidStr,
Object theListener)
|
void |
startTransaction()
Begins a new transaction. |
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 ITransactionsProxy()
public ITransactionsProxy(Object obj) throws IOException
IOException
protected ITransactionsProxy(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 boolean isInTransaction() throws IOException, AutomationException
ITransactions does not support nested transactions. The InTransaction property should be used to test if the workspace is already within a transaction.
isInTransaction
in interface ITransactions
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void startTransaction() throws IOException, AutomationException
Applications are responsible for starting a new transaction (using the StartTransaction method) on the workspace only if the workspace is not already within a transaction. If the workspace is within an transaction this call will amount to a no operation without error. It should be noted that if CommitTransaction is then called it will be acting on the origin transaction and all changes within that original transaction wil be commited.
startTransaction
in interface ITransactions
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void commitTransaction() throws IOException, AutomationException
An application is responsible for stopping only those transactions (using CommitTransaction or AbortTransaction) that were started by the application.
commitTransaction
in interface ITransactions
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.public void abortTransaction() throws IOException, AutomationException
An application is responsible for stopping only those transactions (using CommitTransaction or AbortTransaction) that were started by the application.
abortTransaction
in interface ITransactions
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 |