Title: JDO: Abstract class and inheritance
I can imagine that it is needed for Castor that the class is not abstract ( I can live with it :-) ), but the possibility of
executing a find over the base class .... is this a Castor's limitation?
 
Thanks,
 
Isi,
 
-----Mensaje original-----
De: Mielnicki, Steven J [mailto:[EMAIL PROTECTED]]
Enviado el: mi�rcoles, 05 de febrero de 2003 14:15
Para: [EMAIL PROTECTED]
Asunto: Re: [castor-dev] JDO: Abstract class and inheritance

 

            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-----
From: "Legido Mart�nez, Isidoro" [mailto:[EMAIL PROTECTED]]
Sent
:
Wednesday, February 05, 2003 4:09 AM
To: [EMAIL PROTECTED]
Subject: [castor-dev] JDO: Abstract class and inheritance

 

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.
+ If I've two classes: ImplClass1 and ImplClass2 and both "extends" AbstractClass, Can I perform a query on AbstractClass?

I would expect to get back a collection of ImplClass1 and ImplClass2 's instances together.

Thanks a lot,

Isi,

Reply via email to