Class Persistent-Object

Base class for all persistent classes. If this class is not inherited by a persistent class then it is automatically added to the direct superclasses. There is only one persistent instance in a transaction with a give oid therefore eq will return true iff the oids are equal.

Part of:

class persistent-set, package cl-perec

Default initargs

:persistent → CL-PEREC::*MAKE-PERSISTENT-INSTANCES*

Direct Subclass

persistent-set

Slot

oid
Life time unique identifier of the instance which can be remembered and may be used the load the instance later.
Initargs::oid; Accessors:oid-of; Type:(or null oid).
persistent
True means the instance is known to be persistent, false means the instance is known to be transient, unbound means the state is not yet determined. Actually, in the latter case slot-value-using-class will automatically determine whether the instance is in the database or not. Therefore reading the persistent slot will always return either true or false.
Initargs::persistent; Accessors:persistent-p; Type:boolean.
transaction
A reference to the transaction to which this instance is currently attached to or nil.
Initargs::transaction; Accessors:transaction-of.
transaction-event
:created means the instance was created in the current transaction, :modified means the instance was not created but modified in the current transaction. :deleted means the instance was already present at the very beginning but got deleted in the current transaction.
Initargs::transaction-event; Accessors:transaction-event-of; Type:(member nil created modified deleted).

Direct Method

cache-instanceAttaches an instance to the current transaction. The instance must be already present in the data...
collect-persistent-object-literals
delete-item
initialize-revived-instanceWhen a revived instance is initialized slots marked with initialize-revived-slot-p will be passed...
insert-itemAdds item to the container
load-instanceLoads an instance with the given oid and attaches it with the current transaction if not yet atta...
lock-instanceLock instance in the current transaction. If wait is false and the instance cannot be locked then...
make-persistent-using-class
make-transient-using-class
propagate-cache-changesPartially invalidate or update the cache to reflect setting the slot of instance to new-value.
purge-instancePurges the given instance without respect to associations and references to it.
search-for-itemHunt for the item in the container. Key and Test
are as in member.
value->sql-literal