users@jaxb.java.net

Re: [feature suggestion] Self-tracking of modified state by JAXB binding objects

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Mon, 14 Jan 2008 09:25:41 -0500

Hi Sharon,

This looks like the closest thing to what will meet my need. Thank you
so very much for this pointer. It allows an external object to listen
for property changes in JAXB generated classes which is not quite as
good as the JAXB generated class doing it itself but its close. Perhaps
I can use the code for this plugin as a starting point to create a new
plugin.

Thanks again.

Sharon Dafner wrote:
> Perhaps the following plug-in does what you requests here:
> https://jaxb2-commons.dev.java.net/property-listener-injector/
>
> Sharon Dafner
>
> -----Original Message-----
> From: Farrukh Najmi [mailto:farrukh_at_wellfleetsoftware.com]
> Sent: Saturday, January 12, 2008 5:37 PM
> To: users_at_jaxb.dev.java.net
> Subject: [feature suggestion] Self-tracking of modified state by JAXB
> binding objects
>
>
>
> Something I have always felt th need for in JAXB generated binding
> classes is the tracking of modified or dirty objects. What would be
> really useful is to have a pair of accessor methods in each generated
> class at the base of a type hierarchy as follows:
>
> public boolean isModified();
> public void setModified(boolean isModified);
>
> And for each setter method in the generated bindings to call
> this.setModified(true);
> The object should be initialized to have the modified attribied be false.
>
> This would allow each JAXB binding object to self-track whether it has
> been modified since it was created or not.
>
> What does the JAXB RI team think of adding this feature as a
> impl-specific extension? If it makes sense for the RI then would it also
> make sense to consider this feature in a future version of the JAXB
> spec? It would be good to hear opinions from JAXB spec, RI and user
> community members on this. Thank you.
>


-- 
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com