com.esri.arcgis.geodatabase
Interface IVersionEdit

All Superinterfaces:
Serializable
All Known Subinterfaces:
IVersionEdit2, IVersionEdit3, IVersionEdit4
All Known Implementing Classes:
IVersionEdit2Proxy, IVersionEdit3Proxy, IVersionEdit4Proxy, IVersionEditProxy, VersionedWorkspace

public interface IVersionEdit
extends 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.


Method Summary
 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.
 

Method Detail

getModifiedClasses

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

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

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

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

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

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

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

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

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

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

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

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

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

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

canPost

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

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

post

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

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