@SuppressWarnings("PMD.UnusedPrivateMethod")
        private static Object getValueByName(Class<? extends Enum<?>> enumClass, String name) {
            return Stream.concat(
                        enumConstants(enumClass).filter(enumValueMatches(name, String::equals)),
                        enumConstants(enumClass).filter(enumValueMatches(name, String::equalsIgnoreCase))
                    )
                    .findFirst()
                    .orElseThrow(() -> new UnableToProduceResultException(
                        String.format("no %s value could be matched to the name %s", enumClass.getSimpleName(), name)));
        }
Map database integer values to enum ordinal values.

@param <E> the enum type to map
@param type the enum type to map
@return an enum mapper that matches on {@link Enum#ordinal()}
core/src/main/java/org/jdbi/v3/core/mapper/EnumMapper.java