/*
 * Copyright 2017 EPAM Systems
 *
 *
 * This file is part of EPAM Report Portal.
 * https://github.com/reportportal/service-api
 *
 * Report Portal is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Report Portal is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Report Portal.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.epam.ta.reportportal.entity.filter;

import com.epam.ta.reportportal.entity.project.Project;

import javax.persistence.*;

/**
 * @author Pavel Bortnik
 */
@Entity
@Table(name = "filter")
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class Queryable {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id;

	@Column(name = "name")
	private String name;

	@Column(name = "target")
	private Class<?> targetClass;

	@Column(name = "description")
	private String description;

	@ManyToOne
	@JoinColumn(name = "project_id")
	private Project project;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Class<?> getTargetClass() {
		return targetClass;
	}

	public void setTargetClass(Class<?> targetClass) {
		this.targetClass = targetClass;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Project getProject() {
		return project;
	}

	public void setProject(Project project) {
		this.project = project;
	}
}

@@ -1223,24 +1223,26 @@
 private 
-Class%3C?%3E
+ObjectType
  targetC
@@ -1586,24 +1586,26 @@
 %09public 
-Class%3C?%3E
+ObjectType
  getTarg
@@ -1674,16 +1674,18 @@
 ass(
-Class%3C?%3E
+ObjectType
  tar

replace class with object type in stored filters