db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Re: Collections of interfaces
Date Fri, 29 Apr 2005 18:57:35 GMT
Andy Jefferson wrote:

>>I expect that to remove the JPOX extension, we will add the
>><implements> tag as follows:
>><?xml version="1.0" encoding="UTF-8"?>
>><!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects
>>Metadata 2.0//EN" "http://java.sun.com/dtd/jdo_2_0.dtd">
>><package name="org.apache.jdo.tck.pc.fieldtypes">
>><class name="SimpleClass" identity-type="application"
>>     objectid-class="org.apache.jdo.tck.pc.fieldtypes.SimpleClass$Oid">
>>   <implements name="SimpleInterface">
>><field name="id" primary-key="true"/>
>I've added support for <implements> to JPOX CVS - will be in the next nightly 
>build, dated 20050430 or later. You should be able to do as per the example 
>above. Give it a try and report any problems on the forum - would be nice to 
>avoid using any JPOX extensions in your TCK code.
>It does rely on JPOX having already encountered the MetaData for a class that 
>has the <implements> at the point when the list of classes implementing the 
>interface is needed. So in your example above, it will need to have met the 
>"SimpleClass" class (and its MetaData) at the point when the 
>"SimpleInterface" is first met. 
>The JPOX "implementation-classes" is still valid to be used since, as Erik 
>said, defines which classes are valid to be used for a particular field.
Very good, Andy, thanks.  I will try it out when I get the new build.  
Is it still required to use "implementation-classes" with a persistent 
field defined as an interface?

-- Michelle

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message