/* * Copyright 2011 Future Systems * * 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.ipmanager.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.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity @Table(name = "ipm_detected_macs") public class DetectedMac { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; @ManyToOne @JoinColumn(name = "agent_id", nullable = false) private Agent agent; @ManyToOne @JoinColumn(name = "ip_id", nullable = false) private IpEntry ip; @Column(length = 20, nullable = false) private String mac; @Column(name = "first_seen", nullable = false) private Date firstSeen; @Column(name = "last_seen", nullable = false) private Date lastSeen; @Column(length = 250) private String description; public int getId() { return id; } public void setId(int id) { this.id = id; } public Agent getAgent() { return agent; } public void setAgent(Agent agent) { this.agent = agent; } public IpEntry getIp() { return ip; } public void setIp(IpEntry ip) { this.ip = ip; } public String getMac() { return mac; } public void setMac(String mac) { this.mac = mac; } public Date getFirstSeen() { return firstSeen; } public void setFirstSeen(Date firstSeen) { this.firstSeen = firstSeen; } public Date getLastSeen() { return lastSeen; } public void setLastSeen(Date lastSeen) { this.lastSeen = lastSeen; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } }