com.esri.arcgis.geodatabase
Interface ISchemaLock

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
CadastralFabric, CodedValueDomain, FeatureClass, FeatureDataset, GeometricNetwork, ISchemaLockProxy, NetCDFFeatureClass, NetworkDataset, ObjectClass, RangeDomain, RasterCatalog, RepresentationClass, SchematicDataset, SchematicDiagram, SchematicDiagramClass, SchematicElementClass, SchematicFolder, StreetNetwork, Table, Terrain, Topology, UtilityNetwork

public interface ISchemaLock
extends java.io.Serializable

Provides access to members for accessing schema locking functionality.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

When To Use

Use ISchemaLock to establish an exclusive lock on a dataset when changing its schema, or performing other operations that require exclusive access to the data.

Remarks

The ISchemaLock interface can be used to establish a shared lock on data, however, when accessing data using the components, shared locks are applied automatically. Exclusive locks are never applied automatically, and when performing an action, such as schema modification, that requires an exclusive hold on the data, you must apply an exclusive lock.
Examples of operations that should acquire a schema lock include adding a field to a feature class, associating a new class extension with a feature class, or building a geometric network on a set of feature classes.

See Also:
ISchemaLockInfo, IDataset, IEnumSchemaLockInfo

Method Summary
 void changeSchemaLock(int schemaLock)
          Changes a schema lock.
 void getCurrentSchemaLocks(IEnumSchemaLockInfo[] schemaLockInfo)
          The list of current locks.
 

Method Detail

changeSchemaLock

public void changeSchemaLock(int schemaLock)
                      throws java.io.IOException,
                             AutomationException
Changes a schema lock.

Supported Platforms

Windows, Solaris, Linux

Parameters:
schemaLock - A com.esri.arcgis.geodatabase.esriSchemaLock constant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCurrentSchemaLocks

public void getCurrentSchemaLocks(IEnumSchemaLockInfo[] schemaLockInfo)
                           throws java.io.IOException,
                                  AutomationException
The list of current locks.

Supported Platforms

Windows, Solaris, Linux

Remarks

Returns an enumeration of the schema locks currently on the dataset.  Not that there will always be at least one schema lock on the dataset.  By checking the schema locks on a dataset a shared schema lock is applied to the data.

Parameters:
schemaLockInfo - A reference to a com.esri.arcgis.geodatabase.IEnumSchemaLockInfo (out: use single element array)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.