code: public static <T extends Enum<T>> T getEnum(final ResultSet rs, final Class<T> enumType, final String columnName) throws SQLException
      {
          final String str = rs.getString(columnName);
  
          return (str == null) ? null : Enum.valueOf(enumType, str);
      }
docs: Returns an Enum representing the data or null if the input is null.