users@jaxb.java.net

Re: IDREF, ID and xjc:idSymbolSpace

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 11 Jan 2005 07:58:46 -0800

Kees wrote:
>> In 2.0, XJC will be able to just generate value classes, so there won't
>> be any casting between your class and interfaces. Also, in 2.0, you can
>> have XJC generate the code once, move that into the repository, and then
>> you can start making modifications to the generated classes directly.
>
> Does this mean that if the schema changes (than the code will change) and
> then I have lost all my modifications?

There are ways to work around the problem. It is bit like maintaining
local changes to a 3rd party source code. For example, CVS can help you
manage those.


> I'm using the following very simple code-preserving-technic when working with
> ORM (Object/Relational Mapping) tools:
> I let the ORM create an Class gti.conf.EquipmentEntity, but when it creates
> the class-file I prepend "generated" before the className.
> So now generated/gti/conf/EquipmentEntity.java is generated. I now have to create
> a the class-file gti/conf/EquipmentEntity.java myself (with empty constructor).
> In this class-file I can append my modifications without ever getting it lost.
> Is this possible in jaxb 1.0?
> or jaxb 2.0?

Would you elaborate this step more? In normal Java semantics, you can
have two or more source folder but you cannot define one class in two
source files.

Are you talking about a tool support to "merge" those source files? Or
are you talking about two different Java classes associated via a naming
convention?


>> So
>> when this kind of problems come up, instead of learning a new
>> customization, you can just go ahead and change the signature of the
>> generated code and it will still work.
>
> Is there any documentation on this? Can you give me a pointer?
> If jaxb will solve all my current casting/typesafe problems in 2.0 then
> I will surely go ahead with it.

We are trying to post more 2.0 related resources, so stay tuned. It
should happen very soon-ish...

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net