Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.
Attribute Class
An attribute corresponds to a UML Attribute. It contains further collections for constraints and Tagged Values. Attributes are accessed from the Element Attributes collection.
Associated table in .EAP file: t_attribute
Attribute Attributes
Attribute |
Type |
Notes |
---|---|---|
AllowDuplicates |
Boolean |
Read/Write. Indicates if duplicates are allowed in the collection. If the attribute represents a database column, this when set represents the Not Null option. |
AttributeGUID |
String |
Read only. A globally unique ID for the current attribute. System generated. |
AttributeID |
Long |
Read only. Local ID number of the attribute. |
ClassifierID |
Long |
Read/Write. Classifier ID, if appropriate; indicates the base type associated with attribute, if not a primitive type. |
Container |
String |
Read/Write. The container type. |
Containment |
String |
Read/Write. Type of containment. Can be Not Specified, By Reference or By Value. |
Constraints |
Read only. A collection of AttributeConstraint objects. Used to access and manage constraints associated with this attribute. |
|
Default |
String |
Read/Write. Initial value assigned to this attribute. |
IsCollection |
Boolean |
Read/Write. Indicates if the current feature is a collection or not. If the attribute represents a database column, this when set represents a Foreign Key. |
IsConst |
Boolean |
Read/Write. Flag indicating if the attribute is Const or not. |
IsDerived |
Boolean |
Read/Write. Indicates if the attribute is derived (that is, a calculated value). |
IsOrdered |
Boolean |
Read/Write. Indicates if a collection is ordered or not. If the attribute represents a database column, this when set represents a Primary Key. |
IsStatic |
Boolean |
Read/Write. Indicates if the current attribute is a static feature or not. If the attribute represents a database column, this when set represents the Unique option. |
Length |
String |
Read/Write. The attribute length, where applicable. |
LowerBound |
String |
Read/Write. A value for the collection lower bound. |
Name |
String |
Read/Write. The attribute name. |
Notes |
String |
Read/Write. Further notes about this attribute. |
ObjectType |
Read only. Distinguishes objects referenced through a Dispatch interface. |
|
ParentID |
Long |
Read only. Returns the ElementID of the element that this attribute is a part of. |
Pos |
Long |
Read/Write. Position of the attribute in the Class attribute list. |
Precision |
String |
Read/Write. Precision value. |
Scale |
String |
Read/Write. Scale value. |
Stereotype |
String |
Read/Write. Sets or gets the stereotype for this attribute. |
StereotypeEx |
String |
Read/Write. All the applied stereotypes of the attribute in a comma-separated list. |
Style |
String |
Read/Write. Contains the Alias property for this attribute. |
StyleEx |
String |
Read/Write. Advanced style settings. Reserved for the use of Sparx Systems. |
TaggedValues |
Collection of type AttributeTag |
Read only. A collection of AttributeTag objects. Use to access and manage Tagged Values associated with this attribute. |
TaggedValuesEx |
Collection of type TaggedValue |
Read only. Collection of TaggedValue objects belonging to the current attribute and the TaggedValuesEx property of its classifier. |
Type |
String |
Read/Write. The attribute type (by name; also see ClassifierID). |
UpperBound |
String |
Read/Write. A value for the collection upper bound. |
Visibility |
String |
Read/Write. The scope of the attribute. Can be Private, Protected, Public or Package. |
Attribute Methods
Method |
Type |
Notes |
---|---|---|
GetLastError () |
String |
Returns a string value describing the most recent error that occurred in relation to this object. This function is rarely used as an exception is thrown when an error occurs. |
Update () |
Boolean |
Updates the current attribute object after modifying or appending a new item. If false is returned, check the GetLastError function for more information. |
Notes:
- The Attribute Class in Enterprise Architect does not have an Alias property. You can access the Alias property of the Attribute Class using the Style property.