Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 76632 invoked from network); 11 Feb 2006 00:04:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Feb 2006 00:04:51 -0000 Received: (qmail 86864 invoked by uid 500); 11 Feb 2006 00:04:51 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 86853 invoked by uid 99); 11 Feb 2006 00:04:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2006 16:04:51 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.31] (HELO brmea-mail-1.sun.com) (192.18.98.31) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Feb 2006 16:04:50 -0800 Received: from fe-amer-03.sun.com ([192.18.108.177]) by brmea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id k1B04TSD019120 for ; Fri, 10 Feb 2006 17:04:29 -0700 (MST) Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0IUH00201XIJM300@mail-amer.sun.com> (original mail from Craig.Russell@Sun.COM) for jdo-dev@db.apache.org; Fri, 10 Feb 2006 17:04:29 -0700 (MST) Received: from [192.168.0.10] (c-24-6-172-77.hsd1.ca.comcast.net [24.6.172.77]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0IUH00LSBXJGL610@mail-amer.sun.com>; Fri, 10 Feb 2006 17:04:29 -0700 (MST) Date: Fri, 10 Feb 2006 16:04:25 -0800 From: Craig L Russell Subject: Re: Spec clarification on pm.newInstance object id In-reply-to: <43ECDBBA.3090506@tralfamadore.com> Sender: Craig.Russell@Sun.COM To: Wes Biggs Cc: JDO Expert Group , jdo-dev@db.apache.org Message-id: MIME-version: 1.0 X-Mailer: Apple Mail (2.746.2) Content-type: multipart/signed; protocol="application/pkcs7-signature"; boundary=Apple-Mail-359-247792284; micalg=sha1 References: <43ECDBBA.3090506@tralfamadore.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-359-247792284 Content-Type: multipart/alternative; boundary=Apple-Mail-358-247791907 --Apple-Mail-358-247791907 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Hi Wes, Thank you for nitpicking. It's really important that we get these =20 nits removed. Even better if you open a JIRA and provide a patch. Craig On Feb 10, 2006, at 10:30 AM, Wes Biggs wrote: > More nitpicking. The jdo2-api javadoc should be updated to reflect =20= > that concrete classes may be parameters of =20 > PersistenceManager.newInstance(); it currently reads: > > java.lang.Object newInstance(java.lang.Class pcClass) > Creates an instance of a persistence-capable interface or abstract =20 > class. The returned instance is transient. > > Parameters: > pcClass - Must be an abstract class or interface that is declared =20 > in the metadata. > > Regards, > > Wes > > > Craig Russell wrote: >> Javadogs, >> >> I'd like to clarify the specification for the object-id for =20 >> instances created using pm.newInstance. >> >> Here's the original text, for context. >> >> >> The following method is used to create an instance of a =20 >> 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 =20= >> element, or >> an interface that is declared in the metadata using the interface =20 >> element, or >> a concrete class that is declared in the metadata as persistence-=20 >> capable. In this case, there must be a public no-args constructor. >> The returned instance is transient, and is an =93instanceof=94 the =20= >> parameter. Applications might use the instance via the get and set =20= >> property methods and change its life cycle state exactly as if it =20 >> 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 =20 >> object-id class, if the returned instance is subsequently made =20 >> persistent, the target class stored in the object-id instance is =20 >> the parameter of the newInstance method that created it. >> >> >> Craig Russell >> Architect, Sun Java Enterprise System http://java.sun.com/products/=20= >> jdo >> 408 276-5638 mailto:Craig.Russell@sun.com >> P.S. A good JDO? O, Gasp! >> > 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! --Apple-Mail-358-247791907 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=WINDOWS-1252 Hi Wes,

Thank you for nitpicking. = It's really important that we get these nits removed.=A0

Even better if you open a = JIRA and provide a patch.

Craig

On Feb 10, 2006, at 10:30 AM, Wes Biggs wrote:

More = nitpicking.=A0 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=A0pcClass)
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.

=
<spec>
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 =93instanceof=94 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.
=
</spec>

=
Here's the clarification to be added:

<proposed>
=
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.
=
</proposed>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo=
P.S. A good JDO? O, = Gasp!


=

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!


= --Apple-Mail-358-247791907-- --Apple-Mail-359-247792284 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Disposition: attachment; filename=smime.p7s MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGUDCCAwkw ggJyoAMCAQICEB7Y7fLHmKoeHTUdbtYrvpAwDQYJKoZIhvcNAQEEBQAwYjELMAkGA1UEBhMCWkEx JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA1MTIxNTIxNDc0NFoXDTA2MTIxNTIxNDc0 NFowbDEQMA4GA1UEBBMHUnVzc2VsbDEUMBIGA1UEKhMLQ3JhaWcgTGFpcmQxHDAaBgNVBAMTE0Ny YWlnIExhaXJkIFJ1c3NlbGwxJDAiBgkqhkiG9w0BCQEWFUNyYWlnLlJ1c3NlbGxAU3VuLkNPTTCC ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMXXgEAm88nu8cFbxXSWqTq+GaYpCx/0QSom 8kBbVxpJIURuO4ErLDupeXu6y9+5e7ZKLbeSQE5xbfYPcQR/IhqmYKy5YqRcuzPXREBj2zKEkZph pNXWpHgMdx9W8dq0Cu2i9Ux/S6c2MuEHrP6gfGGll+b/mzLoO280QHTuE4pcpKntRnwZdGxQ/5l8 IL+eLP+jpJAbYW9C+KNKofZtS6V6R0uzlqTOsEdZvwxZQ4mmPgHoz1+Gjwme/PC5sKvF09MaJDiI pj9SvZ4CTCgcDZV78J086YwlVbMC0VQotjhu1p42lr8CS33IXLz3OW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