On 7/26/2011 1:30 PM, Pavel Bortnovskiy wrote:
Thank you, Knut, for your prompt response.
However, such asymmetry (java.lang.Short->SMALLINT->java.lang.Integer) is causing trouble in my code and will require inefficient type checking to override such behavior.

I don't know if any of this will be helpful to you, but  in case ..

1) To achieve more symmetry  it is fine to use an Integer object with setObject() on a SMALLINT column.

2) ResultSetMetaData() regColumnClassName(int column) returns the class that will be returned with getObject()

3) If performance/efficiency  is a concern I think it is typically best to stay away from getObject() and setObject() use get/setShort() instead.