com.esri.arcgis.geodatabase
Class IVersionEditProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geodatabase.IVersionEditProxy
All Implemented Interfaces:
IVersionEdit, Externalizable, Serializable
Direct Known Subclasses:
IVersionEdit2Proxy

public class IVersionEditProxy
extends com.esri.arcgis.interop.Dispatch
implements IVersionEdit, Serializable

Provides access to members that return information about versions and posting of versions.

Superseded By

IVersionEdit4

Description

The IVersionEdit interface is used to reconcile a version with a target version. Once reconciled, the object provides the ability to work with representations of the version prior to start editing, the pre-reconcile version, the reconcile version, and the common ancestor version for conflict resolution.

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
  IVersionEditProxy()
           
  IVersionEditProxy(Object obj)
           
protected IVersionEditProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 boolean canPost()
          Returns a boolean if the version can be posted to the reconcile version.
 IVersion getCommonAncestorVersion()
          The common ancestor of this version and the reconcile version.
 IEnumConflictClass getConflictClasses()
          All objects which contain conflicts between the current and reconciled versions.
 IEnumBSTR getModifiedClasses()
          All objects modified by the current and reconciled versions.
 IVersion getPreReconcileVersion()
          The version prior to reconciliation.
 IVersion getReconcileVersion()
          The version that the current version is reconciling against.
 IVersion getStartEditingVersion()
          The version prior to any edits.
 void post(String versionName)
          Posts the current version to the reconcilled version.
 boolean reconcile(String versionName)
          Reconciles the current version with a target version.
 void removeListener(String iidStr, Object theListener)
           
 
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

IVersionEditProxy

public IVersionEditProxy()

IVersionEditProxy

public IVersionEditProxy(Object obj)
                  throws IOException
Throws:
IOException

IVersionEditProxy

protected IVersionEditProxy(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

getModifiedClasses

public IEnumBSTR getModifiedClasses()
                             throws IOException,
                                    AutomationException
All objects modified by the current and reconciled versions.

Remarks

The read-only property ModifiedClasses returns an IEnumBSTR that can be used to iterate over the names of the tables that have been modified by the current version being edited and the target reconciled version.

This property should only be called after a Reconcile or the enumeration will be empty.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getModifiedClasses in interface IVersionEdit
Returns:
A reference to a com.esri.arcgis.system.IEnumBSTR
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConflictClasses

public IEnumConflictClass getConflictClasses()
                                      throws IOException,
                                             AutomationException
All objects which contain conflicts between the current and reconciled versions.

Remarks

The read-only property ConflictClasses returns an IEnumConflictClass that can be used to iterate over the Classes that have conflicts between the current version and the target reconciled version.

This property should only be called after a Reconcile or the enumeration will be empty.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getReconcileVersion

public IVersion getReconcileVersion()
                             throws IOException,
                                    AutomationException
The version that the current version is reconciling against.

Remarks

The ReconcileVersion method returns an IVersion of the version that the current edit version is reconciling against. The reconcile version represents the state of the database for the target reconcile version when the reconcile operation started. This provides a representation of the target reconcile version which can be used to compare features or rows after the reconciliation.

This property should only be called after a Reconcile or the IVersion object will be nothing.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getStartEditingVersion

public IVersion getStartEditingVersion()
                                throws IOException,
                                       AutomationException
The version prior to any edits.

Remarks

The StartEditingVersion method returns an IVersion of the version that the current edit version is reconciling against. The start editing version represents the state of the database when start editing was initiated. This provides a representation of the version which can be used to compare features or rows after the reconciliation.

The IVersion returned is not available as a workspace for editing.

This property should only be called after a Reconcile or the IVersion object will be nothing.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPreReconcileVersion

public IVersion getPreReconcileVersion()
                                throws IOException,
                                       AutomationException
The version prior to reconciliation.

Remarks

The PreReconcileVersion method returns an IVersion of the version that the current edit version is reconciling against. The pre-reconcile version represents the state of the database prior to the reconcile operation. This provides a representation of the version which can be used to compare features or rows after the reconciliation.

The IVersion returned is not available as a workspace for editing.

This property should only be called after a Reconcile or the IVersion object will be nothing.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getCommonAncestorVersion

public IVersion getCommonAncestorVersion()
                                  throws IOException,
                                         AutomationException
The common ancestor of this version and the reconcile version.

Remarks

The CommonAncestorVersion method returns an IVersion of the version that the current edit version is reconciling against. The common ancestor version represents the state of the database at the time the version was created from the target version (i.e. when the two versions were identical). This provides a representation of the version which can be used to compare features or rows after the reconciliation.

The IVersion returned is not available as a workspace for editing.

This property should only be called after a Reconcile or the IVersion object will be nothing.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

reconcile

public boolean reconcile(String versionName)
                  throws IOException,
                         AutomationException
Reconciles the current version with a target version.

Remarks

The Reconcile function reconciles the current edit version with the specified target version. The target version must be an ancestor of the current version or an error will be returned. The target version name passed in is case-sensitive and should take the form {owner}.{version_name} for example, SDE.DEFAULT.

If the returned boolean value from Reconcile is TRUE, then conflicts were detected. Otherwise no conflicts were detected.

A reconcile can only be performed if no other users are currently editing the version. As well, the target version cannot concurrently be reconciling by a second application. See IVersion::IVersionLocks for additional information on detecting version locks.

Calling Reconcile will abort the current edit operation therefore any edits made within an open edit operation when reconcile is called will be lost. If there is an open edit operation it is good practice to call StopEditOperation prior to calling Reconcile

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
reconcile in interface IVersionEdit
Parameters:
versionName - The versionName (in)
Returns:
The foundConflicts
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

canPost

public boolean canPost()
                throws IOException,
                       AutomationException
Returns a boolean if the version can be posted to the reconcile version.

Remarks

The CanPost method is only true if IVersionEdit.Reconcile has been performed and the reconcile operation has not been undone. CanPost does not check if the target version has been redefined since the reconcile operation.

The Post method requires that the current edit version has been reconciled with any ancestor versions prior to being called. The implicit locking during a reconcile should greatly increase the chances of the source and target versions being ready to post. There is a possibility that these two versions could be out of sync, possibly do to the target version changing after a reconcile operation, and in this case an error will be returned to the application on the post call. It is the application developer’s responsibility to check the CanPost method prior to calling post and handling the post errors mentioned above thrown during the Post operation.

Post first performs a save and then synchronizes the target version with the current edit version. The Post operation cannot be undone.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
canPost in interface IVersionEdit
Returns:
The canPost
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

post

public void post(String versionName)
          throws IOException,
                 AutomationException
Posts the current version to the reconcilled version.

Remarks

The Post method requires that the current edit version has been reconciled with any ancestor versions prior to being called. The implicit locking during a reconcile should greatly increase the chances of the source and target versions being ready to post. There is a possibility that these two versions could be out of sync, possible do to the target version changing after a reconcile operation, and in this case an error will be returned to the application on the post call. It is the application developer’s responsibility to check the CanPost method prior to calling post and handling the post errors mentioned above thrown during the Post operation.

Post first performs a save and then synchronizes the target version with the current edit version. This results in an explicit commit of any open transactions in the database. The Post operation can not be undone.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
post in interface IVersionEdit
Parameters:
versionName - The versionName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.