|
||||||||||
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.SimpleDataObject
public class SimpleDataObject
Base class for simple IDataObject's that expose their state as public fields. Uses reflection to expose all public, non-static fields as IDataObject properties.
DataObjects.fireChangedEvents(dsto.dfc.databeans.AbstractDataObject, dsto.dfc.databeans.AbstractDataObject)
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 | |
---|---|
SimpleDataObject()
|
Method Summary | |
---|---|
protected Collection |
getFieldNames()
Get the current set of field names from this class. |
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). |
Iterator |
propertyIterator()
Get an iterator that scans over all currently defined properties. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SimpleDataObject()
Method Detail |
---|
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 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
name
- The property "name" (may be any object).
IDataObject.setValue(Object, Object)
,
IDataObject.propertyIterator()
public boolean isTransient(Object name)
IDataObject
name
- The property name.
public Iterator propertyIterator()
IDataObject
IDataObject.getValue(Object)
).IDataObject.getValue(Object)
,
PropertyValueIterator
protected Collection getFieldNames() throws SecurityException
SecurityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |