Class CodedValueDomainClass

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll
[Guid("F84C6C1B-47FF-11D2-9933-0000F80372B4")]
[ClassInterface(ClassInterfaceType.None)]
public class CodedValueDomainClass : CodedValueDomain, IDomain, ICodedValueDomain3, ICodedValueDomain2, ICodedValueDomain, IClone, IPersistStream, IPersist, ISchemaLock, IXMLSerialize
Inheritance
CodedValueDomainClass
Implements
Inherited Members

Constructors

CodedValueDomainClass()

public CodedValueDomainClass()

Explicit Interface Implementations

AddCode(object, string)

Adds a (value, name) code.

virtual void AddCode(object Value, string Name)

Parameters

Value object
Name string

Remarks

The AddCode  method adds a new coded value to the coded value domain. AddCode requires a value for the coded value as a Variant, and the name of the coded value, which is a user friendly description for that coded value, as a String. The value supplied for the variant parameter must be of the correct type for the domain (e.g., Numeric values for a numeric domain, string values for a string domain).
If AddCode is called on a domain that is already created, the IWorkspaceDomains2::AlterDomain method must be called to persist the change.

AlterCodedValueDescription(object, string)

Alters the description for the specified code.

virtual void AlterCodedValueDescription(object Value, string newDescription)

Parameters

Value object
newDescription string

Assign(IClone)

Assigns the properties of src to the receiver.

virtual void Assign(IClone src)

Parameters

src IClone

ChangeSchemaLock(esriSchemaLock)

Changes a schema lock.

virtual void ChangeSchemaLock(esriSchemaLock schemaLock)

Parameters

schemaLock esriSchemaLock

Remarks

There are two kinds of schema locks: shared and exclusive. Shared schema locks are applied automatically by the geodatabase when accessing a dataset and are removed when all references to the dataset are removed. For this reason, it's not necessary to explicitly apply or remove shared schema locks. There is no limit to the number of shared schema locks a dataset or object can have at any given time.
In contrast to shared schema locks, exclusive schema locks are controlled by the developer or ArcGIS application, such as ArcMap or ArcCatalog. An exclusive lock is used to lock a geodatabase dataset or object from use by others to make the necessary changes to it. An exclusive lock is promoted from a shared lock and demoted back to a shared lock when no longer needed. The presence of additional shared schema locks on a dataset or object prevents an exclusive schema lock from being applied and precludes the ability to make changes to the underlying dataset and its schema while it is in use. Only one exclusive schema lock is allowed per dataset. As opposed to shared schema locks, exclusive schema locks are not applied or removed automatically; it is the responsibility of the developer to apply or remove exclusive schema locks.
Limit the scope of exclusive schema locks to the operation that requires the lock. Gather the necessary information to perform the action, obtain the exclusive lock, make the change, and release the lock. Some examples of operations for which an exclusive schema lock should be obtained include:
  • Modifications to attribute domains, such as adding or removing values from a coded value domain or changing the range for range domains
  • Adding or deleting a field from a feature class or object class
  • Associating a class extension with a feature class
  • Creating a topology, geometric network, network dataset, terrain, schematic dataset, representation, or cadastral fabric on a set of feature classes
  • Any use of the IClassSchemaEdit interface
  • Putting a feature class into and taking it out of load-only mode with the IFeatureClassLoad.LoadOnlyMode method
  • Managing (creating, deleting, or modifying) spatial and attribute indexes
Once the action requiring an exclusive schema lock is complete, the exclusive schema lock must be demoted to a shared lock. This includes when errors are raised during the schema modification, for example, consider the case where a field is being deleted from a feature class. To delete the field, an exclusive schema lock is obtained. However, on the call to DeleteField, an error is thrown; that is, the field being deleted is a required field, such as the ObjectID field. In the handling of the error, the exclusive schema lock must be demoted to a shared lock before proceeding.
 
 

Clone()

Clones the receiver and assigns the result to *clone.

virtual IClone Clone()

Returns

IClone

CodeCount

The number of codes for the associated attribute.

virtual int CodeCount { get; }

Returns

int

DeleteCode(object)

Deletes a code with the specified value.

virtual void DeleteCode(object Value)

Parameters

Value object

Remarks

If DeleteCode is called on a domain that is already created, the IWorkspaceDomains2::AlterDomain method must be called to persist the change.

Description

The description of the domain.

virtual string Description { get; set; }

Returns

string

Deserialize(IXMLSerializeData)

Deserializes an object from XML.

virtual void Deserialize(IXMLSerializeData data)

Parameters

data IXMLSerializeData

DomainID

The ID of the domain.

virtual int DomainID { get; set; }

Returns

int

FieldType

The field type of the field.

virtual esriFieldType FieldType { get; set; }

Returns

esriFieldType

GetClassID(out Guid)

virtual void GetClassID(out Guid pClassID)

Parameters

pClassID Guid

GetCurrentSchemaLocks(out IEnumSchemaLockInfo)

The list of current locks.

