|
Steven I’ve done something similar with the
static
StringReader reader = new StringReader(xmlString);
Object unmarshalled = Unmarshaller.unmarshal(Class.forName(className), reader); and
StringWriter writer = new StringWriter();
Marshaller.marshal(object ,writer); You do not need a common base class to do
this though. Conor -----Original Message----- I have a similar question then: Is it possible to create a base
class with for abstract Unmarshal and Marshal methods (castor xml) such that I
wouldn't have to explicitly cast during class loading? I would like my code to be able to
accommodate unknown, future XML schemas that become Castor-ized (as opposed to
Pasteruized) into Java objects like this: BaseClass bc = (BaseClass)
Class.forName ( newCastorizedSchemaObject ); Without having to explicitly know
the type name that could happen in the future, instead of BrandNewCastorObj co = (BrandNewCastorObj) Class.forName (
"com.enron.shred.everything.BrandNewCastorObj" ) I am new to Castor so I suppose this
could be stupid question, but is it possible to create generic Unmarshal code? -
steve -----O riginal Message----- Hi, (Sorry if this question has been posted before but
I've found it in the documentation neither the mailing list). + Is it possible to define a JDO's mapping for an
abstract class. I would expect to get back a collection of ImplClass1
and ImplClass2 's instances together. Thanks a lot, Isi, This e-mail is confidential and is intended for the named recipient only. If |
Title: JDO: Abstract class and inheritance
- [castor-dev] JDO: Abstract class and ... "Legido Mart�nez, Isidoro"
- Re: [castor-dev] JDO: Abstract c... Conor Allen
- Re: [castor-dev] JDO: Abstract c... Mielnicki, Steven J
- Re: [castor-dev] JDO: Abstract c... Conor Allen
- Re: [castor-dev] JDO: Abstract c... "Legido Mart�nez, Isidoro"
- Re: [castor-dev] JDO: Abstract c... Mielnicki, Steven J
- Re: [castor-dev] JDO: Abstract c... Conor Allen
