The %CacheStorage class contains the storage interface methods
for the Caché default storage structure. The storage interface
methods, which are implemented as method generators, work in conjunction
with the persistent interface methods of the %Persistent class to
provide persistent behavior for objects.
The methods of %CacheStorage are not meant to be called directly.
Use the methods of the %Persistent class which, in turn, call the
appropriate %CacheStorage method.
STORAGEINTERFACE defines the type of serialization implemented by this class.
The value has to match the classtype of the class that is inheriting the serialization
interface.
Load object from persistent storage into memory. The caller is responsible for calling %IdSet()
Don't include class name with id in input parameter
state is the physical data where the structure of state mirrors the structure of the object on disk
obj is an array, subscripted by property name where each array element is equal to the property value named as the subscript.
%LockId()
Obtain an exclusive or shared lock on the object identified by id. The type
of lock obtained is determined by shared. This method overrides the implementation
from %Library.Persistent.
Inherited description: Deletes all entries from each index specified in the idxlist argument.
If idxlist is empty then all indices that originate
in the class are purged. The index definition remains intact.
If pIgnoreIndexList is defined, it should be a $listbuild of index names that should not be purged.
This argument allows you to purge all indices except those defined in pIgnoreIndexList.
The default value of this argument is "", which means all indices, or all indices specified in pIndexList, will be purged.
Returns a %Status value indicating success or failure.
This method is normally generated by the storage class for persistent classes using
%Library.CacheStorage or %Library.CacheSQLStorage. Persistent
classes using some other storage class, such as %Library.CustomStorage must override this
method.
final classmethod %SaveDirect(ByRef id As %String = "", idList As %List = "", ByRef data As %Binary, concurrency As %Integer = -1) as %Status
%SaveDirect() - saves an object to disk, checks uniqueness and referential
integrity constraints, and maintains index structures. This method is
implemented by the storage class.
classmethod %SaveIndices(pStartId As %String(MAXLEN="")="", pEndId As %String(MAXLEN="")="", lockExtent As %Boolean = 0) as %Status
Files the indices for all objects whose ID is in the range defined by pStartId and pEndId.
If pEndID is null then it defaults to pStartId. If pStartId is null then the
range is empty and no filing will occur.
If lockExtent is true then an extent lock will be acquired before the indices
are built. If the lock cannot be acquired then an error is returned. The lock is released
after the index filing is completed.
Returns a %Status value indicating success or failure.
classmethod %SortBegin(idxlist As %List = "", excludeunique As %Integer = 0) as %Status
%SortBegin()
This method will start a system merge sort for all indices (idxlist is null) or for specified indices
%UnlockId()
Release an exclusive or shared lock on the object identified by id. The type
of lock released is determined by shared.This method overrides the implementation
from %Library.Persistent.