From 50e55c0ab52a70d1770581d81b476a20174f5770 Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 11 Jun 2018 18:26:07 +0900 Subject: [PATCH] ing --- pom.xml | 2 +- .../loafle/overflow/model/discovery/Host.java | 33 +++++++++---------- .../loafle/overflow/model/discovery/Port.java | 17 +++++----- .../overflow/model/discovery/Service.java | 32 +++++++++--------- .../loafle/overflow/model/discovery/Zone.java | 32 +++++++++--------- .../overflow/model/infra/InfraHost.java | 11 +++++++ 6 files changed, 65 insertions(+), 62 deletions(-) diff --git a/pom.xml b/pom.xml index e6c50f6..534ba7d 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ com.loafle.overflow commons-java jar - 1.0.27-SNAPSHOT + 1.0.28-SNAPSHOT com.loafle.overflow.commons-java diff --git a/src/main/java/com/loafle/overflow/model/discovery/Host.java b/src/main/java/com/loafle/overflow/model/discovery/Host.java index b08161b..06ee1fd 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/Host.java +++ b/src/main/java/com/loafle/overflow/model/discovery/Host.java @@ -3,14 +3,12 @@ package com.loafle.overflow.model.discovery; import java.util.Date; import java.util.List; -import com.loafle.overflow.model.meta.MetaIPType; - /** * Created by root on 17. 6. 4. */ public class Host { - private MetaIPType metaIPType; + private String metaIPTypeKey; private String address; private String mac; @@ -20,7 +18,6 @@ public class Host { private List portList; - public String getMac() { return mac; } @@ -53,20 +50,6 @@ public class Host { 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 */ @@ -80,4 +63,18 @@ public class Host { public void setAddress(String 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; + } } diff --git a/src/main/java/com/loafle/overflow/model/discovery/Port.java b/src/main/java/com/loafle/overflow/model/discovery/Port.java index 985328a..0896926 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/Port.java +++ b/src/main/java/com/loafle/overflow/model/discovery/Port.java @@ -1,7 +1,5 @@ package com.loafle.overflow.model.discovery; -import com.loafle.overflow.model.meta.MetaPortType; - import java.util.Date; import java.util.List; @@ -10,7 +8,7 @@ import java.util.List; */ public class Port { - private MetaPortType metaPortType; + private String metaPortTypeKey; private Integer portNumber; @@ -53,16 +51,17 @@ public class Port { } /** - * @return the metaPortType + * @return the metaPortTypeKey */ - public MetaPortType getMetaPortType() { - return metaPortType; + public String getMetaPortTypeKey() { + return metaPortTypeKey; } /** - * @param metaPortType the metaPortType to set + * @param metaPortTypeKey the metaPortTypeKey to set */ - public void setMetaPortType(MetaPortType metaPortType) { - this.metaPortType = metaPortType; + public void setMetaPortTypeKey(String metaPortTypeKey) { + this.metaPortTypeKey = metaPortTypeKey; } + } diff --git a/src/main/java/com/loafle/overflow/model/discovery/Service.java b/src/main/java/com/loafle/overflow/model/discovery/Service.java index 784978d..d42c5a3 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/Service.java +++ b/src/main/java/com/loafle/overflow/model/discovery/Service.java @@ -2,14 +2,12 @@ package com.loafle.overflow.model.discovery; import java.util.Date; -import com.loafle.overflow.model.meta.MetaCryptoType; - /** * Created by root on 17. 6. 4. */ public class Service { - private MetaCryptoType metaCryptoType; + private String metaCryptoTypeKey; private String name; @@ -33,20 +31,6 @@ public class Service { 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 */ @@ -61,4 +45,18 @@ public class Service { 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; + } + } diff --git a/src/main/java/com/loafle/overflow/model/discovery/Zone.java b/src/main/java/com/loafle/overflow/model/discovery/Zone.java index 36e3a3e..b59d352 100644 --- a/src/main/java/com/loafle/overflow/model/discovery/Zone.java +++ b/src/main/java/com/loafle/overflow/model/discovery/Zone.java @@ -2,15 +2,13 @@ package com.loafle.overflow.model.discovery; import java.util.Date; -import com.loafle.overflow.model.meta.MetaIPType; - /** * Created by snoop on 17. 10. 31. */ public class Zone { private String network; private String iface; - private MetaIPType metaIPType; + private String metaIPTypeKey; private String address; private String mac; @@ -48,20 +46,6 @@ public class Zone { 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 */ @@ -75,4 +59,18 @@ public class Zone { public void setAddress(String 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; + } } \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/model/infra/InfraHost.java b/src/main/java/com/loafle/overflow/model/infra/InfraHost.java index 17c016f..9d523f7 100644 --- a/src/main/java/com/loafle/overflow/model/infra/InfraHost.java +++ b/src/main/java/com/loafle/overflow/model/infra/InfraHost.java @@ -13,6 +13,7 @@ import com.loafle.overflow.model.meta.MetaTargetHostType; @Table(name = "INFRA_HOST", schema = "public") @DiscriminatorValue("2") public class InfraHost extends Infra { + private InfraZone infraZone; private MetaTargetHostType metaTargetHostType; private InfraHostMachine infraHostMachine; @@ -22,6 +23,16 @@ public class InfraHost extends Infra { private List infraHostApplications; private List infraHostDaemons; + @ManyToOne + @JoinColumn(name = "INFRA_ZONE_ID", nullable = true) + public InfraZone getInfraZone() { + return infraZone; + } + + public void setInfraZone(InfraZone infraZone) { + this.infraZone = infraZone; + } + @ManyToOne @JoinColumn(name = "META_TARGET_HOST_TYPE_ID", nullable = false) public MetaTargetHostType getMetaTargetHostType() {