Workaround for Derby's limited support for JDBC 4.1 getObject(index, requiredType)

Issue: SPR-12157
Polishing