java - ResultSet getObject<T> convention on NULLs -
i looking nice-looking way extract nullable value resultset, opposite wasnull. documentation (api spec) guarantees "untyped" getobject (returning object) returns null when column contains null, making following construct valid: (boolean)rs.getobject(1)
.
naturally, prefer rs.getobject(1, boolean.class)
- but, reason, typed overload no such guarantees provided.
or they? maybe missing something? found nothing particular oveload @ here , , jdbc spec seems overlook such overloads entirely.
so, nulls converted nulls rs.getobject(1, boolean.class)
, or don't they, or implementation-dependent, or maybe depends on custom conversions defined in application?
Comments
Post a Comment