I would prefer to implement cloneable
and then go on like Mike
Mike Kienenberger <mkienen..laska.net> schrieb am 28.12.04 16:28:40:
>
> Dave <sanxion200..ahoo.com> wrote:
> > Are there any built in methods to create a copy of a
> > DataObject? I want to add a new row that is the same
> > as a prior. The key would be the only difference.
>
> I think you could do it by iterating through the "values" protected
> DataObject map.
>
> Create a new object.
> Iterate through values.
> value = readProperty(key)
> writeProperty(key, values)
>
> You might find that readPropertyDirectly and writePropertyDirectly will work
> better for you.
>
> Supporting something like this in DataObjectUtils would be useful, so you
> could submit an enhancement request (and probably a patch) in the Jira issue
> tracker to get it into a future version of Cayenne.
>
> -Mike
________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193
This archive was generated by hypermail 2.0.0 : Tue Dec 28 2004 - 11:10:52 EST