dsto.dfc.databeans
Class DataObjectWeakRef

java.lang.Object
  extended by dsto.dfc.databeans.AbstractDataObject
      extended by dsto.dfc.databeans.DataObjectLink
          extended by dsto.dfc.databeans.DataObjectWeakRef
All Implemented Interfaces:
IDataObject, IDataObjectChildListener, IDataObjectLink, PropertyListener, Cloneable, EventListener

public class DataObjectWeakRef
extends DataObjectLink
implements IDataObject, IDataObjectLink, PropertyListener

An weak reference alias for an IDataObject. The wrapped object is listened to using a weak listener, allowing the alias to be GC'd when no other references to it are held.

Version:
$Revision$
Author:
mpp

Field Summary
 
Fields inherited from class dsto.dfc.databeans.DataObjectLink
isSoftLink, object
 
Fields inherited from class dsto.dfc.databeans.AbstractDataObject
listeners
 
Fields inherited from interface dsto.dfc.databeans.IDataObject
OVERRIDE, PERSISTENT, PERSISTENT_OVERRIDE, TRANSIENT, TRANSIENT_OVERRIDE
 
Constructor Summary
DataObjectWeakRef(IDataObject object)
           
DataObjectWeakRef(IDataObject object, boolean isSoftLink)
           
 
Method Summary
protected  void disposeListener()
           
 IDataObject getLinkTarget()
          Get the data object that this link points to.
protected  void initListener()
           
 
Methods inherited from class dsto.dfc.databeans.DataObjectLink
dispose, getTypeInfo, getValue, isSoftLink, isTransient, propertyIterator, propertyValueChanged, setLinkTarget, setSoftLink, setValue, setValue, shallowClone
 
Methods inherited from class dsto.dfc.databeans.AbstractDataObject
addFirstPropertyListener, addPropertyListener, childPropertyChanged, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, firePropertyChangedEvent, getBeanValue, getBooleanValue, getBooleanValue, getCharValue, getCharValue, getDoubleValue, getDoubleValue, getFloatValue, getFloatValue, getIntValue, getIntValue, getLongValue, getLongValue, getObjectValue, getPropertyListeners, getShortValue, getStringValue, registerValue, removePropertyListener, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, toString, unregisterValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface dsto.dfc.databeans.IDataObject
addPropertyListener, getPropertyListeners, getTypeInfo, getValue, isTransient, propertyIterator, removePropertyListener, setValue, setValue, shallowClone
 
Methods inherited from interface dsto.dfc.databeans.IDataObjectLink
isSoftLink
 
Methods inherited from interface dsto.dfc.databeans.PropertyListener
propertyValueChanged
 

Constructor Detail

DataObjectWeakRef

public DataObjectWeakRef(IDataObject object)

DataObjectWeakRef

public DataObjectWeakRef(IDataObject object,
                         boolean isSoftLink)
Method Detail

initListener

protected void initListener()
Overrides:
initListener in class DataObjectLink

disposeListener

protected void disposeListener()
Overrides:
disposeListener in class DataObjectLink

getLinkTarget

public IDataObject getLinkTarget()
Description copied from interface: IDataObjectLink
Get the data object that this link points to.

Specified by:
getLinkTarget in interface IDataObjectLink
Overrides:
getLinkTarget in class DataObjectLink


Copyright © 2008 Commonwealth of Australia