db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Russell <Craig.Russ...@Sun.COM>
Subject Re: Collections of interfaces
Date Fri, 29 Apr 2005 19:25:04 GMT
Hi Andy,

This is great news! One question below.

On Apr 29, 2005, at 11:05 AM, 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">
>> <jdo>
>> <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"/>
>> </class>
>> </package>
>> </jdo>
>
> Craig/Michelle,
>
> 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.

So is it sufficient that the SimpleInterface metadata be ahead of the 
SimpleClass metadata in the .jdo file?

Thanks,

Craig
>
> 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.
>
> -- 
> Andy
> Java Persistent Objects JDO - JPOX
>
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!

Mime
View raw message