TBoldDomainElement¶
Superclass of all objects that represent business data
Unit: BoldDomainElement
Declaration¶
Hierarchy¶
- TObject
TBoldMemoryManagedObjectTBoldFlaggedObject- TBoldSubscribableObject
- TBoldElement
- TBoldDomainElement
- Direct subclasses
- TBoldMember
- TBoldObject
- TBoldSystem
Description¶
TBoldDomainElement is the superclass of all objects that represent business data, such as objects, attributes and associations.
Properties¶
| Name | Summary | Notes |
|---|---|---|
| BoldDirty | read-only | |
| BoldPersistent | read-only | |
| DisplayName | read-only | |
| OwningElement | The owner of the element | read-only |
BoldDirty¶
This flag indicates whether the element has changes relative to the persistent storage, and is in need to be updated.
BoldPersistent¶
This flag indicates whether the element is persistent. This flag is derived from settings in the model. A system is persistent if the model is marked as persistent, and the system has a persistence controller. An object is persistent if it is marked as persistent, and the system is persistent An attribute is persistent if it is marked as persistent, and belongs to an object that is persistent. A relation is persistent if it is marked as persistent and it connects two persistent objects.
DisplayName¶
Name of the model element of the element The display name is a string representing the model element of the domain element. For instance, an attribute might have the display name 'MyClass.MyAttribute'. It is primarily useful for debugging purposes.
OwningElement¶
Domain elements can have an owner. For instance, Bold objects (TBoldObject) will be owned by the system, and attributes will be owned by their Bold objects.
Methods¶
| Name | Summary | Notes |
|---|---|---|
| CanCommit | If the element allows the current system-transaction to commit. | |
| Create | virtual | |
| GetBoldDirty | Get-method for the BoldDirty property | protected, abstract |
| GetDisplayName | Get-method for the DisplayName property | protected, abstract |
| MayCommit | Return false to prohibit a transaction from committing. | protected, virtual |
| ProxyInterface | Bold-internal equivalent of QueryInterface | virtual |
| ReceiveEventFromOwned | Event sent from owned element | protected, virtual |
| ReceiveQueryFromOwned | Query sent from owned element | protected, virtual |
| SendEvent | Sends events to subscribers and owner | override |
| SendExtendedEvent | Sends extended events to subscribers and owner | override |
| SendQuery | Sends queries to subscribers and owner | override |
| StateError | Bold internal | protected, virtual |
CanCommit¶
This method is called on each involved domain element when a system-transaction is committed. If the result is false, the transaction is not allowed to commit. The user can veto the commit by overriding MayCommit or by subscribing to the bqMayCommit query.
Create¶
Since TBoldDomainElement is abstract, there is no point in calling this constructor. It will be called by subclasses to set the owner of the object.
GetBoldDirty¶
Get-method for the BoldDirty property
GetDisplayName¶
Get-method for the DisplayName property
MayCommit¶
A user may override this method and return false to affect the result of CanCommit.
ProxyInterface¶
function ProxyInterface(const IId: TGUID; Mode: TBoldDomainElementProxyMode; out Obj): Boolean; virtual;
This method is used internally in bold as an alternative to QueryInterface. Custom attribute classes may need to override it.
ReceiveEventFromOwned¶
This method receives events sent by an owned element. See SendEvent.
ReceiveQueryFromOwned¶
function ReceiveQueryFromOwned(Originator: TObject; OriginalEvent: TBoldEvent; const Args: array of const; Subscriber: TBoldSubscriber): Boolean; virtual;
This method receives queries sent by an owned element. See SendQuery.
SendEvent¶
This is an override of SendEvent and sends the event to the ReceiveEventFromOwned method of the OwnedElement. The normal sending, as per the subscription mechanism, still takes place.
SendExtendedEvent¶
procedure SendExtendedEvent(OriginalEvent: TBoldEvent; const Args: array of const); override; See also Ancestor Method
This is an override of SendExtendedEvent and sends the extended event to the ReceiveEventFromOwned method of the OwnedElement. The normal sending, as per the subscription mechanism, still takes place.
SendQuery¶
function SendQuery(OriginalEvent: TBoldEvent; const Args: array of const; Subscriber: TBoldSubscriber): Boolean; override; See also Ancestor Method
This is an override of SendQuery and sends the event to the ReceiveQueryFromOwned method of the OwnedElement. The normal sending, as per the subscription mechanism, still takes place.
StateError¶
Bold internal
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.