class Standard . PersistentObject {
int32 flags;
oid persistenceService;
oid registeredAs;
} inherits from Object;
Class PersistentObject provides a generic facility that implements persistent objects. These capabilities are obtained by inheriting from this class and require almost no additional effort on the part of the application programmer.
PersistentObject:create()
Null method.
PersistentObject:initialize(optional any qualifiedName, optional int32 optionalFlags)
The optional argument qualifiedName can be used to permit the use of multiple PersistenceService databases. If no qualifiedName is specified, the PersistenceService object is located using the well-known service name /ObjectPager. The initialize method sends the persistent object services a makePersistent message. The object Id of the object PersistentObject is passed as the sole argument.
Normally, whenever a persistent object database is connected to a FARGOS/VISTA Object Management Environment, information about all of the previously stored persistent objects are important. Normally, the next step is for each of the saved objects to be restored into the currently active environment. A PersistentObject can override this behavior by providing an appropriate value for the optionalFlags argument.
Returns 0 upon success; otherwise -1.
PersistentObject:enablePersistence()
See initialize.
PersistentObject:objectImported()
A PersistentObject is always sent an objectImported message whenever it has been restored into the environment from the object database. This can be used by application classes to reestablish associations with services whose providers may have changed from the object was saved and restored.
This method does not return a value.
PersistentObject:disablePersistence()
Reception of a disablePersistence message disables the persistent storage of a PersistentObject.
PersistentObject:getObjectData()
Returns a two-element aray; subscript 0 holds the encoded object (obtained by Object:encodeObject) and subscript 1 holds a flag argument that indicates how the object should subsequently be restored.