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

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