@Override
    public T getValue(ResultSet rs, int startIndex) throws SQLException {
        int ordinal = rs.getInt(startIndex);
        return rs.wasNull() ? null : type.getEnumConstants()[ordinal];
    }
{@code EnumByOrdinalType} maps Enum types to their Integer ordinals on the JDBC level

@author tiwe

@param <T>
querydsl-sql/src/main/java/com/querydsl/sql/types/EnumByOrdinalType.java