TBoldObjectList¶
A list of Bold objects
Unit: BoldSystem
Declaration¶
Hierarchy¶
- TObject
TBoldMemoryManagedObjectTBoldFlaggedObject- TBoldSubscribableObject
- TBoldElement
- TBoldDomainElement
- TBoldMember
- TBoldList
- TBoldObjectList
- Direct subclasses
TBoldAbstractDirtyListTBusinessClassesRootList
Description¶
Apart from being a list of Bold objects, TBoldObjectList also offers methods for manipulating the list as a list of TBoldObjectLocators. Using these methods can be more efficient, as the objects won't have to be fetched from persistent storage.
Properties¶
| Name | Summary | Notes |
|---|---|---|
| Adjusted | Bold-internal | |
| BoldObjects | The objects in the list | |
| BoldRoleRTInfo | read-only | |
| Locators | The locators of the objects in the list. | |
| SubscribeToLocatorsInList | If the list should detect, and automatically remove, locators that are freed. | |
| SubscribeToObjectsInList | If the list should automatically remove objects that are deleted. |
Adjusted¶
Bold-internal
BoldObjects¶
The objects in the list
BoldRoleRTInfo¶
This property is the same as BoldMemberRtInfo, casted to TBoldRoleRTInfo.
Locators¶
The locators of the objects in the list.
SubscribeToLocatorsInList¶
When this property is false, the list will not detect if any of its locators are destroyed. This is only useful if you know that it will never happen (otherwise you will get dangling references, and loads of problems).
See Also
- Subscriptions
SubscribeToObjectsInList¶
Set this property to False if you need a list that can hold deleted objects, or if the automatic removal upsets your looping. Default is True.
See Also
- Subscriptions
Methods¶
| Name | Summary | Notes |
|---|---|---|
| Add | Adds a Bold object to the list | |
| AddElement | Overrides TBoldList.AddElement | protected, override |
| AddList | Overrides TBoldList.AddList | override |
| AddLocator | Adds an object by using its locator. | |
| AllocateData | Overrides TBoldList.AllocateData | protected, override |
| Assign | Overrides TBoldElement.Assign | override |
| AtTime | Overrides TBoldMember.AtTime | override |
| CanInsert | Overrides TBoldList.CanInsert | override |
| CanInsertLocator | Same as CanInsert, but takes a locator instead | |
| CanSet | Overrides TBoldList.CanSet | override |
| CanSetLocator | Same as CanSet, but takes a locator instead | |
| CreateObjectIdList | Creates an object id list, containing the object ids of the objects in the list. | |
| CreateTypedList | Obsolete | |
| EnsureObjects | Fetches several objects in one operation. | |
| EnsureRange | Fetches several objects in one operation. | override |
| FillFromIDList | Adds the objects with the ids in IdList. | |
| FreeContent | Overrides TBoldMember.FreeContent | protected, override |
| FreeData | Overrides TBoldList.FreeData | protected, override |
| GetByIndex | Lookup using qualifiers | |
| GetByIndexAndSubscribe | Same as GetByIndex, but also places subscriptions | |
| GetCount | Overrides TBoldList.GetCount | protected, override |
| GetElement | Overrides TBoldList.GetElement | protected, override |
| GetStreamName | Overrides TBoldMember.GetStreamName | protected, override |
| Includes | Same as TBoldList.Includes, but typed as TBoldObject. | |
| IncludesElement | Overrides TBoldList.IncludesElement. | protected, override |
| IndexOf | Same as TBoldList.IndexOf, but typed as TBoldObject | |
| IndexOfElement | Overrides TBoldList.IndexOfElement. | protected, override |
| IndexOfLocator | Same as IndexOf, but takes a locator instead. | |
| InitializeMember | Overrides TBoldMember.InitializeMember. | protected, override |
| Insert | Same as TBoldList.Insert, but types as a TBoldObject. | |
| InsertElement | Overrides TBoldList.InsertElement. | protected, override |
| InsertLocator | Same as Insert, but takes a locator instead. | |
| InsertNew | Overrides TBoldList.InsertNew. | override |
| InternalAddNew | Overrides TBoldList.InternalAddNew. | protected, override |
| InternalClear | protected, override | |
| InternalCreateClassList | Bold-internal | |
| LocatorInList | Indicates if the object with a given locator is in the list. | |
| Move | Overrides TBoldList.Move. | override |
| ObserverMayModify | Overrides TBoldElement.ObserverMayModify. | override |
| ProxyClass | Overrides TBoldMember.ProxyClass. | protected, override |
| ProxyInterface | Overrides TBoldElement.ProxyInterface. | override |
| RemoveByIndex | Overrides TBoldList.RemoveByIndex. | override |
| SetElement | Overrides TBoldList.SetElement | protected, override |
Add¶
Same as Add, except that the argument is typed as a TBoldObject.
AddElement¶
Overrides AddElement
AddList¶
Overrides AddList
AddLocator¶
Adds the locator NewLocator, and thus indirectly the Bold object associated with the locator, to the list. This may be a useful optimization if you don't actually need to fetch the object's data.
AllocateData¶
Overrides AllocateData
Assign¶
If Source is a TBoldObjectList, then the objects in source will be added to the list. Objects not in Source will be removed from the list.
AtTime¶
Overrides AtTime
CanInsert¶
function CanInsert(index: Integer; Element: TBoldElement; Subscriber: TBoldSubscriber): Boolean; override; See also Ancestor Method
See CanInsert
CanInsertLocator¶
function CanInsertLocator(index: Integer; Locator: TBoldObjectLocator; Subscriber: TBoldSubscriber): Boolean;
Returns True if Locator may be inserted in position **index** in the list. A programmer can disallow Insert by subscribing to the bqMayInsert query. If a Subscriber is passed to the function, subscriptions will be placed to notify when the result of MayInsert may have changed.
CanSet¶
function CanSet(index: Integer; Element: TBoldElement; Subscriber: TBoldSubscriber): Boolean; override; See also Ancestor Method
See CanSet
CanSetLocator¶
function CanSetLocator(index: Integer; Locator: TBoldObjectLocator; Subscriber: TBoldSubscriber): Boolean;
Returns True if the locator in position **index** in the list may be replaced by Locator. This corresponds to assigning to the Locators array property. A programmer can disallow this by subscribing to the bqMayReplace query. If a Subscriber is passed to the function, subscriptions will be placed to notify when the result of MayReplace may have changed.
CreateObjectIdList¶
Creates an object id list, containing the object ids of the objects in the list. Ownership of the id list is passed to the caller.
CreateTypedList¶
Obsolete. If you want to create an object list for a specific class, use the generated list type instead (such as TPersonList, for the class TPerson).
EnsureObjects¶
If some of the objects in the list are not loaded, these will be fetched from persistent storage. This can increase efficiency as all objects are fetched in one operation, rather than one at a time.
EnsureRange¶
Same as EnsureObjects, except that only the objects between FromIndex and ToIndex are fetched.
FillFromIDList¶
The objects who's object ids are in IdList will be added to the list. Objects that are already in the list remain.
FreeContent¶
Overrides FreeContent
FreeData¶
Overrides FreeData
GetByIndex¶
If the object list corresponds to a qualified association, this function will return the object that is qualified by the values in the member list. It is usually easier to use the qualified property on the owning object instead such as aBank.Accounts['anAccountNumber'].
GetByIndexAndSubscribe¶
function GetByIndexAndSubscribe(MemberList: TBoldMemberList; Subscriber: TBoldSubscriber): TBoldObject;
Same as GetByIndex, but also places subscriptions
See Also
- Subscriptions
GetCount¶
Overrides GetCount
GetElement¶
Overrides GetElement
GetStreamName¶
Overrides GetStreamName
Includes¶
Same as Includes, but typed as TBoldObject.
IncludesElement¶
Overrides IncludesElement
IndexOf¶
Return the position of BoldObject in the list, or -1 if the item is not in the list. If there are multiple occurences of BoldObject, IndexOf will return the index of the first occurence.
IndexOfElement¶
Overrides IndexOfElement.
IndexOfLocator¶
Same as IndexOf, but takes a locator instead.
InitializeMember¶
procedure InitializeMember(AOwningElement: TBoldDomainElement; ElementTypeInfo: TBoldElementTypeInfo); override; See also Ancestor Method
Overrides InitializeMember.
Insert¶
Same as Insert, but typed as a TBoldObject.
InsertElement¶
Overrides InsertElement.
InsertLocator¶
Same as Insert, but takes a locator instead.
InsertNew¶
Overrides InsertNew.
InternalAddNew¶
Overrides InternalAddNew.
InternalClear¶
InternalCreateClassList¶
Bold-internal
LocatorInList¶
This method is often the fastest way to test if an object is in the list. Since the list is indexed, LocatorInList is faster than using IndexOf. Also, LocatorInList does not fetch the object.
Move¶
Overrides Move.
ObserverMayModify¶
Overrides ObserverMayModify.
ProxyClass¶
Overrides ProxyClass.
ProxyInterface¶
function ProxyInterface(const IId: TGUID; Mode: TBoldDomainElementProxyMode; out Obj): Boolean; override; See also Ancestor Method
Overrides ProxyInterface.
RemoveByIndex¶
Overrides RemoveByIndex.
SetElement¶
Overrides SetElement
Generated from the Bold 4.0 help (Help/BfD.chm) by Tools/chm2mkdocs.py; member lists reflect Bold 4.0, see the source for members added since.