@Override
    public BigInteger getValue(ResultSet rs, int startIndex) throws SQLException {
        long val = rs.getLong(startIndex);
        return rs.wasNull() ? null : BigInteger.valueOf(val);
    }
{@code BigIntegerType} maps BigInteger to Long on the JDBC level

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