Link object
A Link object represents an association between a defect and another entity.
You get a Link object from a LinkFactory object.
Public methods
This object supports the following methods.
Method | Description |
---|---|
LockObject |
Locks the object. Returns True if the object has been changed on the server. For details, see LockObject. |
Post |
Posts all changed values into database. For details, see Post. |
Refresh |
Reads saved values, overwriting values in memory. For details, see Refresh. |
Undo |
Undoes changes to field values that have not been posted. For details, see Undo. |
UnLockObject |
Unlocks the object. For details, see UnLockObject. |
Public properties
This object supports the following properties.
Property | R/W | Type | Description |
---|---|---|---|
AutoPost |
R/W | Boolean |
If true, the database is updated immediately when the field value changes. |
AutoUnlock |
R/W | Boolean |
Indicates whether to make the item changeable to other users automatically after a Refresh or Post. |
Comment |
R/W | String |
The link summary comment. |
CreatedBy |
R/W | String |
The user who created the link. |
CreationDate |
R/W | Date |
The link creation date. |
Field |
R/W | Any |
The value of the specified field. Syntax: where fieldName is the name of the field in the project database. Use all upper case. |
FieldMultiValue |
R/W | Object |
The MultiValue object of the specified field. See MultiValue object. Syntax: where fieldName is the name of the field in the project database. Use all upper case. |
ID |
R | Number |
The item ID. |
IsLocked |
R | Boolean |
Checks if object is locked for editing. IsLocked is set by the LockObject method and is reset by the UnlockObject method. If the object has an AutoUnlock property and the property is set to True, IsLocked is also reset by a Post or Refresh operation. |
LinkedByEntity |
R | Object |
The entity object that initiated the link.
|
LinkType |
R/W | String |
The link type. |
Modified |
R | Boolean |
Checks if the item has been modified since last refresh or post operation. If true, the field properties on the server side are not up to date. |
R | Object |
The source entity object of the link. SourceEntity and TargetEntity are not fixed attributes of an association. They reflect the point of view of the factory from which the Link object is obtained. SourceEntity and TargetEntity are the same two objects for a given association. However, which is the source and which is the target may change depending on the Link object. For example, when an association between a test and a defect is viewed from the test side, that is, when the Link object is acquired from the Test.BugLinkFactory, SourceEntity is the test and TargetEntity is the defect. If a Link object representing the same association is acquired from Bug.LinkFactory, SourceEntity is the defect and TargetEntity is the test. |
|
TargetEntity |
R/W | Object |
The target entity object of the link. See SourceEntity. |
TypeName |
R | String |
The field's type. |
Virtual |
R | Boolean |
Checks if this is a virtual item, that is, an item that does not have a corresponding database record. |