CX_OVERWRITING_REF 
Class hierarchy
- CX_CLASS
- CX_SIMPLE
- CX_TERMED
- CX_EXPANDABLE
- CX_DESCRIPTIVE_REF
- CX_OVERWRITING_REF
- CX_DESCRIPTIVE_REF
- CX_EXPANDABLE
- CX_TERMED
- CX_SIMPLE
Description: (Business Pattern)
This class is an overwriting wrapper. Usually the class is not addressed directly, but the InstantView® command WrapObject is used. The overwritten access expressions are managed by an instance of the class CX_ATOM_TBL (uniqueID = "Anonymous Slot").
Note: The Atom table is currently updated in a persistent CX_OVERWRITING_REF in the database when a slot is overwritten for the first time (the first time this overwrite path is used). However, the Atom Table is only reloaded when the database is opened and the Atom Table is expanded, so it is possible that a second client that was started earlier does not yet know the newly created slots and therefore cannot read them correctly. The problem can currently be solved by restarting the client or reopening the database.
Attention: Additional restrictions apply to the indexing of CX_OVERWRITING_REFs.
Code example:
// assuming target is filled with a persistent object
"target" target Put(uniqueID)
target WrapObject(OVERWRITING) -> wrapper
/* this is equivalent:
CreatePersObject(CX_OVERWRITING_REF) -> wrapper
target wrapper Call(SetContents)
*/
wrapper Copy(uniqueID) Attention // => "target"
"wrapper" wrapper Put(uniqueID)
// now wrapper Copy(uniqueID) <> target Copy(uniqueID)
wrapper Copy(uniqueID) Attention // => "wrapper"
target Copy(uniqueID) Attention // => "target"
To create a transient wrapper on a persistent object CreateTransObject must be used. The WrapObject command always creates an object in the same database as the target object.
// assuming target is filled with a persistent object
target CreateTransObject(CX_OVERWRITING_REF) -> wrapper
target wrapper Call(SetContents)
| Function | MA* | Parameters | Return | Brief description |
|---|---|---|---|---|
| Overwritten | VECTOR〈OBJECT〉 | Names of the overwritten slots and data fields | ||
| Contents | OBJECT | Queries the wrapped object | ||
| Deleted | INTEGER | Checks if the wrapper was logically deleted in the database | ||
| GetSiblings | COLLECTION | All siblings of this object | ||
| GetSiblings2 | COLLECTION | All siblings of this object | ||
| GetSlotEntries | VECTOR<object>/ob | Return of internal information about slots | ||
| LastUpdate | OBJECT | Returns the date of the last write access to the wrapper | ||
| link | OBJECT | Add this object to the list of objects with validity | ||
| NextValidObject | OBJECT | Returns the valid replacement object following the wrapper. | ||
| PreviousValidObject | OBJECT | Returns the previous, valid replacement object to the wrapper. | ||
| ReferenceCount | INTEGER | Number of references | ||
| RestrictedValidity | * | Area of validity limited? | ||
| SanityCheck | INTEGER | Check for consistency of the wrapper | ||
| SetContents | OBJECT | Sets the wrapped object | ||
| Siblings | * | Objects with validity | ||
| SpanDateValidity | * | STRING | Read/write validity period | |
| string | INTEGER | CX_STRING | Returns the string representation of the object | |
| Unlink | Remove this object from the list of objects with validity | |||
| Unlink2 | Remove this object from the list of objects with validity | |||
| Valid | CX_DATE | INTEGER | Checks if wrapper and object are valid at the time | |
| VerifySiblings | INTEGER | Check ring of exchange objects | ||
| ValidSince | CX_TERM | Returns the beginning of the validity period for object and wrapper. | ||
| ValidToday | INTEGER | Checks if wrapper and object are valid on the current validity date. (see: Valid) | ||
| ValidUntil | CX_TERM | Returns the end of the validity period for object and wrapper. |
* MA = Member Access function,
grey background = inherited function
| Data field | Type | Reference class | I* | Brief description |
|---|---|---|---|---|
| _uniqueID | STRING | * | Unique key | |
| _validity | POINTER | CX_VALIDITY | Validity period of the object | |
| _object | POINTER | CX_CLASS | The wrapped object |
* I = Indexable data field,
grey background = inherited data field
| Module | Brief description |
|---|---|