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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -