|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdsto.dfc.databeans.AbstractDataObject
dsto.dfc.databeans.AbstractDataBean
dsto.dfc.databeans.DataBean
dsto.dfc.databeans.JavaDataBean
public class JavaDataBean
Wraps a JavaBean as an IDataBean. The initial values of the JavaBean are considered to be the (transient) defaults until they are observed to change. New properties that do not overlap the set provided by the bean may be added as needed.
This class may either wrap an existing bean, or be subclassed. If this class
is subclassed, it is vital that the subclass call
initDataBean(Class)
as the last thing in its constructor.
Field Summary |
---|
Fields inherited from class dsto.dfc.databeans.DataBean |
---|
alwaysTransient, transientProperties, typeInfo, values |
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 | |
---|---|
JavaDataBean()
Create a default instance. |
|
JavaDataBean(Object bean)
Constructor for JavaDataBean. |
Method Summary | |
---|---|
Object |
getBean()
|
Object |
getValue(Object name)
Get the value of a given property. |
protected void |
initDataBean(Class beanClass)
Subclasses must call this from their constructor after they have initialised their properties to finish initialisation of databean state. |
void |
propertyChange(PropertyChangeEvent e)
|
protected Object |
readProperty(PropertyDescriptor property)
|
void |
setBean(Object newBean)
|
void |
setValue(Object name,
Object value)
Synonym for setValue (name, value, PERSISTENT_OVERRIDE). |
void |
setValue(String name,
Object value,
int mode)
|
IDataObject |
shallowClone()
Shallow clone the object prior to being recusively "deep" cloned. |
protected void |
writeProperty(PropertyDescriptor property,
Object value)
|
Methods inherited from class dsto.dfc.databeans.DataBean |
---|
childPropertyChanged, getPropertyNames, getTypeInfo, isTransient, propertyIterator, setAlwaysTransient, setTypeInfo, setValue |
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 |
Methods inherited from interface dsto.dfc.databeans.IDataObject |
---|
addPropertyListener, getPropertyListeners, removePropertyListener |
Constructor Detail |
---|
public JavaDataBean() throws IllegalArgumentException
IllegalArgumentException
public JavaDataBean(Object bean) throws IllegalArgumentException
IllegalArgumentException
Method Detail |
---|
protected final void initDataBean(Class beanClass)
beanClass
- The class of the bean: must be the result of
using JavaBean.class not getClass ().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 DataBean
UnsupportedOperationException
- if the object or child object could not
be cloned.DataObjects.deepClone(IDataObject)
public Object getBean()
public void setBean(Object newBean) throws IllegalArgumentException
IllegalArgumentException
public Object getValue(Object name)
IDataObject
getValue
in interface IDataObject
getValue
in class DataBean
name
- The property "name" (may be any object).
IDataObject.setValue(Object, Object)
,
IDataObject.propertyIterator()
public void setValue(Object name, Object value) throws IllegalArgumentException
AbstractDataObject
setValue
in interface IDataObject
setValue
in class AbstractDataObject
name
- The property "name" (may be any object).value
- The property value.
IllegalArgumentException
IDataObject.setValue(Object, Object, int)
,
IDataObject.getValue(Object)
,
PropertyListener
,
PropertyEvent
public void setValue(String name, Object value, int mode)
protected Object readProperty(PropertyDescriptor property) throws IllegalArgumentException
IllegalArgumentException
protected void writeProperty(PropertyDescriptor property, Object value) throws IllegalArgumentException
IllegalArgumentException
public void propertyChange(PropertyChangeEvent e)
propertyChange
in interface PropertyChangeListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |