com.esri.arcgis.carto
Class ChangeDatabaseVersion

java.lang.Object
  extended by com.esri.arcgis.carto.ChangeDatabaseVersion
All Implemented Interfaces:
IChangeDatabaseVersion, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class ChangeDatabaseVersion
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IChangeDatabaseVersion

Change Database Version operation.

Remarks

ChangeDatabaseVersion is a coarse grained object that simplifies the process of changing the version of all the layers and tables in a map. See IChangeDatabaseVersion for more information on the methods this object implements.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
ChangeDatabaseVersion()
          Constructs a ChangeDatabaseVersion using ArcGIS Engine.
ChangeDatabaseVersion(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
ChangeDatabaseVersion theChangeDatabaseVersion = (ChangeDatabaseVersion) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 ISet execute(IVersion pFrom, IVersion pTo, IBasicMap pMap)
          Replaces the version of the feature classes for all the layers that belong to the From version to To version.
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 
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

ChangeDatabaseVersion

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

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

ChangeDatabaseVersion

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

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

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

execute

public ISet execute(IVersion pFrom,
                    IVersion pTo,
                    IBasicMap pMap)
             throws IOException,
                    AutomationException
Replaces the version of the feature classes for all the layers that belong to the From version to To version.

Remarks

The Execute method is used to change the version of versioned data from one version to another. The versions can be transactional or historical. The input parameters of this method are:

pFrom: The version to move away from. Only layers with a data source referencing this version will be changed.

pTo: The version to change to.

pMap: An IBasicMap reference, which could be a Map, Globe, or Scene, that contains the layers to be changed.

The return parameter of the method is a set of table and layer references of the layers that had their version changed.

This command fires the following events:

IActiveViewEvents::ContentsChanged when executed on a Map, Scene, or Globe.

Additionally the events IMapEvents::FeatureClassChanged and IMapEvents2::TableChanged are fired for each layer and table respectively when changing the version on a Map.

When executing this method on a Map, you may wish to call IMapAdmin::FireChangeVersion prior to performing the version change to additionally notify listeners of the change.

Product Availability

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

Specified by:
execute in interface IChangeDatabaseVersion
Parameters:
pFrom - A reference to a com.esri.arcgis.geodatabase.IVersion (in)
pTo - A reference to a com.esri.arcgis.geodatabase.IVersion (in)
pMap - A reference to a com.esri.arcgis.carto.IBasicMap (in)
Returns:
A reference to a com.esri.arcgis.system.ISet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.