|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.databeans.AbstractDataObject
dsto.dfc.databeans.AbstractDataBean
dsto.dfc.databeans.DataBeanLink
public class DataBeanLink
A link to an IDataBean that also provides a facade to the bean (i.e. exposes the same property set).
DataObjectLink
Field Summary | |
---|---|
protected IDataBean |
bean
|
protected boolean |
isSoftLink
|
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 | |
---|---|
DataBeanLink()
Create a link with no target. |
|
DataBeanLink(IDataBean bean)
|
|
DataBeanLink(IDataBean bean,
boolean isSoftLink)
|
Method Summary | |
---|---|
void |
dispose()
|
protected void |
disposeListener()
|
IDataBean |
getDataBeanTarget()
|
IDataObject |
getLinkTarget()
Get the data object that this link points to. |
String[] |
getPropertyNames()
Databean's only have strings as their property names. |
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(IDataBean 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. |
void |
setValue(String name,
Object value,
int mode)
|
IDataObject |
shallowClone()
Shallow clone the object prior to being recusively "deep" cloned. |
Methods inherited from class dsto.dfc.databeans.AbstractDataBean |
---|
setValue, setValue, setValue, setValue, setValue, setValue, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface dsto.dfc.databeans.IDataBean |
---|
getBeanValue, getBooleanValue, getCharValue, getDoubleValue, getFloatValue, getIntValue, getLongValue, getObjectValue, getStringValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue |
Methods inherited from interface dsto.dfc.databeans.IDataObject |
---|
addPropertyListener, getPropertyListeners, removePropertyListener |
Field Detail |
---|
protected IDataBean bean
protected boolean isSoftLink
Constructor Detail |
---|
public DataBeanLink()
setLinkTarget(IDataBean)
before use or Bad Things will
occur.
public DataBeanLink(IDataBean bean)
public DataBeanLink(IDataBean bean, boolean isSoftLink)
Method Detail |
---|
public void dispose()
protected void initListener()
protected void disposeListener()
public IDataObject getLinkTarget()
IDataObjectLink
getLinkTarget
in interface IDataObjectLink
public IDataBean getDataBeanTarget()
public void setLinkTarget(IDataBean 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 String[] getPropertyNames()
IDataBean
getPropertyNames
in interface IDataBean
public void setValue(String name, Object value, int mode)
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 |