Attribute

Return to Introduction  Previous page  Next page

public 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

Constraints

Collection

Read only.  A collection of AttributeConstraint objects. Used to access and manage constraints associated with this attribute.

TaggedValues

Collection

Read only.  A collection of AttributeTag objects. Use to access and manage Tagged Values associated with this attribute.

Name

String

Read/Write.  The attribute name.

AttributeGUID

String

Read/Write.  A globally unique ID for the current attribute. System generated.

Visibility

String

Read/Write.  The scope of the attribute. Can be Private, Protected, Public or Package.

Containment

String

Read/Write.  Type of containment. Can be Not Specified, By Reference or
By Value.

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.

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.

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.

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.

LowerBound

String

Read/Write.  A value for the collection lower bound.

UpperBound

String

Read/Write.  A value for the collection upper bound.

Container

String

Read/Write.  The container type. 

Notes

String

Read/Write.  Further notes about this attribute.

IsDerived

Boolean

Read/Write.  Indicates if the attribute is derived (eg. a calculated value).

AttributeID

Long

Read only.  Local ID number of the attribute.

Pos

Long

Read/Write.  Position of the attribute in the class attribute list.

Length

String

Read/Write.  The attribute length, where applicable.

Precision

String

Read/Write.  Precision value.

Scale

String

Read/Write.  Scale value. 

IsConst

Boolean

Read/Write.  Flag indicating if the attribute is Const or not.

Style

String

Read/Write.  Further style information.

StyleEx

String

Read/Write.  Advanced style settings. Use with care.

ClassifierID

Long

Read/Write.  Classifier ID, if appropriate; indicates the base type associated with attribute, if not a primitive type.

Default

String

Read/Write.  Initial value assigned to this attribute.

Type

String

Read/Write.  The attribute type (by name; also see ClassifierID).

Stereotype

String

Read/Write.  Sets or gets the stereotype for this attribute.

ObjectType

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.

StereotypeEx

String

Read/Write.  All the applied stereotypes of the attribute in a comma-separated list.

TaggedValuesEx

Collection

Read only.  Collection of TaggedValue objects belonging to the current attribute and the TaggedValuesEx property of its classifier.

Attribute Methods

Method

Type

Notes

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.

GetLastError ()

String

Returns a string value describing the most recent error that occurred in relation to this object.

This function is rarely used since an exception is thrown when an error occurs.