From f5a095c4e71241069446efe7c99df0999580e7fc Mon Sep 17 00:00:00 2001 From: insanity Date: Wed, 27 Jun 2018 19:22:11 +0900 Subject: [PATCH] sensor model changed --- .../model/meta/MetaCollectionItemMapping.java | 12 +- .../model/meta/MetaSensorItemKey.java | 116 ------------------ .../loafle/overflow/model/sensor/Sensor.java | 1 - .../overflow/model/sensor/SensorItem.java | 1 - .../meta/MetaDisplayItemMappingService.java | 6 - .../central/meta/MetaDisplayItemService.java | 2 - .../meta/MetaSensorItemKeyService.java | 19 --- 7 files changed, 6 insertions(+), 151 deletions(-) delete mode 100644 src/main/java/com/loafle/overflow/model/meta/MetaSensorItemKey.java delete mode 100644 src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemKeyService.java diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItemMapping.java b/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItemMapping.java index b1cd9a3..85fd405 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItemMapping.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItemMapping.java @@ -10,8 +10,8 @@ public class MetaCollectionItemMapping { private Short id; @ManyToOne - @JoinColumn(name = "META_CRAWLER_MAPPING_ID", nullable = false) - private MetaCrawlerMapping metaCrawlerMapping; + @JoinColumn(name = "META_DISPLAY_ITEM_MAPPING_ID", nullable = false) + private MetaDisplayItemMapping metaDisplayItemMapping; @ManyToOne @JoinColumn(name = "META_COLLECTION_ITEM_ID", nullable = false) @@ -29,12 +29,12 @@ public class MetaCollectionItemMapping { this.id = id; } - public MetaCrawlerMapping getMetaCrawlerMapping() { - return metaCrawlerMapping; + public MetaDisplayItemMapping getMetaDisplayItemMapping() { + return metaDisplayItemMapping; } - public void setMetaCrawlerMapping(MetaCrawlerMapping metaCrawlerMapping) { - this.metaCrawlerMapping = metaCrawlerMapping; + public void setMetaDisplayItemMapping(MetaDisplayItemMapping metaDisplayItemMapping) { + this.metaDisplayItemMapping = metaDisplayItemMapping; } public MetaCollectionItem getMetaCollectionItem() { diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemKey.java b/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemKey.java deleted file mode 100644 index 06ced4f..0000000 --- a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemKey.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.loafle.overflow.model.meta; - -import javax.persistence.*; -import java.util.Date; - -/** - * Created by snoop on 17. 8. 29. - */ -@Entity -@Table(name = "META_SENSOR_ITEM_KEY", schema = "public") -public class MetaSensorItemKey { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - @Column(name = "KEY", nullable = false, length = 100) - private String key; - - @Column(name = "NAME", nullable = true, length = 100) - private String name; - - @Column(name = "FROMS", nullable = false, length = 100) - private String froms; - - @Column(name = "OPTION_JSON", nullable = true) - private String option; - - @ManyToOne - @JoinColumn(name = "META_SENSOR_ITEM_ID", nullable = false) - private MetaCollectionItem metaCollectionItem; - - @ManyToOne - @JoinColumn(name = "META_CRAWLER_ID", nullable = false) - private MetaCrawler metaCrawler; - - @ManyToOne - @JoinColumn(name = "META_SENSOR_ITEM_UNIT_ID", nullable = true) - private MetaItemUnit metaItemUnit; - - @Temporal(TemporalType.TIMESTAMP) - @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) - private Date createDate; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public MetaCollectionItem getMetaCollectionItem() { - return metaCollectionItem; - } - - public void setMetaCollectionItem(MetaCollectionItem metaCollectionItem) { - this.metaCollectionItem = metaCollectionItem; - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getFroms() { - return froms; - } - - public void setFroms(String froms) { - this.froms = froms; - } - - public String getOption() { - return option; - } - - public void setOption(String option) { - this.option = option; - } - - public MetaCrawler getMetaCrawler() { - return metaCrawler; - } - - public void setMetaCrawler(MetaCrawler metaCrawler) { - this.metaCrawler = metaCrawler; - } - - public Date getCreateDate() { - return createDate; - } - - public void setCreateDate(Date createDate) { - this.createDate = createDate; - } - - public MetaItemUnit getMetaItemUnit() { - return metaItemUnit; - } - - public void setMetaItemUnit(MetaItemUnit metaItemUnit) { - this.metaItemUnit = metaItemUnit; - } -} diff --git a/src/main/java/com/loafle/overflow/model/sensor/Sensor.java b/src/main/java/com/loafle/overflow/model/sensor/Sensor.java index 85eea2f..1f17221 100644 --- a/src/main/java/com/loafle/overflow/model/sensor/Sensor.java +++ b/src/main/java/com/loafle/overflow/model/sensor/Sensor.java @@ -1,6 +1,5 @@ package com.loafle.overflow.model.sensor; -import com.loafle.overflow.model.meta.MetaCrawler; import com.loafle.overflow.model.meta.MetaCrawlerMapping; import com.loafle.overflow.model.meta.MetaDisplayItem; import com.loafle.overflow.model.meta.MetaSensorStatus; diff --git a/src/main/java/com/loafle/overflow/model/sensor/SensorItem.java b/src/main/java/com/loafle/overflow/model/sensor/SensorItem.java index 72c9d87..6d03eb3 100644 --- a/src/main/java/com/loafle/overflow/model/sensor/SensorItem.java +++ b/src/main/java/com/loafle/overflow/model/sensor/SensorItem.java @@ -1,6 +1,5 @@ package com.loafle.overflow.model.sensor; -import com.loafle.overflow.model.meta.MetaDisplayItem; import com.loafle.overflow.model.meta.MetaDisplayItemMapping; import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDeleteAction; diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemMappingService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemMappingService.java index b1ca30e..10543e8 100644 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemMappingService.java +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemMappingService.java @@ -3,9 +3,6 @@ package com.loafle.overflow.service.central.meta; import com.loafle.overflow.core.annotation.WebappAPI; import com.loafle.overflow.core.exception.OverflowException; import com.loafle.overflow.model.meta.MetaDisplayItemMapping; -import com.loafle.overflow.model.meta.MetaSensorItemKey; - -import java.util.List; /** * Created by snoop on 18. 4. 24. @@ -13,7 +10,4 @@ import java.util.List; public interface MetaDisplayItemMappingService { @WebappAPI MetaDisplayItemMapping regist(MetaDisplayItemMapping metaDisplayItemMapping) throws OverflowException; - - @WebappAPI - List readAllMetaSensorItemKeyByDisplayItemID(Long metaSensorDisplayItemID) throws OverflowException; } diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemService.java index 2e88fcf..081a5ba 100644 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemService.java +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemService.java @@ -4,8 +4,6 @@ import com.loafle.overflow.core.annotation.WebappAPI; import com.loafle.overflow.core.exception.OverflowException; import com.loafle.overflow.model.meta.MetaDisplayItem; -import java.util.List; - /** * Created by insanity on 17. 9. 20. */ diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemKeyService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemKeyService.java deleted file mode 100644 index 8263e85..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemKeyService.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.loafle.overflow.service.central.meta; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaSensorItemKey; - -import java.util.List; -import java.util.Map; - -/** - * Created by snoop on 17. 8. 29. - */ -public interface MetaSensorItemKeyService { - @WebappAPI - List readAllByMetaCrawlerID(Short metaCrawlerID) throws OverflowException; - - @WebappAPI - Map readAllMapByMetaCrawlerID(Short metaCrawlerID) throws OverflowException; -}