This commit is contained in:
crusader 2018-06-11 18:26:07 +09:00
parent e79ba4b3ff
commit 50e55c0ab5
6 changed files with 65 additions and 62 deletions

View File

@ -13,7 +13,7 @@
<groupId>com.loafle.overflow</groupId> <groupId>com.loafle.overflow</groupId>
<artifactId>commons-java</artifactId> <artifactId>commons-java</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.0.27-SNAPSHOT</version> <version>1.0.28-SNAPSHOT</version>
<name>com.loafle.overflow.commons-java</name> <name>com.loafle.overflow.commons-java</name>
<properties> <properties>

View File

@ -3,14 +3,12 @@ package com.loafle.overflow.model.discovery;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.loafle.overflow.model.meta.MetaIPType;
/** /**
* Created by root on 17. 6. 4. * Created by root on 17. 6. 4.
*/ */
public class Host { public class Host {
private MetaIPType metaIPType; private String metaIPTypeKey;
private String address; private String address;
private String mac; private String mac;
@ -20,7 +18,6 @@ public class Host {
private List<Port> portList; private List<Port> portList;
public String getMac() { public String getMac() {
return mac; return mac;
} }
@ -53,20 +50,6 @@ public class Host {
this.portList = portList; this.portList = portList;
} }
/**
* @return the metaIPType
*/
public MetaIPType getMetaIPType() {
return metaIPType;
}
/**
* @param metaIPType the metaIPType to set
*/
public void setMetaIPType(MetaIPType metaIPType) {
this.metaIPType = metaIPType;
}
/** /**
* @return the address * @return the address
*/ */
@ -80,4 +63,18 @@ public class Host {
public void setAddress(String address) { public void setAddress(String address) {
this.address = address; this.address = address;
} }
/**
* @return the metaIPTypeKey
*/
public String getMetaIPTypeKey() {
return metaIPTypeKey;
}
/**
* @param metaIPTypeKey the metaIPTypeKey to set
*/
public void setMetaIPTypeKey(String metaIPTypeKey) {
this.metaIPTypeKey = metaIPTypeKey;
}
} }

View File

@ -1,7 +1,5 @@
package com.loafle.overflow.model.discovery; package com.loafle.overflow.model.discovery;
import com.loafle.overflow.model.meta.MetaPortType;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -10,7 +8,7 @@ import java.util.List;
*/ */
public class Port { public class Port {
private MetaPortType metaPortType; private String metaPortTypeKey;
private Integer portNumber; private Integer portNumber;
@ -53,16 +51,17 @@ public class Port {
} }
/** /**
* @return the metaPortType * @return the metaPortTypeKey
*/ */
public MetaPortType getMetaPortType() { public String getMetaPortTypeKey() {
return metaPortType; return metaPortTypeKey;
} }
/** /**
* @param metaPortType the metaPortType to set * @param metaPortTypeKey the metaPortTypeKey to set
*/ */
public void setMetaPortType(MetaPortType metaPortType) { public void setMetaPortTypeKey(String metaPortTypeKey) {
this.metaPortType = metaPortType; this.metaPortTypeKey = metaPortTypeKey;
} }
} }

View File

@ -2,14 +2,12 @@ package com.loafle.overflow.model.discovery;
import java.util.Date; import java.util.Date;
import com.loafle.overflow.model.meta.MetaCryptoType;
/** /**
* Created by root on 17. 6. 4. * Created by root on 17. 6. 4.
*/ */
public class Service { public class Service {
private MetaCryptoType metaCryptoType; private String metaCryptoTypeKey;
private String name; private String name;
@ -33,20 +31,6 @@ public class Service {
this.port = port; this.port = port;
} }
/**
* @return the metaCryptoType
*/
public MetaCryptoType getMetaCryptoType() {
return metaCryptoType;
}
/**
* @param metaCryptoType the metaCryptoType to set
*/
public void setMetaCryptoType(MetaCryptoType metaCryptoType) {
this.metaCryptoType = metaCryptoType;
}
/** /**
* @return the name * @return the name
*/ */
@ -61,4 +45,18 @@ public class Service {
this.name = name; this.name = name;
} }
/**
* @return the metaCryptoTypeKey
*/
public String getMetaCryptoTypeKey() {
return metaCryptoTypeKey;
}
/**
* @param metaCryptoTypeKey the metaCryptoTypeKey to set
*/
public void setMetaCryptoTypeKey(String metaCryptoTypeKey) {
this.metaCryptoTypeKey = metaCryptoTypeKey;
}
} }

View File

@ -2,15 +2,13 @@ package com.loafle.overflow.model.discovery;
import java.util.Date; import java.util.Date;
import com.loafle.overflow.model.meta.MetaIPType;
/** /**
* Created by snoop on 17. 10. 31. * Created by snoop on 17. 10. 31.
*/ */
public class Zone { public class Zone {
private String network; private String network;
private String iface; private String iface;
private MetaIPType metaIPType; private String metaIPTypeKey;
private String address; private String address;
private String mac; private String mac;
@ -48,20 +46,6 @@ public class Zone {
this.discoveredDate = discoveredDate; this.discoveredDate = discoveredDate;
} }
/**
* @return the metaIPType
*/
public MetaIPType getMetaIPType() {
return metaIPType;
}
/**
* @param metaIPType the metaIPType to set
*/
public void setMetaIPType(MetaIPType metaIPType) {
this.metaIPType = metaIPType;
}
/** /**
* @return the address * @return the address
*/ */
@ -75,4 +59,18 @@ public class Zone {
public void setAddress(String address) { public void setAddress(String address) {
this.address = address; this.address = address;
} }
/**
* @return the metaIPTypeKey
*/
public String getMetaIPTypeKey() {
return metaIPTypeKey;
}
/**
* @param metaIPTypeKey the metaIPTypeKey to set
*/
public void setMetaIPTypeKey(String metaIPTypeKey) {
this.metaIPTypeKey = metaIPTypeKey;
}
} }

View File

@ -13,6 +13,7 @@ import com.loafle.overflow.model.meta.MetaTargetHostType;
@Table(name = "INFRA_HOST", schema = "public") @Table(name = "INFRA_HOST", schema = "public")
@DiscriminatorValue("2") @DiscriminatorValue("2")
public class InfraHost extends Infra { public class InfraHost extends Infra {
private InfraZone infraZone;
private MetaTargetHostType metaTargetHostType; private MetaTargetHostType metaTargetHostType;
private InfraHostMachine infraHostMachine; private InfraHostMachine infraHostMachine;
@ -22,6 +23,16 @@ public class InfraHost extends Infra {
private List<InfraHostApplication> infraHostApplications; private List<InfraHostApplication> infraHostApplications;
private List<InfraHostDaemon> infraHostDaemons; private List<InfraHostDaemon> infraHostDaemons;
@ManyToOne
@JoinColumn(name = "INFRA_ZONE_ID", nullable = true)
public InfraZone getInfraZone() {
return infraZone;
}
public void setInfraZone(InfraZone infraZone) {
this.infraZone = infraZone;
}
@ManyToOne @ManyToOne
@JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = false) @JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = false)
public MetaTargetHostType getMetaTargetHostType() { public MetaTargetHostType getMetaTargetHostType() {