<commit_before>package com.dianping.dog.alarm.entity;

import java.util.Date;
import java.util.List;

import com.dianping.dog.alarm.rule.RuleTemplateEntity;
import com.dianping.dog.alarm.rule.RuleType;

/***
 *  @author yanchun.yang 
 *  从数据库中读取的规则配置实体类
 **/
public class RuleEntity {
	
	private static String CONNECT_TYPE="http";

	private static String CONNECT_SOURCE="cat";
	
	private long id;

	private String domain;

	private String name;

	private String type;
	
	private String reportType;

	private List<Duration> durations;

	private ConnectEntity connect;

	private long interval;
	
	private RuleTemplateEntity ruleTemplateEntity;

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public String getType() {
		return type;
	}
	
	
	private RuleType ruleType;

	
	private Date gmtModified;
<<<<<<< HEAD
	
	private long interval;
=======

	public void setType(String type) {
		this.type = type;
	}
>>>>>>> 4c70c6a27d39481554dc56fa7d5a7a98b3ad3b78

	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 long getInterval() {
		if(interval==0){
			interval=ruleTemplateEntity.getInterval();
		}
		return interval;
	}

	public void setInterval(long interval) {
		this.interval = interval;
	}

	public String getRuleType() {
		return reportType;
	}

	public void setRuleType(String ruleType) {
		this.reportType = ruleType;
	}

	public void setRuleType(RuleType ruleType) {
		this.ruleType = ruleType;
	}

	public List<Duration> getDurations() {
		if(durations==null||durations.size()==0){
			durations=ruleTemplateEntity.getDurations();
		}
		return durations;
	}

	public void setDurations(List<Duration> durations) {
		this.durations = durations;
	}

	public ConnectEntity getConnect() {
		ConnectEntity connect=new ConnectEntity();
		connect.setDomain(domain);
		connect.setName(name);
		connect.setType(type);
		connect.setReport(reportType);
		connect.setConnectSource(CONNECT_SOURCE);
		connect.setConnectType(CONNECT_TYPE);
		return connect;
	}

	public void setConnect(ConnectEntity connect) {
		this.connect = connect;
	}

	public RuleTemplateEntity getRuleTemplateEntity() {<commit_msg>modified Rule component<commit_after>package com.dianping.dog.alarm.entity;

import java.util.Date;
import java.util.List;

import com.dianping.dog.alarm.rule.RuleTemplateEntity;
import com.dianping.dog.alarm.rule.RuleType;

/***
 *  @author yanchun.yang 
 *  从数据库中读取的规则配置实体类
 **/
public class RuleEntity {
	
	private static String CONNECT_TYPE="http";

	private static String CONNECT_SOURCE="cat";
	
	private long id;

	private String domain;

	private String name;

	private String type;
	
	private String reportType;

	private List<Duration> durations;

	private ConnectEntity connect;

	private long interval;
	
	private RuleTemplateEntity ruleTemplateEntity;

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public String getType() {
		return type;
	}
	
	
	private RuleType ruleType;

	
	private Date gmtModified;

	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 long getInterval() {
		if(interval==0){
			interval=ruleTemplateEntity.getInterval();
		}
		return interval;
	}

	public void setInterval(long interval) {
		this.interval = interval;
	}

	public String getRuleType() {
		return reportType;
	}

	public void setRuleType(String ruleType) {
		this.reportType = ruleType;
	}

	public void setRuleType(RuleType ruleType) {
		this.ruleType = ruleType;
	}

	public List<Duration> getDurations() {
		if(durations==null||durations.size()==0){
			durations=ruleTemplateEntity.getDurations();
		}
		return durations;
	}

	public void setDurations(List<Duration> durations) {
		this.durations = durations;
	}

	public ConnectEntity getConnect() {
		ConnectEntity connect=new ConnectEntity();
		connect.setDomain(domain);
		connect.setName(name);
		connect.setType(type);
		connect.setReport(reportType);
		connect.setConnectSource(CONNECT_SOURCE);
		return connect;
	}

	public void setConnect(ConnectEntity connect) {
		this.connect = connect;
	}

	public RuleTemplateEntity getRuleTemplateEntity() {
{'fraction_non_alphanumeric': 0.10357941834451902, 'fraction_numerical': 0.006487695749440716, 'mean_word_length': 4.30367734282325, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4442125', 'n_tokens_mistral': 1599, 'n_tokens_neox': 1446, 'n_words': 334}