This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-argus-service/src/main/java/com/nis/domain/LogEntity.java

548 lines
12 KiB
Java
Raw Normal View History

2017-12-19 14:55:52 +08:00
/**
* @Title: LogEntity.java
* @Package com.nis.domain
* @Description: TODO(用一句话描述该文件做什么)
* @author darnell
* @date 2016年9月1日 上午10:16:54
* @version V1.0
*/
2017-12-19 14:55:52 +08:00
package com.nis.domain;
import java.io.Serializable;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
import javax.xml.bind.annotation.XmlTransient;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.google.common.collect.Maps;
import com.nis.util.Configurations;
import com.nis.util.JsonDateSerializer;
import com.wordnik.swagger.annotations.ApiModelProperty;
/**
* @ClassName: LogEntity
* @Description: TODO(日志公共实体部分)
* @author (darnell)
* @date 2016年9月1日 上午10:16:54
* @version V1.0
*/
2017-12-19 14:55:52 +08:00
public abstract class LogEntity<T> implements Serializable {
/**
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
*/
2017-12-19 14:55:52 +08:00
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "日志编号", required = true)
2017-12-19 14:55:52 +08:00
protected Long id;
@ApiModelProperty(value = "配置ID", required = true)
2017-12-19 14:55:52 +08:00
protected Long cfgId;
@ApiModelProperty(value = "发现时间", required = true)
2017-12-19 14:55:52 +08:00
protected Date foundTime;
@ApiModelProperty(value = "接收时间", required = true)
2017-12-19 14:55:52 +08:00
protected Date recvTime;
@ApiModelProperty(value = "协议类型", required = true)
protected String transProto;
@ApiModelProperty(value = "IP地址类型", required = true)
protected Integer addrType;
@ApiModelProperty(value = "服务端ip地址", required = true)
protected String dIp;
@ApiModelProperty(value = "客户端ip地址", required = true)
protected String sIp;
@ApiModelProperty(value = "服务端端口", required = true)
protected String dPort;
@ApiModelProperty(value = "客户端端口", required = true)
protected String sPort;
@ApiModelProperty(value = "业务类型", required = true)
protected Integer service;
@ApiModelProperty(value = "出入口编号", required = true)
protected Long entranceId;
@ApiModelProperty(value = "串联设备编号", required = true)
protected Integer deviceId;
@ApiModelProperty(value = "传输方向", required = true, notes = "0域内->域外1域外->域内描述的是CLIENT_IP信息")
protected Integer direction;
@ApiModelProperty(value = "流类型", required = true, notes = "0c2s1s2c2double")
protected Integer streamDir;
@ApiModelProperty(value = "处理机IP", required = true)
protected String capIp;
@ApiModelProperty(value = "嵌套地址列表", required = true)
protected String addrList;
@ApiModelProperty(value = "用户自定义域", required = true)
private String userRegion;
2017-12-19 14:55:52 +08:00
protected Long foundTimeCluster;
protected Long recvTimeCluster;
protected String searchCfgId;
2017-12-19 14:55:52 +08:00
protected String searchFoundStartTime;
protected String searchFoundEndTime;
protected Long searchFoundStartTimeCluster;
protected Long searchFoundEndTimeCluster;
protected String searchProtocol;
protected String searchServerIp;
protected String searchClientIp;
protected Integer searchDirection;
protected String searchServiceType;
2017-12-19 14:55:52 +08:00
protected String searchEntranceId;
protected String searchCljIp;
2017-12-19 14:55:52 +08:00
@JsonIgnore
public Long getFoundTimeCluster() {
return foundTimeCluster;
}
2017-12-19 14:55:52 +08:00
@JsonIgnore
public Long getRecvTimeCluster() {
return recvTimeCluster;
}
2017-12-19 14:55:52 +08:00
public void setFoundTimeCluster(Long foundTimeCluster) {
this.foundTimeCluster = foundTimeCluster;
}
2017-12-19 14:55:52 +08:00
public void setRecvTimeCluster(Long recvTimeCluster) {
this.recvTimeCluster = recvTimeCluster;
}
2017-12-19 14:55:52 +08:00
@JsonIgnore
public Long getSearchFoundStartTimeCluster() {
return searchFoundStartTimeCluster;
}
2017-12-19 14:55:52 +08:00
public void setSearchFoundStartTimeCluster(Long searchFoundStartTimeCluster) {
this.searchFoundStartTimeCluster = searchFoundStartTimeCluster;
}
2017-12-19 14:55:52 +08:00
@JsonIgnore
public Long getSearchFoundEndTimeCluster() {
return searchFoundEndTimeCluster;
}
2017-12-19 14:55:52 +08:00
public void setSearchFoundEndTimeCluster(Long searchFoundEndTimeCluster) {
this.searchFoundEndTimeCluster = searchFoundEndTimeCluster;
}
2017-12-19 14:55:52 +08:00
/**
* 当前实体分页对象
*/
protected Page<T> page;
2017-12-19 14:55:52 +08:00
/**
* 自定义SQLSQL标识SQL内容
*/
protected Map<String, String> sqlMap;
/**
* @Title:
* @Description: TODO
* @param
*/
2017-12-19 14:55:52 +08:00
public LogEntity() {
super();
}
/**
* @return id
*/
2017-12-19 14:55:52 +08:00
public Long getId() {
return id;
}
/**
* @param id
* 要设置的 id
*/
2017-12-19 14:55:52 +08:00
public void setId(Long id) {
this.id = id;
}
/**
* @return cfgId
*/
2017-12-19 14:55:52 +08:00
public Long getCfgId() {
return cfgId;
}
/**
* @param cfgId
* 要设置的 cfgId
*/
2017-12-19 14:55:52 +08:00
public void setCfgId(Long cfgId) {
this.cfgId = cfgId;
}
/**
* @return foundTime
*/
@JsonSerialize(using = JsonDateSerializer.class)
2017-12-19 14:55:52 +08:00
public Date getFoundTime() {
if (foundTime == null && this.foundTimeCluster != null) {
foundTime = new Date(this.foundTimeCluster * 1000);
2017-12-19 14:55:52 +08:00
}
return foundTime;
}
/**
* @param foundTime
* 要设置的 foundTime
*/
2017-12-19 14:55:52 +08:00
public void setFoundTime(Date foundTime) {
this.foundTime = foundTime;
}
/**
* @return recvTime
*/
@JsonSerialize(using = JsonDateSerializer.class)
2017-12-19 14:55:52 +08:00
public Date getRecvTime() {
if (recvTime == null && this.recvTimeCluster != null) {
recvTime = new Date(this.recvTimeCluster * 1000);
2017-12-19 14:55:52 +08:00
}
return recvTime;
}
/**
* @param recvTime
* 要设置的 recvTime
*/
2017-12-19 14:55:52 +08:00
public void setRecvTime(Date recvTime) {
this.recvTime = recvTime;
}
/**
* @return entranceId
*/
public Long getEntranceId() {
return entranceId;
2017-12-19 14:55:52 +08:00
}
/**
* @param entranceId
* 要设置的 entranceId
*/
public void setEntranceId(Long entranceId) {
this.entranceId = entranceId;
2017-12-19 14:55:52 +08:00
}
public String getTransProto() {
return transProto;
2017-12-19 14:55:52 +08:00
}
public void setTransProto(String transProto) {
this.transProto = transProto;
2017-12-19 14:55:52 +08:00
}
public String getdIp() {
return dIp;
2017-12-19 14:55:52 +08:00
}
public void setdIp(String dIp) {
this.dIp = dIp;
2017-12-19 14:55:52 +08:00
}
public String getsIp() {
return sIp;
2017-12-19 14:55:52 +08:00
}
public void setsIp(String sIp) {
this.sIp = sIp;
2017-12-19 14:55:52 +08:00
}
public String getdPort() {
return dPort;
2017-12-19 14:55:52 +08:00
}
public void setdPort(String dPort) {
this.dPort = dPort;
2017-12-19 14:55:52 +08:00
}
public String getsPort() {
return sPort;
2017-12-19 14:55:52 +08:00
}
public void setsPort(String sPort) {
this.sPort = sPort;
2017-12-19 14:55:52 +08:00
}
public Integer getService() {
return service;
2017-12-19 14:55:52 +08:00
}
public void setService(Integer service) {
this.service = service;
2017-12-19 14:55:52 +08:00
}
public Integer getStreamDir() {
return streamDir;
2017-12-19 14:55:52 +08:00
}
public void setStreamDir(Integer streamDir) {
this.streamDir = streamDir;
2017-12-19 14:55:52 +08:00
}
public String getCapIp() {
return capIp;
2017-12-19 14:55:52 +08:00
}
public void setCapIp(String capIp) {
this.capIp = capIp;
2017-12-19 14:55:52 +08:00
}
public String getAddrList() {
return addrList;
2017-12-19 14:55:52 +08:00
}
public void setAddrList(String addrList) {
this.addrList = addrList;
2017-12-19 14:55:52 +08:00
}
@JsonIgnore
@XmlTransient
public Page<T> getPage() {
if (page == null) {
2017-12-19 14:55:52 +08:00
page = new Page<T>();
}
return page;
}
2017-12-19 14:55:52 +08:00
public Page<T> setPage(Page<T> page) {
this.page = page;
return page;
}
@JsonIgnore
@XmlTransient
public Map<String, String> getSqlMap() {
if (sqlMap == null) {
2017-12-19 14:55:52 +08:00
sqlMap = Maps.newHashMap();
}
return sqlMap;
}
public void setSqlMap(Map<String, String> sqlMap) {
this.sqlMap = sqlMap;
}
2017-12-19 14:55:52 +08:00
/**
* 获取数据库名称
*/
@JsonIgnore
public String getDbName() {
2017-12-19 14:55:52 +08:00
return Configurations.getStringProperty("jdbc.type", "mysql");
}
2017-12-19 14:55:52 +08:00
@Override
public boolean equals(Object obj) {
if (null == obj) {
return false;
}
if (this == obj) {
return true;
}
if (!getClass().equals(obj.getClass())) {
return false;
}
LogEntity<?> that = (LogEntity<?>) obj;
return null == this.getId() ? false : this.getId().equals(that.getId());
}
/**
* @return searchFoundStartTime
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchFoundStartTime() {
return searchFoundStartTime;
}
/**
* @param searchFoundStartTime
* 要设置的 searchFoundStartTime
*/
2017-12-19 14:55:52 +08:00
public void setSearchFoundStartTime(String searchFoundStartTime) {
this.searchFoundStartTime = searchFoundStartTime;
}
/**
* @return searchFoundEndTime
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchFoundEndTime() {
return searchFoundEndTime;
}
/**
* @param searchFoundEndTime
* 要设置的 searchFoundEndTime
*/
2017-12-19 14:55:52 +08:00
public void setSearchFoundEndTime(String searchFoundEndTime) {
this.searchFoundEndTime = searchFoundEndTime;
}
/**
* @return searchCfgId
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchCfgId() {
return searchCfgId;
}
/**
* @param searchCfgId
* 要设置的 searchCfgId
*/
2017-12-19 14:55:52 +08:00
public void setSearchCfgId(String searchCfgId) {
this.searchCfgId = searchCfgId;
}
/**
* @return searchProtocol
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchProtocol() {
return searchProtocol;
}
/**
* @param searchProtocol
* 要设置的 searchProtocol
*/
2017-12-19 14:55:52 +08:00
public void setSearchProtocol(String searchProtocol) {
this.searchProtocol = searchProtocol;
}
/**
* @return searchServerIp
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchServerIp() {
return searchServerIp;
}
/**
* @param searchServerIp
* 要设置的 searchServerIp
*/
2017-12-19 14:55:52 +08:00
public void setSearchServerIp(String searchServerIp) {
this.searchServerIp = searchServerIp;
}
/**
* @return searchClientIp
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchClientIp() {
return searchClientIp;
}
/**
* @param searchClientIp
* 要设置的 searchClientIp
*/
2017-12-19 14:55:52 +08:00
public void setSearchClientIp(String searchClientIp) {
this.searchClientIp = searchClientIp;
}
/**
* @return searchEntranceId
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchEntranceId() {
return searchEntranceId;
}
/**
* @param searchEntranceId
* 要设置的 searchEntranceId
*/
2017-12-19 14:55:52 +08:00
public void setSearchEntranceId(String searchEntranceId) {
this.searchEntranceId = searchEntranceId;
}
/**
* @return searchCljIp
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchCljIp() {
return searchCljIp;
}
/**
* @param searchCljIp
* 要设置的 searchCljIp
*/
2017-12-19 14:55:52 +08:00
public void setSearchCljIp(String searchCljIp) {
this.searchCljIp = searchCljIp;
}
/**
* @return searchServiceType
*/
2017-12-19 14:55:52 +08:00
@JsonIgnore
public String getSearchServiceType() {
return searchServiceType;
}
/**
* @param searchServiceType
* 要设置的 searchServiceType
*/
2017-12-19 14:55:52 +08:00
public void setSearchServiceType(String searchServiceType) {
this.searchServiceType = searchServiceType;
}
public Integer getAddrType() {
return addrType;
}
public void setAddrType(Integer addrType) {
this.addrType = addrType;
}
public Integer getDeviceId() {
return deviceId;
}
public void setDeviceId(Integer deviceId) {
this.deviceId = deviceId;
}
public Integer getDirection() {
return direction;
}
public void setDirection(Integer direction) {
this.direction = direction;
}
@JsonIgnore
public Integer getSearchDirection() {
return searchDirection;
}
public void setSearchDirection(Integer searchDirection) {
this.searchDirection = searchDirection;
}
public String getUserRegion() {
return userRegion;
}
public void setUserRegion(String userRegion) {
this.userRegion = userRegion;
}
@Override
public String toString() {
return ReflectionToStringBuilder.toString(this);
}
2017-12-19 14:55:52 +08:00
}