TBABlob¶
Attribute type for Binary Large Objects (BLOB)
Unit: BoldAttributes
Declaration¶
Hierarchy¶
- TObject
TBoldMemoryManagedObjectTBoldFlaggedObject- TBoldSubscribableObject
- TBoldElement
- TBoldDomainElement
- TBoldMember
- TBoldAttribute
- TBABlob
- Direct subclasses
- TBABlobImageBMP
- TBABlobImageJPEG
- TBATypedBlob
Description¶
This attribute type can be used to store binary data of any kind (images, formatted text, sound...). Normally they will be stored as binary data in a persistent storage.
The data value of the blob can be retrieved using either the AsString-property, or using the method CreateBlobStream.
Properties¶
| Name | Summary | Notes |
|---|---|---|
| ContentType |
ContentType¶
This property will always be empty of the object is a TBABlob, but subclasses can use this to describe the type of the blob data.
Methods¶
| Name | Summary | Notes |
|---|---|---|
| Assign | override | |
| AssignContentValue | protected, override | |
| AssignValue | override | |
| CanSetValue | ||
| CompareToAs | override | |
| CreateBlobStream | ||
| FreeContent | Releases the content from the attribute. | protected, override |
| GetAsBlob | protected | |
| GetAsVariant | override | |
| GetStringRepresentation | protected, override | |
| IsEqualAs | Compares attribute content. | override |
| MaySetValue | Override to affect the result of CanSetValue . | protected, virtual |
| ProxyClass | protected, override | |
| ProxyInterface | override | |
| SetAsBlob | protected | |
| SetAsVariant | override | |
| SetEmptyValue | SetEmptyValue will set the content to empty string. | override |
| SetStringRepresentation | protected, override | |
| SetToNull | override |
Assign¶
Copies data from another instance of TBABlob. The source is a blob with a ContentType but the target is a TBABlob (and not a subclass), the blobdata will be copied, but content type will be lost (no exception will occur).
AssignContentValue¶
AssignValue¶
CanSetValue¶
Use this function to test if it is allowed to set the attribute to a specific value.
If a subscriber is sent to the function, this subscriber will be notified if the conditions have changed (so that an illegal value is now legal). It is OK to send a nilpointer instead.
CompareToAs¶
function CompareToAs(CompareType: TBoldCompareType; BoldElement: TBoldElement): Integer; override; See also Ancestor Method
CreateBlobStream¶
This will create a subclass of TStream that will read and write from the blob attribute. The mode-parameter indicates if the stream is readable, writeable or both.
FreeContent¶
FreeContent resets the content of the blob attribute.
GetAsBlob¶
GetAsVariant¶
GetStringRepresentation¶
function GetStringRepresentation(Representation: TBoldRepresentation): string; override; See also Ancestor Method
IsEqualAs¶
function IsEqualAs(CompareType: TBoldCompareType; BoldElement: TBoldElement): Boolean; override; See also Ancestor Method
IsEqualAs will compare the data content of the attribute with the content in the BoldElement submitted as parameter.
If the parameter is not a TBABlob the inherited method will be invoked.
Comparison will yield true if both the Blob and the submitted blob are null or if their data content is equal.
MaySetValue¶
A subclass of TBABlob may override this method to prohibit setting the attribute to a specific value. If the result value is false, the setting will be aborted. If it is true, there may still be other reasons why the changing of the value is not allowed.
ProxyClass¶
ProxyInterface¶
function ProxyInterface(const IId: TGUID; Mode: TBoldDomainElementProxyMode; out Obj): Boolean; override; See also Ancestor Method
SetAsBlob¶
SetAsVariant¶
SetEmptyValue¶
SetEmptyValue will set the AsString property of the TBABlob to en empty string.
SetStringRepresentation¶
procedure SetStringRepresentation(Representation: TBoldRepresentation; Value: string); override; See also Ancestor Method
SetToNull¶
Set the value of the attribute to Null. If Null is not an allowed value for the attribute, an exception will be raised. As an optimization, the data part of the attribute will be disposed.
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.