db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Persistent interface specification clarification
Date Thu, 22 Feb 2007 21:18:08 GMT
There are three scenarios for using persistent interfaces:

- as the parameter of the PersistenceManager.newInstance method

- as the type of a field or property of a persistent interface or class

- as the type of a field or property used by a query

I'd like to discuss the following in tomorrow's conference call.

The PersistenceManager.newInstance method discusses requirements if  
the parameter is a persistent interface, but it's incomplete.

<spec>
In order for the newInstance method to be used, the parameter  
interface must be completely mapped. For relational implementations,  
the interface must be mapped to a table and all persistent properties  
must be mapped to columns. Additionally, interfaces that are the  
targets of all relationships from persistent properties must also be  
mapped. Otherwise, JDOUserException is thrown by the newInstance method.
</spec>

I'd like to clarify it a bit:
<proposed>
In order for the newInstance method to be used with a persistent  
interface, the parameter interface must be completely mapped. That  
is, the interface must be declared in metadata using the interface  
element.

Additionally, for relational implementations,

o the interface must be mapped to a table; portable applications will  
use the table attribute for this purpose

o all persistent properties must be mapped to columns; portable  
applications will use the column attribute of the property element  
contained in the interface element

o interfaces that are of types of relationships declared as  
persistent properties of the parameter interface must all be  
completely mapped

If any of the above conditions is not met, JDOUserException is thrown  
by the newInstance method.
</proposed>
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