jsr338-experts@jpa-spec.java.net

[jsr338-experts] Re: JPA 2.1 specification draft

From: Rainer Kwesi Schweigkoffer <kwesi_at_sap.com>
Date: Wed, 08 Jun 2011 12:50:09 +0200

Hi Linda, all,

Linda DeMichiel, am 6 Jun 2011 hast Du um 13:37 zum Thema "[jsr338-experts] Re: JPA 2.1 specification draft" geschrieben :

> > What, by the way, is the expected behaviour of getParameterValue() for
> > INOUT and OUT parameters of a stored procedure ? Is getParameterValue()
> > supposed to return the input value bound to an INOUT parameter even
> > after execution ?
> >
>
> That was my assumption, although the spec needs to clarify this one way or
> the other. If there is agreement on this interpretation, then getParameterValue
> for an OUT parameter should throw IllegalStateException (as currently documented).
>
> Do you think otherwise?

I'd consider it useful if getParameterValue() would continue to return
the bound input value for an INOUT parameter.

Concerning OUT parameters I am fine with the exception, however, I
would welcome the javadoc to be more explicit on this case since
someone could take the perspective a stored procedure, during its
execution, was binding a value to an OUT parameter.

Since a <T> T getParameterValue(Parameter<T> param) method is inherited
from Query one might think of a
<T> T getOutputParameterValue(Parameter<T> param)
method as well, and whether, for generic tools inspecting a
(StoredProcedure)Query, a StoredProcedureParameter extending Parameter
might be provided that could be asked for its ParameterMode. In that
case respective is-methods might be helpful.

Best regards
Rainer



---
Rainer Schweigkoffer                      SAP AG Walldorf
Business Solution & Technology            TD Core JS&I
Technology Development                    Dietmar-Hopp-Allee 16
Java Server Core                          D-69190 Walldorf
JEE Implementation Group           phone: +49 6227 7 45305
Building 3, I.3.14                 fax:   +49 6227 7 821177
rainer.schweigkoffer_at_sap.com
Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Werner Brandt, Angelika Dammann,
Bill McDermott (Co-CEO), Gerhard Oswald, Vishal Sikka,
Jim Hagemann Snabe (Co-CEO)
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory 
Board: Hasso Plattner
Registergericht/Commercial Register Mannheim No HRB 350269
Diese E-Mail kann Betriebs- oder Geschaeftsgeheimnisse oder sonstige
vertrauliche Informationen enthalten. Sollten Sie diese E-Mail 
irrtuemlich erhalten haben, ist Ihnen eine Verwertung des Inhalts, 
eine Vervielfaeltigung oder Weitergabe der E-Mail ausdruecklich 
untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die 
empfangene E-Mail. Vielen Dank.
This e-mail may contain trade secrets or privileged, undisclosed, or
otherwise confidential information. If you have received this e-mail 
in error, you are hereby notified that any review, copying, or 
distribution of it is strictly prohibited. Please inform us 
immediately and destroy the original transmittal. Thank you for your 
cooperation.