@@ -0,0 +1,1334 @@
+package com.epam.ta.reportportal.entity.filter;%0A%0Aimport com.epam.ta.reportportal.commons.validation.BusinessRule;%0Aimport com.epam.ta.reportportal.entity.item.TestItem;%0Aimport com.epam.ta.reportportal.entity.launch.Launch;%0Aimport com.epam.ta.reportportal.entity.log.Log;%0Aimport com.epam.ta.reportportal.ws.model.ErrorType;%0A%0Aimport java.util.Arrays;%0Aimport java.util.Optional;%0A%0Aimport static com.epam.ta.reportportal.commons.Predicates.isPresent;%0A%0A/**%0A * Describe possible object types for %7B@link com.epam.ta.reportportal.commons.querygen.Filter%7D object%3Cbr%3E%0A * construction and contains functionality for calculating classes objects %3Cbr%3E%0A * by appropriate ObjectType's elements.%0A *%0A * @author Aliaksei_Makayed%0A */%0Apublic enum ObjectType %7B%0A%0A%09Launch(Launch.class),%0A%09TestItem(TestItem.class),%0A%09Log(Log.class);%0A%0A%09private Class%3C?%3E classObject;%0A%0A%09ObjectType(Class%3C?%3E classObject) %7B%0A%09%09this.classObject = classObject;%0A%09%7D%0A%0A%09public static Class%3C?%3E getTypeByName(String name) %7B%0A%09%09Optional%3CObjectType%3E objectType = Arrays.stream(ObjectType.values()).filter(type -%3E type.name().equalsIgnoreCase(name)).findAny();%0A%09%09BusinessRule.expect(objectType, isPresent()).verify(%0A%09%09%09%09ErrorType.BAD_SAVE_USER_FILTER_REQUEST,%0A%09%09%09%09%22Unknown Filter object type '%22 + name + %22'. Possible types: log, launch, testItem.%22%0A%09%09);%0A%09%09return objectType.get().classObject;%0A%09%7D%0A%7D%0A

add mapping of object types for filters