I recommend these additions to the DynaBean interface:
1. Add two new concepts, "readOnly" and "dirty", which can be tracked
via boolean flags.
2.
void setReadOnly(boolean) -
boolean isReadOnly() -
If the DynaBean is marked as "readOnly" disallow all "set()" calls
(consider throwing an exception).
3.
void setDirty(boolean) -
boolean isDirty() -
In DynaBeanImpl, keep an internal flag, "dirty", initially false.
Upon calling any of the "set" methods, this flag should be set to
"true". With the above methods, we can test its value as well as change
the value of the flag.
Bryan