TBoldSystemHandle¶
A TBoldSystemHandle component is used in the IDE of Delphi to represent an entire system of business elements, also known as an object-space.
Unit: BoldSystemHandle
Declaration¶
Hierarchy¶
- TComponent
- TBoldSubscribableComponent
- TBoldElementHandle
- TBoldAbstractSystemHandle
- TBoldSystemHandle
Description¶
In order to use it you must set SystemTypeInfoHandle to point at a TBoldSystemTypeInfoHandle which in turn must be connected to the TBoldModel for the system. If the system is to be persistent PersistenceHandle must also be connected. The active property decides whether the system is active or not. In most cases Active is left false at designtime, and AutoActivate is used instead.
Value
The value of the handle is the system owned by the handle. It will be nil if active is false.
Typing
The StaticBoldType is the type information for the entire system, which is held by SystemTypeInfoHandle.
Bold Events
TBoldSystemHandle is a subclass of TBoldSubscribableComponent, and can therefore by subscribed to using AddSmallSubscription. A TBoldSystemHandle can send the following events:
beDestroying: Sent when the handle is about to be destroyed.beValueIdentityChanged: Sent wheneverActiveorTBoldAbstractSystemHandle.SystemTypeInfoHandleis changed.
Properties¶
| Name | Summary | Notes |
|---|---|---|
| AutoActivate | Indicates if the system should be autmatically started when the application starts. | |
| OnPreUpdate | ||
| PersistenceHandle | If a system is to be persistent it must be connected to a TBoldPersistenceHandle . | |
| Persistent | This read-only property is true if PersistenceHandle is assigned. | read-only |
| RegionFactory | read-only |
AutoActivate¶
If AutoActivate is True, Active will be set to True at runtime, otherwise Active will be False at start-up, and must be set to True programatically.
OnPreUpdate¶
PersistenceHandle¶
The persistence-handle defines all properties related to persistence. Persistence will only work properly if the PersistenceHandle is connected to the same model as the system-handle (or at least one containing an identical model).
Advanced information
The PersistenceHandle is stateless, so it is possible to connect multiple system-handles to the same persistence-handle.
Persistent¶
Persistent evaluates to True if the PersistenceHandle is assigned.
RegionFactory¶
Creates regions for the system, according to the region definitions supplied in the model.
Methods¶
| Name | Summary | Notes |
|---|---|---|
| create | Creates an instance of TBoldSystemHandle | override |
| DefineProperties | protected, override | |
| Destroy | override | |
| GetActive | protected, override | |
| GetSystem | protected, override | |
| GetValue | protected, override | |
| InstallOclDefinitionLookUp | Used by a repository to provide a Lookup-function for the OCL evaluator | |
| Loaded | protected, override | |
| ModelChanged | protected, override | |
| RefersToComponent | Determine if there is a relationship to the component passed as parameter. | override |
| SetActive | protected, override | |
| UpdateDatabase | Calling UpdateDatabase will update the database with all changes made in the objectspace belonging to the component. |
create¶
Use create to create an instance of TBoldSystemHandle.
Note that it needs some information to do its thing, most notably the SystemTypeInfoHandle must be set. To be able to persist the object space, the PersistenceHandle needs to be set.
DefineProperties¶
Destroy¶
Destroys the TBoldSystemHandle, freeing all resources, including the entire TBoldSystem if it is still active.
Bold events
Calling Destroy can result in the following events:
beDestroying: Sent when the handle is about to be destroyed, i.e. before any part of the destruction has been performed.
Don't call Destroy directly. Use Free instead.
GetActive¶
GetSystem¶
GetValue¶
InstallOclDefinitionLookUp¶
This method is intended to be used by the TBoldOCLRepository to provide the OCL evaluator with a callback to perform a lookup of an expression in the repository
Loaded¶
ModelChanged¶
RefersToComponent¶
function RefersToComponent(Component: TBoldSubscribableComponent): Boolean; override; See also Ancestor Method
RefersToComponent determins if there is a relationship between the TBoldSystemHandle and the component passed as parameter. It is used internally to avoid circular dependencies between components.
SetActive¶
UpdateDatabase¶
It is equivalent to calling BoldSystem.UpdateDatabase.
If there is no system, most likely because the Active property is False, invoking this method will raise an exception.
Events¶
| Name | Summary | Notes |
|---|---|---|
| OnOptimisticLockingFailed | Event that will be called if optimistic locking fails |
OnOptimisticLockingFailed¶
TBoldOptimisticLockingFailedEvent = procedure(UpdateList, FailureList: TBoldObjectList; const FailureReason: String) of object;
If the application has optimistic locking activated, it might detect a conflict during an update. If this happens this event will be called with the objects that failed optimistic locking.
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.