db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Abstract Class Persistence
Date Mon, 30 Jul 2007 08:51:41 GMT
Hi Craig,

> The difference between Persistent Interface and Persistent Abstract
> Class is:
>
> 1. interface PIXXX vs. abstract class PACXXX
> 2. PIXXXImpl implements PIXXX vs. PACXXXImpl extends PACXXX
> 3. All methods in PIXXX must be properties (corresponding get/set
> methods) vs. all abstract methods in PACXXX must be properties.
> 4. PIXXXImpl implements all property methods vs. PACXXXImpl
> implements all property methods.
>
> I think that JPOX has already done the hard part in getting PI to
> work. The remaining work is "mapping" the concepts of PI to PAC.
>
> If you point me in the right direction, I'll try to make a patch for JPOX.

Ok, if you have time try the following :-

1. Core/src/java/org/jpox/ObjectManagerImpl.java has the method newInstance(). 
This hands off the creation to an "ImplementationCreator".

2. Enhancer/src/java/org/jpox/enhancer/ImplementationCreatorImpl.java
It has a TODO at line 71. The processing of interfaces is at line 88 which 
utilises an "ImplementationGenerator".

3. Enhancer/src/java/org/jpox/enhancer/bcel/BCELImplementationGenerator.java
This currently is only set up for interfaces (InterfaceMetaData), so would 
need extending to allow classes (ClassMetaData) - so a new constructor 
perhaps.

... and if you don't have time then we will get around to it at some point.

Thx
-- 
Andy  (Java Persistent Objects - http://www.jpox.org)

Mime
View raw message