diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayItem.java b/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayItem.java index 87a4cd5..b9cd6e8 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayItem.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayItem.java @@ -12,15 +12,23 @@ import java.util.Date; public class MetaSensorDisplayItem { private long id; - private String name; + private String key; + private String displayName; + private String description; private MetaCrawler crawler; private MetaSensorItemUnit unit; private Date createDate; + private boolean isDefault; private MetaSensorItemType itemType; - private String key; + + public MetaSensorDisplayItem() { + + } + public MetaSensorDisplayItem(long id) { + this.id = id; + } @Id - @GeneratedValue(strategy= GenerationType.IDENTITY) public long getId() { return id; } @@ -29,15 +37,34 @@ public class MetaSensorDisplayItem { this.id = id; } - @Column(name = "NAME", nullable = false, length = 50) - public String getName() { - return name; + @Column(name = "KEY", nullable = false) + public String getKey() { + return key; } - public void setName(String name) { - this.name = name; + public void setKey(String key) { + this.key = key; } + @Column(name = "DISPLAY_NAME", nullable = false) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + @Column(name = "DESCRIPTION", nullable = false) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @ManyToOne @JoinColumn(name = "CRAWLER_ID", nullable = false) public MetaCrawler getCrawler() { @@ -69,6 +96,16 @@ public class MetaSensorDisplayItem { } + @Basic + @Column(name="IS_DEFAULT", nullable = false, columnDefinition = "boolean default false") + public boolean getDefault() { + return isDefault; + } + + public void setDefault(boolean aDefault) { + isDefault = aDefault; + } + @ManyToOne @JoinColumn(name = "TYPE_ID", nullable = false) public MetaSensorItemType getItemType() { @@ -79,12 +116,4 @@ public class MetaSensorDisplayItem { this.itemType = itemType; } - @Column(name = "KEY", nullable = false, length = 50) - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } } diff --git a/src/main/java/com/loafle/overflow/model/probe/Probe.java b/src/main/java/com/loafle/overflow/model/probe/Probe.java index d8265e0..bfdaaf3 100644 --- a/src/main/java/com/loafle/overflow/model/probe/Probe.java +++ b/src/main/java/com/loafle/overflow/model/probe/Probe.java @@ -21,13 +21,11 @@ public class Probe { private Domain domain; private String probeKey; private String encryptionKey; - private int targetCount; - private int sensorCount; private String displayName; private String cidr; private Date authorizeDate; private Member authorizeMember; -// private InfraHost host; + public Probe() { @@ -107,24 +105,6 @@ public class Probe { this.encryptionKey = encryptionKey; } - @Column(name = "TARGET_COUNT", nullable = false) - public int getTargetCount() { - return targetCount; - } - - public void setTargetCount(int targetCount) { - this.targetCount = targetCount; - } - - @Column(name = "SENSOR_COUNT", nullable = false) - public int getSensorCount() { - return sensorCount; - } - - public void setSensorCount(int sensorCount) { - this.sensorCount = sensorCount; - } - @Column(name = "DISPLAY_NAME") public String getDisplayName() { return displayName; @@ -162,14 +142,5 @@ public class Probe { public void setAuthorizeMember(Member authorizeMember) { this.authorizeMember = authorizeMember; } -// -// @ManyToOne -// @JoinColumn(name = "HOST_ID", nullable = false) -// public InfraHost getHost() { -// return host; -// } -// -// public void setHost(InfraHost host) { -// this.host = host; -// } + }