|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dsto.dfc.databeans.AbstractDataObject dsto.dfc.databeans.DataObjectLink
public class DataObjectLink
A link to an IDataObject that also provides a facade to the object (i.e. exposes the same property set).
DataBeanLink
Field Summary | |
---|---|
protected boolean |
isSoftLink
|
protected IDataObject |
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 | |
---|---|
DataObjectLink()
Create a link with no target. |
|
DataObjectLink(IDataObject object)
|
|
DataObjectLink(IDataObject object,
boolean isSoftLink)
|
Method Summary | |
---|---|
void |
dispose()
|
protected void |
disposeListener()
|
IDataObject |
getLinkTarget()
Get the data object that this link points to. |
TypeInfo |
getTypeInfo()
Get the optional type information for this object. |
Object |
getValue(Object name)
Get the value of a given property. |
protected void |
initListener()
|
boolean |
isSoftLink()
True if this is a soft link. |
boolean |
isTransient(Object name)
Test a property is transient (ie will not be preserved if the object is saved). |
Iterator |
propertyIterator()
Get an iterator that scans over all currently defined properties. |
void |
propertyValueChanged(PropertyEvent e)
|
void |
setLinkTarget(IDataObject target)
Set the object being pointed to by this link. |
void |
setSoftLink(boolean newValue)
|
void |
setValue(Object name,
Object value)
Synonym for setValue (name, value, PERSISTENT_OVERRIDE). |
void |
setValue(Object name,
Object value,
int mode)
Set the value of a given property. |
IDataObject |
shallowClone()
Shallow clone the object prior to being recusively "deep" cloned. |
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, removePropertyListener |
Field Detail |
---|
protected IDataObject object
protected boolean isSoftLink
Constructor Detail |
---|
public DataObjectLink()
setLinkTarget(IDataObject)
before use or Bad Things will
occur.
public DataObjectLink(IDataObject object)
public DataObjectLink(IDataObject object, boolean isSoftLink)
Method Detail |
---|
public void dispose()
protected void initListener()
protected void disposeListener()
public IDataObject getLinkTarget()
IDataObjectLink
getLinkTarget
in interface IDataObjectLink
public void setLinkTarget(IDataObject target)
public boolean isSoftLink()
IDataObjectLink
isSoftLink
in interface IDataObjectLink
public void setSoftLink(boolean newValue)
public void setValue(Object name, Object value)
AbstractDataObject
setValue
in interface IDataObject
setValue
in class AbstractDataObject
name
- The property "name" (may be any object).value
- The property value.IDataObject.setValue(Object, Object, int)
,
IDataObject.getValue(Object)
,
PropertyListener
,
PropertyEvent
public void setValue(Object name, Object value, int mode)
IDataObject
setValue
in interface IDataObject
setValue
in class AbstractDataObject
name
- A property name.value
- The new value. On most objects using null removes
the property.mode
- The mode for the value. This is a bitwise OR of
TRANSIENT and/or OVERRIDE. Using TRANSIENT specifies the
value is to be marked transient (ie isTransient (name)
will return true). Not all data object implementations
support dynamic transience. OVERRIDE must be set if an
existing value is to be overwritten: if not set and a
value is already defined, then nothing is changed. The
IDataObject.setValue (name, value) call corresponds to
IDataBean.setValue (name, value, OVERRIDE).IDataObject.setValue(Object, Object)
public Object getValue(Object name)
IDataObject
getValue
in interface IDataObject
name
- The property "name" (may be any object).
IDataObject.setValue(Object, Object)
,
IDataObject.propertyIterator()
public Iterator propertyIterator()
IDataObject
propertyIterator
in interface IDataObject
IDataObject.getValue(Object)
).IDataObject.getValue(Object)
,
PropertyValueIterator
public IDataObject shallowClone() throws UnsupportedOperationException
IDataObject
NOTE: Clients should not need to call this method:
use DataObjects.deepClone(IDataObject)
instead.
shallowClone
in interface IDataObject
shallowClone
in class AbstractDataObject
UnsupportedOperationException
- if the object or child object could not
be cloned.DataObjects.deepClone(IDataObject)
public boolean isTransient(Object name)
IDataObject
isTransient
in interface IDataObject
name
- The property name.
public TypeInfo getTypeInfo()
IDataObject
getTypeInfo
in interface IDataObject
getTypeInfo
in class AbstractDataObject
TypeRegistry
public void propertyValueChanged(PropertyEvent e)
propertyValueChanged
in interface PropertyListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |