com.esri.arcgis.geodatabasedistributed
Class CheckInDataSynchronizer

java.lang.Object
  extended by com.esri.arcgis.geodatabasedistributed.CheckInDataSynchronizer
All Implemented Interfaces:
ICheckInDataSynchronizer, ICheckInDataSynchronizer2, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class CheckInDataSynchronizer
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ICheckInDataSynchronizer, ICheckInDataSynchronizer2

Synchronizes changes from a check-out with the master geodatabase.

Remarks

This class can be used with the DeltaDataChanges and CheckOutDataChanges coClasses to update the master geodatabase with changes from the check-out geodatabase. This is similar to a check in, but in this case the data is still checked out after the synchronization.

NOTE: It is recommended that you use ICheckin interface to check in changes instead of this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
ICheckIn.checkInFromGDB(com.esri.arcgis.geodatabase.IWorkspaceName, String, com.esri.arcgis.geodatabase.IWorkspaceName, boolean, boolean), ICheckIn, CheckIn, Serialized Form

Constructor Summary
CheckInDataSynchronizer()
          Constructs a CheckInDataSynchronizer using ArcGIS Engine.
CheckInDataSynchronizer(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
CheckInDataSynchronizer theCheckInDataSynchronizer = (CheckInDataSynchronizer) obj;
 
Method Summary
 void addIFeatureProgressListener(IFeatureProgress theListener)
          addIFeatureProgressListener.
 void addIReplicaProgressListener(IReplicaProgress theListener)
          addIReplicaProgressListener.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 void removeIFeatureProgressListener(IFeatureProgress theListener)
          removeIFeatureProgressListener.
 void removeIReplicaProgressListener(IReplicaProgress theListener)
          removeIReplicaProgressListener.
 boolean synchronize(IDataChanges dataChanges, String editVersionName, IWorkspaceName parentWorkspace, boolean reconcileCheckout, boolean createOIDMappingTable)
          Synchronizes the changes in the check-out geodatabase or delta database with the master geodatabase.
 boolean synchronize2(IDataChanges dataChanges, String editVersionName, IWorkspaceName parentWorkspace, boolean reconcileCheckout, int reconcilePolicy, boolean columnLevel, boolean createOIDMappingTable)
          Synchronizes the changes in the check-out geodatabase or delta database with the master geodatabase.
 
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

CheckInDataSynchronizer

public CheckInDataSynchronizer()
                        throws IOException,
                               UnknownHostException
Constructs a CheckInDataSynchronizer using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

CheckInDataSynchronizer

public CheckInDataSynchronizer(Object obj)
                        throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
CheckInDataSynchronizer theCheckInDataSynchronizer = (CheckInDataSynchronizer) obj;

Construct a CheckInDataSynchronizer using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to CheckInDataSynchronizer.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

addIFeatureProgressListener

public void addIFeatureProgressListener(IFeatureProgress theListener)
                                 throws IOException
addIFeatureProgressListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.geodatabase.IFeatureProgress interface.
Throws:
IOException - If there are communications problems.

removeIFeatureProgressListener

public void removeIFeatureProgressListener(IFeatureProgress theListener)
                                    throws IOException
removeIFeatureProgressListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.geodatabase.IFeatureProgress interface.
Throws:
IOException - If there are communications problems.

addIReplicaProgressListener

public void addIReplicaProgressListener(IReplicaProgress theListener)
                                 throws IOException
addIReplicaProgressListener. Listen to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.geodatabasedistributed.IReplicaProgress interface.
Throws:
IOException - If there are communications problems.

removeIReplicaProgressListener

public void removeIReplicaProgressListener(IReplicaProgress theListener)
                                    throws IOException
removeIReplicaProgressListener. Stop listening to events generated by this class.

Parameters:
theListener - An object that implements the com.esri.arcgis.geodatabasedistributed.IReplicaProgress interface.
Throws:
IOException - If there are communications problems.

synchronize

public boolean synchronize(IDataChanges dataChanges,
                           String editVersionName,
                           IWorkspaceName parentWorkspace,
                           boolean reconcileCheckout,
                           boolean createOIDMappingTable)
                    throws IOException,
                           AutomationException
Synchronizes the changes in the check-out geodatabase or delta database with the master geodatabase.

Remarks

The Synchronize method transfers the changes from a check-out geodatabase (either personal, file, or ArcSDE) or a delta file to a parent replica (previously referred to as a master geodatabase). It does not unregister the check-out.

If reconcileCheckout is TRUE, the changes are applied to the check-out version and this version is reconciled with it’s parent version. If reconcileCheckout is FALSE, the changes are applied to the check-out version, but no reconcile is performed.

The editVersionName is the check-out version.

The method returns a boolean value, which like the IGeoDBDataCheckin::Checkin method , returns True if there were conflicts on check in and False otherwise.

NOTE: It is recommended that you use ICheckin interface to check in changes instead of this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
synchronize in interface ICheckInDataSynchronizer
Parameters:
dataChanges - A reference to a com.esri.arcgis.geodatabasedistributed.IDataChanges (in)
editVersionName - The editVersionName (in)
parentWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
reconcileCheckout - The reconcileCheckout (in)
createOIDMappingTable - The createOIDMappingTable (in)
Returns:
The conflictsDetected
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
ICheckIn.checkInFromGDB(com.esri.arcgis.geodatabase.IWorkspaceName, String, com.esri.arcgis.geodatabase.IWorkspaceName, boolean, boolean), ICheckIn

synchronize2

public boolean synchronize2(IDataChanges dataChanges,
                            String editVersionName,
                            IWorkspaceName parentWorkspace,
                            boolean reconcileCheckout,
                            int reconcilePolicy,
                            boolean columnLevel,
                            boolean createOIDMappingTable)
                     throws IOException,
                            AutomationException
Synchronizes the changes in the check-out geodatabase or delta database with the master geodatabase.

Remarks

The Synchronize2 method transfers the changes from a check-out geodatabase (either personal, file, or ArcSDE) or a delta file to a parent replica (previously referred to as a master geodatabase). It does not unregister the check-out.

If reconcileCheckout is TRUE, the changes are applied to the check-out version and this version is reconciled with it’s parent version. If reconcileCheckout is FALSE, the changes are applied to the check-out version, but no reconcile is performed.

The editVersionName is the check-out version.

The childReconcilePolicy parameter takes an esriReplicaReconilePolicyType enumeration to determine how conflicts will be handled during reconcile. The following describes the meaning of each enumeration:

esriReplicaDetectConflicts -If conflicts occur, the reconcile process is aborted and you must reconcile and post manually after sycnhronization is completed.

esriReplicaResolveConflictsInFavorOfImportedChanges - The representation in the check-out geodatabase is automatically applied if conflicts arrise.

esriReplicaResolveConflictsInFavorOfDatabaseChanges - The representation from the parent replica importing is automatically applied if conflicts arrise.

esriReplicaResolveConflictsNone - It indicates that a reconcile and post should not be applied during synchronization.

If columnLevel is TRUE, conflicts are detected only when the same attribute is updated in both the check-out and the parent replica. For example, if the check-out has modified the parcel's owner attribute and the parent replica has modified the parcel's street address attribute the feature will not be in conflict. It is only when each version modifies the same attribute that the object will be in conflict.

The Synchronize2 method returns TRUE if conflicts were detected. It returns FALSE if no conflicts were detected.

NOTE: It is recommended that you use ICheckin interface to check in changes instead of this interface.

Product Availability

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

Specified by:
synchronize2 in interface ICheckInDataSynchronizer2
Parameters:
dataChanges - A reference to a com.esri.arcgis.geodatabasedistributed.IDataChanges (in)
editVersionName - The editVersionName (in)
parentWorkspace - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
reconcileCheckout - The reconcileCheckout (in)
reconcilePolicy - A com.esri.arcgis.geodatabase.esriReplicaReconcilePolicyType constant (in)
columnLevel - The columnLevel (in)
createOIDMappingTable - The createOIDMappingTable (in)
Returns:
The conflictsDetected
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.