Jeff Klann wrote:
> 
> Thanks, Keith. Unfortunately, I can't find your earlier message in the
> archive. Could you point me to it?

I assume you mean how to use a special FieldHandler...

There are a few examples available, simply search using
"FieldHandler"...

Here is one such message:

http://www.mail-archive.com/[email protected]/msg06428.html

Hopefully with that you can see how to utilize the FieldHandler to
handle special cases that cannot be handled automatically.

Thanks,

--Keith

> 
> thanks,
> jeff
> 
> At 04:38 PM 5/2/2002 -0500, Keith Visco wrote:
> 
> >Hi Jeff,
> >
> >Jeff Klann wrote:
> > >
> > > This might be an extremely simple question, but I'm a newbie to Castor
> > JDO....
> > >
> > > I am currently generating Java code from an XML Schema with Castor. Now I
> > > want to persist some instances of the generated Java code to a database
> > > (rather than marshal back to XML). Is there any way to use Castor JDO to do
> > > this? I was thinking I'd write a mapping file for the Java types that
> > > Castor generated from the Schema, but the data seems to be private.
> > >
> >
> >Castor should generate public getters/setters (accessor methods) to
> >obtain
> >the data. A mapping file can be used.
> >
> >The biggest problem when trying to use Castor-XML's source code
> >generator with Castor-JDO is for enumerated types. The source generator
> >will create type-safe enumerations, that do not have a public
> >constructor. The trick is to use a custom FieldHandler. I have
> >demonstrated how to do this in the past on the this list.
> >
> >If you are not using XML Schema enumerations, then you should be able to
> >map the object model cleanly.
> >
> >You can also use the org.exolab.castor.tools.MappingTool to help with
> >the initial mapping. You'll have to add <sql> elements on your own
> >however.
> >
> >--Keith
> >
> >-----------------------------------------------------------
> >If you wish to unsubscribe from this mailing, send mail to
> >[EMAIL PROTECTED] with a subject of:
> >         unsubscribe castor-dev
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to