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

import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author Pavel Bortnik
 */
@Document
public class ProjectAnalyzerConfig implements Serializable {

	public static final int MIN_DOC_FREQ = 7;
	public static final int MIN_TERM_FREQ = 1;
	public static final int MIN_SHOULD_MATCH = 80;
	public static final int NUMBER_OF_LOG_LINES = 2;

	private int minDocFreq;

	private int minTermFreq;

	private int minShouldMatch;

	private int numberOfLogLines;

	private boolean indexingRunning;

	private AtomicInteger analyzingLaunches;

	private Boolean isAutoAnalyzerEnabled;

	private AnalyzeMode analyzerMode;

	public ProjectAnalyzerConfig() {
	}

	public ProjectAnalyzerConfig(int minDocFreq, int minTermFreq, int minShouldMatch, int numberOfLogLines) {
		this.minDocFreq = minDocFreq;
		this.minTermFreq = minTermFreq;
		this.minShouldMatch = minShouldMatch;
		this.numberOfLogLines = numberOfLogLines;
	}

	public AtomicInteger getAnalyzingLaunches() {
		return analyzingLaunches;
	}

	public int getMinDocFreq() {
		return minDocFreq;
	}

	public void setMinDocFreq(int minDocFreq) {
		this.minDocFreq = minDocFreq;
	}

	public int getMinTermFreq() {
		return minTermFreq;
	}

	public void setMinTermFreq(int minTermFreq) {
		this.minTermFreq = minTermFreq;
	}

	public int getMinShouldMatch() {
		return minShouldMatch;
	}

	public void setMinShouldMatch(int minShouldMatch) {
		this.minShouldMatch = minShouldMatch;
	}

	public int getNumberOfLogLines() {
		return numberOfLogLines;
	}

	public void setNumberOfLogLines(int numberOfLogLines) {
		this.numberOfLogLines = numberOfLogLines;
	}

	public boolean isIndexingRunning() {
		return indexingRunning;
	}

	public void setIndexingRunning(boolean indexingRunning) {
		this.indexingRunning = indexingRunning;
	}

	public Boolean getIsAutoAnalyzerEnabled() {
		return isAutoAnalyzerEnabled;
	}

	public void setIsAutoAnalyzerEnabled(Boolean autoAnalyzerEnabled) {
		isAutoAnalyzerEnabled = autoAnalyzerEnabled;
	}

	public AnalyzeMode getAnalyzerMode() {
		return analyzerMode;
	}

	public void setAnalyzerMode(AnalyzeMode analyzerMode) {
		this.analyzerMode = analyzerMode;
	}
}

@@ -140,58 +140,8 @@
 ble;
-%0Aimport java.util.concurrent.atomic.AtomicInteger;
 %0A%0A/*
@@ -583,51 +583,8 @@
 g;%0A%0A
-%09private AtomicInteger analyzingLaunches;%0A%0A
 %09pri
@@ -907,16 +907,16 @@
 dMatch;%0A
+
 %09%09this.n
@@ -959,87 +959,8 @@
 %09%7D%0A%0A
-%09public AtomicInteger getAnalyzingLaunches() %7B%0A%09%09return analyzingLaunches;%0A%09%7D%0A%0A
 %09pub

remove unused fields