PropertyDef Object
When you define a class for an information model, you specify the interfaces that the class implements. For each of those interfaces, specify the members (properties, methods, and collections) that are attached to the interface.
Before you can attach a property to an interface, a property definition object must exist for the property. The characteristics of the property (its name, dispatch identifier, data type, and various storage details) are stored in the property definition object. These characteristics are defined by the properties of the property definition object.
To create a new property definition
- Use the CreatePropertyDef method of the InterfaceDef object.
- Define any non-default characteristics of your new property definition by manipulating the properties of the property definition object.
- Commit your changes to a repository database.
A PropertyDef object is also a RepositoryObject and a RepositoryObjectVersion object. You can also access members that are defined for these objects, and members of IInterfaceMember2, IViewPropertyDef and IVersionAdminInfo2. For more information about accessing a member of an interface that is not the default interface, see Accessing Automation Object Members.
When to Use
Use the PropertyDef object to retrieve or modify the characteristics of a property definition, or to determine which interface exposes a particular property.
Properties
Property | Description |
---|---|
APIType | The C data type of the property |
ColumnName | The name of the column in the SQL table for this property |
DispatchID | The dispatch identifier to use when accessing an instance of this type of property |
Flags | Flags that specify details about this property definition |
MemberSynonym | Stores a synonym of the property name |
SQLBlobSize | The SQL BLOB size of the property |
SQLScale | The number of digits to the right of the decimal point for a numeric property |
SQLSize | The size in bytes of the property |
SQLType | The SQL data type of the property |
Collections
Collection | Description |
---|---|
EnumerationDef | The collection of EnumerationDef objects to which this property definition is attached |
Interface | The interface to which this property definition is attached |
Properties | The collection of all persistent properties that are attached to the PropertyDef object |