package com.epam.ta.reportportal.entity.enums.converter;

import com.epam.ta.reportportal.entity.AnalyzeMode;

import javax.persistence.AttributeConverter;
import javax.persistence.Converter;

/**
 * @author Ivan Budayeu
 */
@Converter(autoApply = true)
public class AnalyzerModeConverter implements AttributeConverter<AnalyzeMode, String> {
	@Override
	public String convertToDatabaseColumn(AnalyzeMode attribute) {
		return attribute.getValue();
	}

	@Override
	public AnalyzeMode convertToEntityAttribute(String dbAnalyzerModeName) {
		return AnalyzeMode.fromString(dbAnalyzerModeName);
	}
}

@@ -102,16 +102,133 @@
 yzeMode;
+%0Aimport com.epam.ta.reportportal.exception.ReportPortalException;%0Aimport com.epam.ta.reportportal.ws.model.ErrorType;
 %0A%0Aimport
@@ -698,15 +698,109 @@
 odeName)
+%0A%09%09%09%09.orElseThrow(() -%3E new ReportPortalException(ErrorType.UNCLASSIFIED_REPORT_PORTAL_ERROR))
 ;%0A%09%7D%0A%7D%0A

replace with optional