This commit is contained in:
geek 2018-04-26 16:31:58 +09:00
parent 1d38963e91
commit 4357f7ea04
4 changed files with 26 additions and 33 deletions

View File

@ -1,18 +0,0 @@
package com.loafle.overflow.model.discovery.type;
/**
* Created by snoop on 17. 6. 27.
*/
public enum PortType {
TCP("TCP"),
UDP("UDP"),
TLS("TLS");
private String stringValue;
PortType(String string) {stringValue = string;}
@Override
public String toString() {
return stringValue;
}
}

View File

@ -12,9 +12,10 @@ import java.util.Date;
public class InfraHost extends Infra { public class InfraHost extends Infra {
// private long id; // private long id;
private InfraOS os; private InfraOS os;
private long ip; private String ipV4;
private long mac; private String ipV6;
private Date createDate; private String mac;
private Date createDate;
// @Id // @Id
// @GeneratedValue(strategy= GenerationType.IDENTITY) // @GeneratedValue(strategy= GenerationType.IDENTITY)
@ -38,21 +39,31 @@ public class InfraHost extends Infra {
@Basic @Basic
@Column(name = "IP", nullable = true) @Column(name = "IP", nullable = true)
public long getIp() { public String getIpV4() {
return ip; return ipV4;
} }
public void setIp(long ip) { public void setIpV4(String ipV4) {
this.ip = ip; this.ipV4 = ipV4;
}
@Basic
@Column(name = "IP", nullable = true)
public String getIpV6() {
return ipV6;
}
public void setIpV6(String ipV4) {
this.ipV6 = ipV4;
} }
@Basic @Basic
@Column(name = "MAC", nullable = true) @Column(name = "MAC", nullable = true)
public long getMac() { public String getMac() {
return mac; return mac;
} }
public void setMac(long mac) { public void setMac(String mac) {
this.mac = mac; this.mac = mac;
} }

View File

@ -6,17 +6,17 @@ import com.loafle.overflow.core.type.PortType;
* Connection * Connection
*/ */
public class Connection { public class Connection {
private String ip; private String ipV4;
private int port; private int port;
private PortType portType; private PortType portType;
private boolean ssl; private boolean ssl;
public String getIp() { public String getIpV4() {
return ip; return ipV4;
} }
public void setIp(String ip) { public void getIpV4(String ipV4) {
this.ip = ip; this.ipV4 = ipV4;
} }
public int getPort() { public int getPort() {

View File

@ -10,5 +10,5 @@ import com.loafle.overflow.model.infra.InfraHost;
public interface InfraHostService { public interface InfraHostService {
InfraHost regist(InfraHost infraHost) throws OverflowException; InfraHost regist(InfraHost infraHost) throws OverflowException;
InfraHost read(long id) throws OverflowException; InfraHost read(long id) throws OverflowException;
InfraHost readByIp(long ip) throws OverflowException; InfraHost readByIp(String ip) throws OverflowException;
} }