Re: Spec clarification on pm.newInstance object id

2006-02-10 Thread Craig L Russell
Hi Wes,Thank you for nitpicking. It's really important that we get these nits removed. Even better if you open a JIRA and provide a patch.CraigOn Feb 10, 2006, at 10:30 AM, Wes Biggs wrote:  More nitpicking.  The jdo2-api javadoc should be updated to reflect that concrete classes may be parameters of PersistenceManager.newInstance(); it currently reads:  java.lang.Object newInstance(java.lang.Class pcClass)   Creates an instance of a persistence-capable interface or abstract class. The returned instance is transient.  Parameters:  pcClass - Must be an abstract class or interface that is declared in the metadata.Regards,  Wes   Craig Russell wrote: Javadogs,  I'd like to clarify the specification for the object-id for instances created using pm.newInstance.  Here's the original text, for context.The following method is used to create an instance of a persistence-capable interface, or of a concrete or abstract class.  Object newInstance(Class persistenceCapable);  The parameter must be one of the following:  an abstract class that is declared in the metadata using the class element, or   an interface that is declared in the metadata using the interface element, or  a concrete class that is declared in the metadata as persistence-capable. In this case, there must be a public no-args constructor.  The returned instance is transient, and is an “instanceof” the parameter. Applications might use the instance via the get and set property methods and change its life cycle state exactly as if it were an instance of a persistence-capable class.Here's the clarification to be added:For interfaces and classes that use a SingleFieldIdentity as the object-id class, if the returned instance is subsequently made persistent, the target class stored in the object-id instance is the parameter of the newInstance method that created it.  Craig RussellArchitect, Sun Java Enterprise System http://java.sun.com/products/jdo408 276-5638 mailto:[EMAIL PROTECTED]P.S. A good JDO? O, Gasp!   Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!  

smime.p7s
Description: S/MIME cryptographic signature


Spec clarification on pm.newInstance object id

2005-09-07 Thread Craig Russell
Javadogs,I'd like to clarify the specification for the object-id for instances created using pm.newInstance.Here's the original text, for context.The following method is used to create an instance of a persistence-capable interface, or of a concrete or abstract class.Object newInstance(Class persistenceCapable);The parameter must be one of the following:an abstract class that is declared in the metadata using the class element, or an interface that is declared in the metadata using the interface element, ora concrete class that is declared in the metadata as persistence-capable. In this case, there must be a public no-args constructor.The returned instance is transient, and is an “instanceof” the parameter. Applications might use the instance via the get and set property methods and change its life cycle state exactly as if it were an instance of a persistence-capable class.Here's the clarification to be added:For interfaces and classes that use a SingleFieldIdentity as the object-id class, if the returned instance is subsequently made persistent, the target class stored in the object-id instance is the parameter of the newInstance method that created it. Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp!  

smime.p7s
Description: S/MIME cryptographic signature