com.esri.arcgis.geodatabasedistributed
Class SchemaChanges

java.lang.Object
  extended by com.esri.arcgis.geodatabasedistributed.SchemaChanges
All Implemented Interfaces:
ISchemaChanges, ISchemaChangesInit, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class SchemaChanges
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISchemaChanges, ISchemaChangesInit

Esri Schema Changes object.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
SchemaChanges()
          Constructs a SchemaChanges using ArcGIS Engine.
SchemaChanges(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
SchemaChanges theSchemaChanges = (SchemaChanges) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 IEnumSchemaChange getChanges()
          An enumeration of the replica schema changes.
static String getClsid()
          getClsid.
 IGPReplica getFromReplica()
          The replica thatis the source of the schema changes.
 IGPReplica getToReplica()
          The replica that is the target for the schema changes.
 int hashCode()
          the hashcode for this object
 void init(IReplica replica, IWorkspaceName targetWorkspaceName)
          Initializes the object using the replica and the target replica workspace.
 void initFromSchemaDifferencesDocument(String xmlFile, IWorkspaceName targetWorkspaceName)
          Initializes the object using a schema differences document and a target replica workspace.
 void initFromSchemaDocument(String xmlFile, IWorkspaceName targetWorkspaceName)
          Initializes the object using a replica schema document and a target replica workspace.
 
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

SchemaChanges

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

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

SchemaChanges

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

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

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

getChanges

public IEnumSchemaChange getChanges()
                             throws IOException,
                                    AutomationException
An enumeration of the replica schema changes.

Remarks

The GetChanges method returns the schema changes from the SchemaChanges object.

This method returns a reference to an object that implements IEnumSchemaChange. See the IEnumSchemaChange interface for more information.

Product Availability

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

Specified by:
getChanges in interface ISchemaChanges
Returns:
A reference to a com.esri.arcgis.geodatabasedistributed.IEnumSchemaChange
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getFromReplica

public IGPReplica getFromReplica()
                          throws IOException,
                                 AutomationException
The replica thatis the source of the schema changes.

Remarks

This method returns the replica that is the source of the schema changes. This replica is returned as a reference to an object that implements IGPReplica. See the GPReplica coclass for more information.

Product Availability

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

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

getToReplica

public IGPReplica getToReplica()
                        throws IOException,
                               AutomationException
The replica that is the target for the schema changes.

Remarks

This method returns the replica that is the target for the schema changes. This replica is returned as a reference to an object that implements IGPReplica. See the GPReplica coclass for more information.

Product Availability

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

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

init

public void init(IReplica replica,
                 IWorkspaceName targetWorkspaceName)
          throws IOException,
                 AutomationException
Initializes the object using the replica and the target replica workspace.

Remarks

The init method initializes the SchemaChanges object in a connected environment. Once the SchemaChanges object has been initialized, you can inspect schema differences between parent and child replicas.

The Replica parameter is the replica which is the source of the comparison. The targetWorkspaceName is the workspace name of the relative replica to which you would like to compare the Replica schema to.

For example, imagine you make a few schema changes to the child replica, such as dropping a table. and/or adding a field. Now you would like to inspect the schema differences between the child and parent replica. Pass in the Child replica for the Replica parameter and the parent replica workspace name as the targetWorkspaceName to initialize the schemaChanges object. You may now use method ISchemaChanges::GetChanges method to inspect the schema differences. See the SchemaChanges::ISchemaChanges interface for more information. You can apply any schema differences to the replica associated with the targetWorkspaceName by using methods on the ISchemaChangeInfo interface.

Product Availability

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

Specified by:
init in interface ISchemaChangesInit
Parameters:
replica - A reference to a com.esri.arcgis.geodatabase.IReplica (in)
targetWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initFromSchemaDocument

public void initFromSchemaDocument(String xmlFile,
                                   IWorkspaceName targetWorkspaceName)
                            throws IOException,
                                   AutomationException
Initializes the object using a replica schema document and a target replica workspace.

Remarks

Initializes SchemaChanges object from a replica schema document. Once the SchemaChanges object has been initialized, you can inspect schema differences between replica schema defined in the xmlfile and it's relative replica.

The xmlfile is the replica schema document of one replica. The targetWorkspaceName is the workspace name of the relative replica.

Product Availability

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

Specified by:
initFromSchemaDocument in interface ISchemaChangesInit
Parameters:
xmlFile - The xmlFile (in)
targetWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initFromSchemaDifferencesDocument

public void initFromSchemaDifferencesDocument(String xmlFile,
                                              IWorkspaceName targetWorkspaceName)
                                       throws IOException,
                                              AutomationException
Initializes the object using a schema differences document and a target replica workspace.

Remarks

This method initializes a SchemaChanges object from a schema differences document.

The xmlfile is the schema differences document. The targetWorkspaceName is the workspace name of the replica you are making the comparison to.

Product Availability

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

Specified by:
initFromSchemaDifferencesDocument in interface ISchemaChangesInit
Parameters:
xmlFile - The xmlFile (in)
targetWorkspaceName - A reference to a com.esri.arcgis.geodatabase.IWorkspaceName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.