/* * Copyright 2010 NCHOVY * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.krakenapps.sonar.metabase.model; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "sonar_alerts") public class Alert { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; private Date date; @Column(name = "src_ip", length = 20) private String sourceIp; @Column(name = "src_port") private Integer sourcePort; @Column(name = "dst_ip", length = 20) private String targetIp; @Column(name = "dst_port") private Integer targetPort; @Column(name = "protocol", length = 10) private String protocol; @Column(name = "severity") private Integer severity; @Column(name = "exploitable") private Integer exploitable; @Column(name = "rule_id", length = 20) private String ruleId; @Column(name = "rule_name", length = 200) private String ruleName; @Column(name = "cve", length = 60) private String cve; @Column(name = "detail", length = 2000) private String detail; public int getId() { return id; } public void setId(int id) { this.id = id; } public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public String getSourceIp() { return sourceIp; } public void setSourceIp(String sourceIp) { this.sourceIp = sourceIp; } public Integer getSourcePort() { return sourcePort; } public void setSourcePort(Integer sourcePort) { this.sourcePort = sourcePort; } public String getTargetIp() { return targetIp; } public void setTargetIp(String targetIp) { this.targetIp = targetIp; } public Integer getTargetPort() { return targetPort; } public void setTargetPort(Integer targetPort) { this.targetPort = targetPort; } public String getProtocol() { return protocol; } public void setProtocol(String protocol) { this.protocol = protocol; } public Integer getSeverity() { return severity; } public void setSeverity(Integer severity) { this.severity = severity; } public Integer getExploitable() { return exploitable; } public void setExploitable(Integer exploitable) { this.exploitable = exploitable; } public String getRuleId() { return ruleId; } public void setRuleId(String ruleId) { this.ruleId = ruleId; } public String getRuleName() { return ruleName; } public void setRuleName(String ruleName) { this.ruleName = ruleName; } public String getCve() { return cve; } public void setCve(String cve) { this.cve = cve; } public String getDetail() { return detail; } public void setDetail(String detail) { this.detail = detail; } }