@ Override public boolean getBoolean ( int columnIndex ) throws SQLException { checkColumnBounds ( columnIndex ) ; // TODO: Tempting to apply a != 0 operation on numbers and // .equals("true") on strings, but... hacky try { return ( new Long ( table . getLong ( columnIndex - 1 ) ) ) . intValue ( ) == 1 ; } catch ( Exception x ) { throw SQLError . get ( x ) ; } }
ResultSet object as a boolean in the Java programming language .