On 5 February 2014 17:31, Gary Gregory <[email protected]> wrote:
> I like the enum idea.
>
> Are these ints supposed to match up to JDBC constants?

Yes, as per the email ;-)
(they are ResultSet constants)

However I have since looked at this in more depth, and it looks like
the changes will affect a lot of the public methods.

Not sure it would be OK to require DBCP enums in the public API.

[The previous int => enum change was far less invasive, as it was
related to internal checks only]

> Gary
>
>
> On Wed, Feb 5, 2014 at 10:55 AM, sebb <[email protected]> wrote:
>
>> The PStmtKey ctors have multiple int parameters:
>>
>> PStmtKey(String sql, int resultSetType, int resultSetConcurrency)
>> PStmtKey(String sql, String catalog, int autoGeneratedKeys) {
>> PStmtKey(String sql, String catalog, int resultSetType, int
>> resultSetConcurrency)
>> public PStmtKey(String sql, String catalog, int resultSetType, int
>> resultSetConcurrency, StatementType stmtType)
>>
>> and
>>
>> PStmtKey(String sql, String catalog, StatementType stmtType, Integer
>> autoGeneratedKeys)
>>
>> if you count autoboxed code.
>>
>> These are quite confusing.
>> Maybe some or all could be replaced with enums?
>>
>> resultSetType can only be
>>
>> ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or
>> ResultSet.TYPE_SCROLL_SENSITIVE
>>
>> and resultSetConcurrency can only be
>>
>> ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
>
> --
> E-Mail: [email protected] | [email protected]
> Java Persistence with Hibernate, Second 
> Edition<http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to