virtual void GetCurrentSchemaLocks(out IEnumSchemaLockInfo schemaLockInfo)

Parameters

schemaLockInfo IEnumSchemaLockInfo

Remarks

The ISchemaLockInfo interface is used in concert with ISchemaLock to provide information about a schema lock, for example, whether it is shared or exclusive and for ArcSDE geodatabases, the name of the user who has the lock.  Note that there will always be at least one schema lock on the dataset.  Also note that by checking the schema locks on a dataset a shared schema lock is applied to the data. 

GetSizeMax(out _ULARGE_INTEGER)

virtual void GetSizeMax(out _ULARGE_INTEGER pcbSize)

Parameters

pcbSize _ULARGE_INTEGER

ICodedValueDomain2_AddCode(object, string)

virtual void ICodedValueDomain2_AddCode(object Value, string Name)

Parameters

Value object
Name string

ICodedValueDomain2_CodeCount

virtual int ICodedValueDomain2_CodeCount { get; }

Returns

int

ICodedValueDomain2_DeleteCode(object)

virtual void ICodedValueDomain2_DeleteCode(object Value)

Parameters

Value object

ICodedValueDomain2_Name[int]

virtual string ICodedValueDomain2_Name[int Index] { get; }

Parameters

Index int

Returns

string

ICodedValueDomain2_Value[int]

virtual object ICodedValueDomain2_Value[int Index] { get; }

Parameters

Index int

Returns

object

ICodedValueDomain3_AddCode(object, string)

virtual void ICodedValueDomain3_AddCode(object Value, string Name)

Parameters

Value object
Name string

ICodedValueDomain3_CodeCount

virtual int ICodedValueDomain3_CodeCount { get; }

Returns

int

ICodedValueDomain3_DeleteCode(object)

virtual void ICodedValueDomain3_DeleteCode(object Value)

Parameters

Value object

ICodedValueDomain3_Name[int]

virtual string ICodedValueDomain3_Name[int Index] { get; }

Parameters

Index int

Returns

string

ICodedValueDomain3_SortByName(bool)

virtual void ICodedValueDomain3_SortByName(bool descending)

Parameters

descending bool

ICodedValueDomain3_SortByValue(bool)

virtual void ICodedValueDomain3_SortByValue(bool descending)

Parameters

descending bool

ICodedValueDomain3_Value[int]

virtual object ICodedValueDomain3_Value[int Index] { get; }

Parameters

Index int

Returns

object

ICodedValueDomain_Name[int]

The code name for the specified code index.

virtual string ICodedValueDomain_Name[int Index] { get; }

Parameters

Index int

Returns

string

Remarks

This property returns the name of valid coded value for the ith coded value in the coded value domain, where i is the index of the coded value as a Long . The name is returned as a String .

IPersistStream_GetClassID(out Guid)

virtual void IPersistStream_GetClassID(out Guid pClassID)

Parameters

pClassID Guid

IsDirty()

virtual void IsDirty()

IsEqual(IClone)

Indicates if the receiver and other have the same properties.

virtual bool IsEqual(IClone other)

Parameters

other IClone

Returns

bool

IsIdentical(IClone)

Indicates if the receiver and other are the same object.

virtual bool IsIdentical(IClone other)

Parameters

other IClone

Returns

bool

Load(IStream)

virtual void Load(IStream pstm)

Parameters

pstm IStream

MemberOf(object)

Indicates whether the value is a valid member of the domain.

virtual bool MemberOf(object Value)

Parameters

Value object

Returns

bool

MergePolicy

The merge policy.

virtual esriMergePolicyType MergePolicy { get; set; }

Returns

esriMergePolicyType

Name

The name of the domain.

virtual string Name { get; set; }

Returns

string

Owner

The owner of the domain.

virtual string Owner { get; set; }

Returns

string

Remarks

This property only applies to domains in ArcSDE geodatabases.

Save(IStream, int)

virtual void Save(IStream pstm, int fClearDirty)

Parameters

pstm IStream
fClearDirty int

Serialize(IXMLSerializeData)

Serializes an object to XML.

virtual void Serialize(IXMLSerializeData data)

Parameters

data IXMLSerializeData

SortByName(bool)

Sort the codes in the coded value domain by name.

virtual void SortByName(bool descending)

Parameters

descending bool

SortByValue(bool)

Sort the codes in the coded value domain by value.

virtual void SortByValue(bool descending)

Parameters

descending bool

SplitPolicy

The split policy.

virtual esriSplitPolicyType SplitPolicy { get; set; }

Returns

esriSplitPolicyType

Type

The domain type.

virtual esriDomainType Type { get; }

Returns

esriDomainType

Value[int]

The value for the specified code index.

virtual object Value[int Index] { get; }

Parameters

Index int

Returns

object

Remarks

This property returns the coded value for the specified position in the coded value domain. The type of object returned depends on the type of field associated with the domain; for example, if the domain applies to Text fields, the value returned will be a string. The IDomain.FieldType property can be used to determine the type of field associated with a domain.