jsr338-experts@jpa-spec.java.net

[jsr338-experts] StoredProcedureQuery

From: Steve Ebersole <steve.ebersole_at_redhat.com>
Date: Thu, 28 Jun 2012 15:06:09 -0500

Some more questions/commenst from implementation, this time in regards
to javax.persistence.StoredProcedureQuery:

1) StoredProcedureQuery extends Query. Query defines a few methods that
are questionable being applied to a stored procedure call of any sort,
namely the paging values for firstResults
(getFirstResult/setFirstResult) and maxResults
(getMaxResults/setMaxResults). What is the expectation for those calls
(mainly the setters I guess) when applied to StoredProcedureQuery?
Personally I'd like to throw an exception, but the javadocs on those
Query methods allow only for "@throws IllegalArgumentException if the
argument is negative"

2) In regards to named versus positional parameters, I had a few questions:
a) Could we possibly add a restriction that developers should use only
one form or the other? I see zero benefit to allowing developers to mix
named and positional parameters in a single query, and in fact see only
confusion about how those parameters ultimately get merged together.
b) Given the javadoc statement that named parameters need to be
registered "in order", I am assuming that their names have no relation
to the notion of named parameters added to java.sql.CallableStatement in
Java 7?

Thanks,
Steve