/* * 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.Id; import javax.persistence.GenerationType; import javax.persistence.GeneratedValue; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; @Entity @Table(name = "ipm_host_nics") public class HostNic { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; @ManyToOne @JoinColumn(name = "host_id", nullable = false) private HostEntry host; @Column(length = 20, nullable = false) private String mac; @Column(length = 100) private String name; @Column(name = "first_seen", nullable = false) private Date firstSeen; @Column(name = "last_seen", nullable = false) private Date lastSeen; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getMac() { return mac; } public void setMac(String mac) { this.mac = mac; } public String getName() { return name; } public void setName(String name) { this.name = name; } public HostEntry getHost() { return host; } public void setHost(HostEntry host) { this.host = host; } 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; } }