LiquidThreads 3.0/Old object model/Core
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. |
- This is part of the 2011 LiquidThreads redesign project
There will be a number of entities in the new version of LiquidThreads, and it is hoped that the associations between these entities will be flexible, and that all entities will be appropriately versioned. Accordingly, to avoid duplicated effort and to make the new system as consistent and as easy to understand as possible, an object model is being built that will allow all LiquidThreads objects to have a revision history, and to be identified by a unique identifier, containing the object ID, the type of object, and the database in which that object exists.
Object
editAttributes
edit- Zone
- This is the database in which the object is stored. It's not stored in the database (for obvious reasons), but it is part of the addressing scheme.
- ID
- This is a globally unique LiquidThreads object ID. It's an auto-numbered field in the database.
- Type
- The type of object. This would have a one-to-one correspondence with the class used to represent it.
- Current Version
- A pointer to a Version object representing the current version of this object, or, if the object is not versioned, a Data object representing its contents.
Versioned Object
editThis is an object which is versioned. In other words, old versions of it are kept in the database. In a Versioned object, the Current Version field points to a Version object instead of a Data object.
Version
editAttributes
edit- Note: Except for the visibility attribute, all attributes are non-updatable.
- Timestamp
- A timestamp of when the Version object was created.
- User
- The user ID / IP address of the user who last edited this version.
- Data
- A pointer to a Data object of the appropriate type, containing the Object's attributes as at this Version.
- Comment
- The comment that the User left to explain this change, if relevant.
- Visibility
- Whether this version of the data is visible to all users, administrators only, or restricted to privileged users.
- Object
- The object that this Version represents.
Data
editA Data object represents the state of an Object in a specific Version. This is an abstract class, but has no attributes of its own. There is a subclass for each subclass of Object, and it is this Data object that actually stores the attribute values.