Package wt.fc

Class CachedObjectReference

java.lang.Object
wt.fc._ObjectReference
wt.fc.ObjectReference
wt.fc._CachedObjectReference
wt.fc.CachedObjectReference
All Implemented Interfaces:
Externalizable, Serializable, wt.fc._NetFactor, wt.fc._ObjectMappable, _WTReference, NetFactor, ObjectMappable, WTReference, Evolvable
Direct Known Subclasses:
wt.admin._AdminDomainRef, wt.folder._CabinetReference, wt.inf.team._ContainerTeamReference, wt.epm._EPMAuthAppVersionRef, wt.lifecycle._LifeCycleTemplateMasterReference, wt.lifecycle._LifeCycleTemplateReference, wt.team._TeamTemplateReference, wt.vc.views._ViewReference, wt.inf.container._WTContainerRef, wt.inf.container._WTContainerTemplateRef

@GenAsObjectMappable(superClass=ObjectReference.class,versions=6273535935738757412L,properties={@GeneratedProperty(name="inflated",type=boolean.class,initialValue="false",javaDoc="Member which indicates whether subclass inflation has occurred or not",accessors=@PropertyAccessors(getAccess=PROTECTED,setExceptions={}),columnProperties=@ColumnProperties(persistent=false)),@GeneratedProperty(name="readOnlyObject",type=Persistable.class,javaDoc="Member, which if set, is a reference to the cached object held by the cached object reference service. This object should not be modified under any circumstances. When set this member acts as the target of this reference in the absence of other needed data",accessors=@PropertyAccessors(getAccess=PRIVATE),columnProperties=@ColumnProperties(persistent=false))}) public abstract class CachedObjectReference extends wt.fc._CachedObjectReference
CachedObjectReference was specifically designed to support the StandardObjReferenceCacheService. The StandardObjReferenceCacheService maintains a set of cached Persistables while ensuring their consistency with the database. Use of this service and CachedObjectReferences relieves the developer from concerns associated with managing data consistency with the database.

CachedObjectReference is a subclass of ObjectReference therefore the object it references is referred to as it's target, as is done in ObjectReference.

The two most important API's of CachedObjectReference are getObject and getReadOnlyObject.

The method getObject returns a clone of this reference's target object, getReadOnlyObject returns a reference to the target itself. This is a very important distinction. The read only target is a reference to the object which is being held by the StandardObjReferenceCacheService. Under no circumstances should this target object be altered in any way! doing so will corrupt the data integrity of the referenced target, and more importantly the caches in the service itself.

The concept of inflate in CachedObjectReference is somewhat different than in ObjectReference. CachedObjectReference provides two abstract inflate methods so that subclasses can extract specific members from the target object without exposing others. Note that the target passed to the inflate method "may" be a read only target thus is should never itself be modified.

Supported API: true

Extendable: true

See Also: