|
||||||||||
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.SimpleJavaDataBean
public class SimpleJavaDataBean
Direct IDataBean adapter for a JavaBean. Does not handle default properties or the fancy stuff that JavaDataBean provides.
Field Summary |
---|
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 | |
---|---|
SimpleJavaDataBean(Object bean)
Constructor for DataBeanAdapter. |
Method Summary | |
---|---|
void |
dispose()
|
Object |
getBean()
|
Object |
getDefaultValue(String name)
|
String[] |
getPropertyNames()
Databean's only have strings as their property names. |
TypeInfo |
getTypeInfo()
The default implementation uses TypeRegistry.peekTypeInfo(Class) to see whether any type
info is registered for the class. |
Object |
getValue(Object name)
Get the value of a given property. |
boolean |
isTransient(Object name)
Test a property is transient (ie will not be preserved if the object is saved). |
void |
propertyChange(PropertyChangeEvent e)
|
Iterator |
propertyIterator()
Get an iterator that scans over all currently defined properties. |
void |
setToDefaultValue(String name)
|
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 |
Methods inherited from interface dsto.dfc.databeans.IDataObject |
---|
addPropertyListener, getPropertyListeners, removePropertyListener |
Constructor Detail |
---|
public SimpleJavaDataBean(Object bean) throws IllegalArgumentException
IllegalArgumentException
Method Detail |
---|
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 void dispose()
public Object getBean()
public TypeInfo getTypeInfo()
TypeRegistry.peekTypeInfo(Class)
to see whether any type
info is registered for the class.
getTypeInfo
in interface IDataObject
getTypeInfo
in class AbstractDataObject
TypeRegistry
public String[] getPropertyNames()
IDataBean
getPropertyNames
in interface IDataBean
public Iterator propertyIterator()
IDataObject
propertyIterator
in interface IDataObject
IDataObject.getValue(Object)
).IDataObject.getValue(Object)
,
PropertyValueIterator
public void setValue(String name, Object value, int mode)
public Object getDefaultValue(String name)
public boolean isTransient(Object name)
IDataObject
isTransient
in interface IDataObject
name
- The property name.
public void setToDefaultValue(String name)
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) throws IllegalArgumentException
IDataObject
getValue
in interface IDataObject
name
- The property "name" (may be any object).
IllegalArgumentException
IDataObject.setValue(Object, Object)
,
IDataObject.propertyIterator()
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 |