@Override
    @Nullable
    public Boolean getValue(ResultSet rs, int startIndex) throws SQLException {
        Number num = (Number) rs.getObject(startIndex);
        return num != null ? num.intValue() == 1 : null;
    }
{@code NumericBooleanType} maps Boolean to 1/0 (Integer) on the JDBC level

@author tiwe
querydsl-sql/src/main/java/com/querydsl/sql/types/NumericBooleanType.java