diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItem.java b/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItem.java new file mode 100644 index 0000000..7deee96 --- /dev/null +++ b/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItem.java @@ -0,0 +1,80 @@ +package com.loafle.overflow.model.meta; + +import javax.persistence.*; +import java.util.Date; + +/** + * Created by root on 17. 6. 22. + */ +@Entity +@Table(name = "META_COLLECTION_ITEM", schema = "public") +public class MetaCollectionItem { + + @Id + private Integer id; + + @Column(name = "KEY", nullable = true, length = 100) + private String key; + + @Column(name = "ITEM", nullable = true, length = 100) + private String item; + + @Column(name = "ITEM", nullable = true, length = 100) + private String itemClass; + + @ManyToOne + @JoinColumn(name = "META_ITEM_UNIT_ID", nullable = false) + 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 Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getItem() { + return item; + } + + public void setItem(String item) { + this.item = item; + } + + public String getItemClass() { + return itemClass; + } + + public void setItemClass(String itemClass) { + this.itemClass = itemClass; + } + + public MetaItemUnit getMetaItemUnit() { + return metaItemUnit; + } + + public void setMetaItemUnit(MetaItemUnit metaItemUnit) { + this.metaItemUnit = metaItemUnit; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } +} diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItemMapping.java b/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItemMapping.java new file mode 100644 index 0000000..b1cd9a3 --- /dev/null +++ b/src/main/java/com/loafle/overflow/model/meta/MetaCollectionItemMapping.java @@ -0,0 +1,55 @@ +package com.loafle.overflow.model.meta; + +import javax.persistence.*; +import java.util.Date; + +@Entity +@Table(name = "META_COLLECTION_ITEM_MAPPING", schema = "public") +public class MetaCollectionItemMapping { + @Id + private Short id; + + @ManyToOne + @JoinColumn(name = "META_CRAWLER_MAPPING_ID", nullable = false) + private MetaCrawlerMapping metaCrawlerMapping; + + @ManyToOne + @JoinColumn(name = "META_COLLECTION_ITEM_ID", nullable = false) + private MetaCollectionItem metaCollectionItem; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) + private Date createDate; + + public Short getId() { + return id; + } + + public void setId(Short id) { + this.id = id; + } + + public MetaCrawlerMapping getMetaCrawlerMapping() { + return metaCrawlerMapping; + } + + public void setMetaCrawlerMapping(MetaCrawlerMapping metaCrawlerMapping) { + this.metaCrawlerMapping = metaCrawlerMapping; + } + + public MetaCollectionItem getMetaCollectionItem() { + return metaCollectionItem; + } + + public void setMetaCollectionItem(MetaCollectionItem metaCollectionItem) { + this.metaCollectionItem = metaCollectionItem; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } +} diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaCrawler.java b/src/main/java/com/loafle/overflow/model/meta/MetaCrawler.java index fcb36de..0543cd7 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaCrawler.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaCrawler.java @@ -13,6 +13,10 @@ public class MetaCrawler { @Id private Short id; + @ManyToOne + @JoinColumn(name = "META_CRAWLER_CONTAINER_ID", nullable = false) + private MetaCrawlerContainer metaCrawlerContainer; + @Column(name = "KEY", nullable = true, length = 50) private String key; @@ -27,6 +31,7 @@ public class MetaCrawler { @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) private Date createDate; + public Short getId() { return id; } @@ -35,6 +40,14 @@ public class MetaCrawler { this.id = id; } + public MetaCrawlerContainer getMetaCrawlerContainer() { + return metaCrawlerContainer; + } + + public void setMetaCrawlerContainer(MetaCrawlerContainer metaCrawlerContainer) { + this.metaCrawlerContainer = metaCrawlerContainer; + } + public String getKey() { return key; } diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItem.java b/src/main/java/com/loafle/overflow/model/meta/MetaCrawlerContainer.java similarity index 70% rename from src/main/java/com/loafle/overflow/model/meta/MetaSensorItem.java rename to src/main/java/com/loafle/overflow/model/meta/MetaCrawlerContainer.java index 862f451..63052e1 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItem.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaCrawlerContainer.java @@ -3,31 +3,27 @@ package com.loafle.overflow.model.meta; import javax.persistence.*; import java.util.Date; -/** - * Created by root on 17. 6. 22. - */ @Entity -@Table(name = "META_SENSOR_ITEM", schema = "public") -public class MetaSensorItem { - +@Table(name = "META_CRAWLER_CONTAINER", schema = "public") +public class MetaCrawlerContainer { @Id - private Integer id; + private Short id; - @Column(name = "KEY", nullable = true, length = 100) + @Column(name = "KEY", nullable = true, length = 50) private String key; - @Column(name = "NAME", nullable = true, length = 100) + @Column(name = "NAME", nullable = true, length = 50) private String name; @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) private Date createDate; - public Integer getId() { + public Short getId() { return id; } - public void setId(Integer id) { + public void setId(Short id) { this.id = id; } diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaCrawlerMapping.java b/src/main/java/com/loafle/overflow/model/meta/MetaCrawlerMapping.java index 85ffe31..ef2aa4d 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaCrawlerMapping.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaCrawlerMapping.java @@ -23,6 +23,12 @@ public class MetaCrawlerMapping { @JoinColumn(name = "META_CRAWLER_ID", nullable = false) private MetaCrawler metaCrawler; + @Column(name = "DEFAULT_INTERVAL", nullable = false) + private Integer defaultInterval; + + @Column(name = "IS_DEFAULT", nullable = false, columnDefinition = "Boolean default false") + private Boolean isDefault; + @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) private Date createDate; @@ -51,6 +57,22 @@ public class MetaCrawlerMapping { this.metaCrawler = metaCrawler; } + public Integer getDefaultInterval() { + return defaultInterval; + } + + public void setDefaultInterval(Integer defaultInterval) { + this.defaultInterval = defaultInterval; + } + + public Boolean getDefault() { + return isDefault; + } + + public void setDefault(Boolean aDefault) { + isDefault = aDefault; + } + public Date getCreateDate() { return createDate; } diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaDisplayItem.java b/src/main/java/com/loafle/overflow/model/meta/MetaDisplayItem.java new file mode 100644 index 0000000..c6b3573 --- /dev/null +++ b/src/main/java/com/loafle/overflow/model/meta/MetaDisplayItem.java @@ -0,0 +1,67 @@ +package com.loafle.overflow.model.meta; + +import javax.persistence.*; +import java.util.Date; + +/** + * Created by insanity on 17. 9. 20. + */ +@Entity +@Table(name = "META_DISPLAY_ITEM", schema = "public") +public class MetaDisplayItem { + + @Id + private Long id; + + @Column(name = "KEY", nullable = false) + private String key; + + @Column(name = "NAME", nullable = false) + private String name; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) + private Date createDate; + + public MetaDisplayItem() { + + } + + public MetaDisplayItem(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + +} diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemType.java b/src/main/java/com/loafle/overflow/model/meta/MetaDisplayItemCategory.java similarity index 84% rename from src/main/java/com/loafle/overflow/model/meta/MetaSensorItemType.java rename to src/main/java/com/loafle/overflow/model/meta/MetaDisplayItemCategory.java index bde5ab0..b904a39 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemType.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaDisplayItemCategory.java @@ -7,8 +7,8 @@ import java.util.Date; * Created by root on 17. 6. 22. */ @Entity -@Table(name = "META_SENSOR_ITEM_TYPE", schema = "public") -public class MetaSensorItemType { +@Table(name = "META_DISPLAY_ITEM_CATEGORY", schema = "public") +public class MetaDisplayItemCategory { @Id private Short id; @@ -23,10 +23,10 @@ public class MetaSensorItemType { @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) private Date createDate; - public MetaSensorItemType() { + public MetaDisplayItemCategory() { } - public MetaSensorItemType(Short id) { + public MetaDisplayItemCategory(Short id) { this.id = id; } diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaDisplayItemMapping.java b/src/main/java/com/loafle/overflow/model/meta/MetaDisplayItemMapping.java new file mode 100644 index 0000000..f26978d --- /dev/null +++ b/src/main/java/com/loafle/overflow/model/meta/MetaDisplayItemMapping.java @@ -0,0 +1,100 @@ +package com.loafle.overflow.model.meta; + +import java.util.Date; + +import javax.persistence.*; + +/** + * Created by snoop on 18. 4. 24. + */ +@Entity +@Table(name = "META_DISPLAY_ITEM_MAPPING", schema = "public") +public class MetaDisplayItemMapping { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; + + @ManyToOne + @JoinColumn(name = "META_DISPLAY_ITEM_ID", nullable = false) + private MetaDisplayItem metaDisplayItem; + + @ManyToOne + @JoinColumn(name = "META_CRAWLER_MAPPING_ID", nullable = false) + private MetaCrawlerMapping metaCrawlerMapping; + + @ManyToOne + @JoinColumn(name = "META_ITEM_UNIT_ID", nullable = true) + private MetaItemUnit metaItemUnit; + + @ManyToOne + @JoinColumn(name = "META_DISPLAY_ITEM_CATEGORY_ID", nullable = true) + private MetaDisplayItemCategory metaDisplayItemCategory; + + @Column(name = "IS_DEFAULT", nullable = false, columnDefinition = "Boolean default false") + private Boolean isDefault; + + @Column(name = "FORMULA", nullable = false) + private String formula; + + @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 MetaDisplayItem getMetaDisplayItem() { + return metaDisplayItem; + } + + public void setMetaDisplayItem(MetaDisplayItem metaDisplayItem) { + this.metaDisplayItem = metaDisplayItem; + } + + public MetaCrawlerMapping getMetaCrawlerMapping() { + return metaCrawlerMapping; + } + + public void setMetaCrawlerMapping(MetaCrawlerMapping metaCrawlerMapping) { + this.metaCrawlerMapping = metaCrawlerMapping; + } + + public MetaItemUnit getMetaItemUnit() { + return metaItemUnit; + } + + public void setMetaItemUnit(MetaItemUnit metaItemUnit) { + this.metaItemUnit = metaItemUnit; + } + + public Boolean getDefault() { + return isDefault; + } + + public void setDefault(Boolean aDefault) { + isDefault = aDefault; + } + + public String getFormula() { + return formula; + } + + public void setFormula(String formula) { + this.formula = formula; + } + + public Date getCreateDate() { + return createDate; + } + + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } +} diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemUnit.java b/src/main/java/com/loafle/overflow/model/meta/MetaItemUnit.java similarity index 92% rename from src/main/java/com/loafle/overflow/model/meta/MetaSensorItemUnit.java rename to src/main/java/com/loafle/overflow/model/meta/MetaItemUnit.java index df01e93..1ec66b5 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemUnit.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaItemUnit.java @@ -7,8 +7,8 @@ import java.util.Date; * Created by insanity on 17. 9. 19. */ @Entity -@Table(name = "META_SENSOR_ITEM_UNIT", schema = "public") -public class MetaSensorItemUnit { +@Table(name = "META_ITEM_UNIT", schema = "public") +public class MetaItemUnit { @Id private Short id; diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayItem.java b/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayItem.java deleted file mode 100644 index bc0ca77..0000000 --- a/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayItem.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.loafle.overflow.model.meta; - -import javax.persistence.*; -import java.util.Date; - -/** - * Created by insanity on 17. 9. 20. - */ -@Entity -@Table(name = "META_SENSOR_DISPLAY_ITEM", schema = "public") -public class MetaSensorDisplayItem { - - @Id - private Long id; - - @Column(name = "KEY", nullable = false) - private String key; - - @Column(name = "NAME", nullable = false) - private String name; - - @Basic - @Column(name = "IS_DEFAULT", nullable = false, columnDefinition = "Boolean default false") - private Boolean isDefault; - - @ManyToOne - @JoinColumn(name = "META_CRAWLER_ID", nullable = false) - private MetaCrawler metaCrawler; - - @ManyToOne - @JoinColumn(name = "META_SENSOR_ITEM_UNIT_ID", nullable = true) - private MetaSensorItemUnit metaSensorItemUnit; - - @ManyToOne - @JoinColumn(name = "META_SENSOR_ITEM_TYPE_ID", nullable = false) - private MetaSensorItemType metaSensorItemType; - - @Temporal(TemporalType.TIMESTAMP) - @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) - private Date createDate; - - public MetaSensorDisplayItem() { - - } - - public MetaSensorDisplayItem(Long id) { - this.id = id; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public MetaCrawler getMetaCrawler() { - return metaCrawler; - } - - public void setMetaCrawler(MetaCrawler metaCrawler) { - this.metaCrawler = metaCrawler; - } - - public MetaSensorItemUnit getMetaSensorItemUnit() { - return metaSensorItemUnit; - } - - public void setMetaSensorItemUnit(MetaSensorItemUnit metaSensorItemUnit) { - this.metaSensorItemUnit = metaSensorItemUnit; - } - - public Date getCreateDate() { - return createDate; - } - - public void setCreateDate(Date createDate) { - this.createDate = createDate; - } - - public Boolean getDefault() { - return isDefault; - } - - public void setDefault(Boolean aDefault) { - isDefault = aDefault; - } - - public MetaSensorItemType getMetaSensorItemType() { - return metaSensorItemType; - } - - public void setMetaSensorItemType(MetaSensorItemType metaSensorItemType) { - this.metaSensorItemType = metaSensorItemType; - } - -} diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayMapping.java b/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayMapping.java deleted file mode 100644 index 0a31a24..0000000 --- a/src/main/java/com/loafle/overflow/model/meta/MetaSensorDisplayMapping.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.loafle.overflow.model.meta; - -import java.util.Date; - -import javax.persistence.*; - -/** - * Created by snoop on 18. 4. 24. - */ -@Entity -@Table(name = "META_SENSOR_DISPLAY_MAPPING", schema = "public") -public class MetaSensorDisplayMapping { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - @ManyToOne - @JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false) - private MetaSensorDisplayItem metaSensorDisplayItem; - - @ManyToOne - @JoinColumn(name = "META_SENSOR_ITEM_KEY_ID", nullable = false) - private MetaSensorItemKey metaSensorItemKey; - - @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 MetaSensorDisplayItem getMetaSensorDisplayItem() { - return metaSensorDisplayItem; - } - - public void setMetaSensorDisplayItem(MetaSensorDisplayItem metaSensorDisplayItem) { - this.metaSensorDisplayItem = metaSensorDisplayItem; - } - - public MetaSensorItemKey getMetaSensorItemKey() { - return metaSensorItemKey; - } - - public void setMetaSensorItemKey(MetaSensorItemKey metaSensorItemKey) { - this.metaSensorItemKey = metaSensorItemKey; - } - - public Date getCreateDate() { - return createDate; - } - - public void setCreateDate(Date createDate) { - this.createDate = createDate; - } - -} diff --git a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemKey.java b/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemKey.java index d2883c9..06ced4f 100644 --- a/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemKey.java +++ b/src/main/java/com/loafle/overflow/model/meta/MetaSensorItemKey.java @@ -28,7 +28,7 @@ public class MetaSensorItemKey { @ManyToOne @JoinColumn(name = "META_SENSOR_ITEM_ID", nullable = false) - private MetaSensorItem metaSensorItem; + private MetaCollectionItem metaCollectionItem; @ManyToOne @JoinColumn(name = "META_CRAWLER_ID", nullable = false) @@ -36,7 +36,7 @@ public class MetaSensorItemKey { @ManyToOne @JoinColumn(name = "META_SENSOR_ITEM_UNIT_ID", nullable = true) - private MetaSensorItemUnit metaSensorItemUnit; + private MetaItemUnit metaItemUnit; @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) @@ -58,12 +58,12 @@ public class MetaSensorItemKey { this.name = name; } - public MetaSensorItem getMetaSensorItem() { - return metaSensorItem; + public MetaCollectionItem getMetaCollectionItem() { + return metaCollectionItem; } - public void setMetaSensorItem(MetaSensorItem metaSensorItem) { - this.metaSensorItem = metaSensorItem; + public void setMetaCollectionItem(MetaCollectionItem metaCollectionItem) { + this.metaCollectionItem = metaCollectionItem; } public String getKey() { @@ -106,11 +106,11 @@ public class MetaSensorItemKey { this.createDate = createDate; } - public MetaSensorItemUnit getMetaSensorItemUnit() { - return metaSensorItemUnit; + public MetaItemUnit getMetaItemUnit() { + return metaItemUnit; } - public void setMetaSensorItemUnit(MetaSensorItemUnit metaSensorItemUnit) { - this.metaSensorItemUnit = metaSensorItemUnit; + 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 98611a0..85eea2f 100644 --- a/src/main/java/com/loafle/overflow/model/sensor/Sensor.java +++ b/src/main/java/com/loafle/overflow/model/sensor/Sensor.java @@ -1,7 +1,8 @@ package com.loafle.overflow.model.sensor; import com.loafle.overflow.model.meta.MetaCrawler; -import com.loafle.overflow.model.meta.MetaSensorDisplayItem; +import com.loafle.overflow.model.meta.MetaCrawlerMapping; +import com.loafle.overflow.model.meta.MetaDisplayItem; import com.loafle.overflow.model.meta.MetaSensorStatus; import com.loafle.overflow.model.target.Target; import org.hibernate.annotations.OnDelete; @@ -30,16 +31,13 @@ public class Sensor { @Column(name = "NAME", nullable = false, length = 50) private String name; - @Column(name = "DESCRIPTION", nullable = true, length = 50) - private String description; - @ManyToOne @JoinColumn(name = "META_SENSOR_STATUS_ID") private MetaSensorStatus metaSensorStatus; @ManyToOne - @JoinColumn(name = "META_CRAWLER_ID", nullable = false) - private MetaCrawler metaCrawler; + @JoinColumn(name = "META_CRAWLER_MAPPING_ID", nullable = false) + private MetaCrawlerMapping metaCrawlerMapping; @Column(name = "CRAWLER_INPUT_ITEMS", nullable = true, length = 50) private String crawlerInputItems; @@ -52,7 +50,7 @@ public class Sensor { private Date createDate; @Transient - private List sensorItems; + private List sensorItems; public Long getId() { return id; @@ -62,14 +60,6 @@ public class Sensor { this.id = id; } - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - public MetaSensorStatus getMetaSensorStatus() { return metaSensorStatus; } @@ -86,12 +76,12 @@ public class Sensor { this.target = target; } - public MetaCrawler getMetaCrawler() { - return metaCrawler; + public MetaCrawlerMapping getMetaCrawlerMapping() { + return metaCrawlerMapping; } - public void setMetaCrawler(MetaCrawler metaCrawler) { - this.metaCrawler = metaCrawler; + public void setMetaCrawlerMapping(MetaCrawlerMapping metaCrawlerMapping) { + this.metaCrawlerMapping = metaCrawlerMapping; } public String getCrawlerInputItems() { @@ -126,11 +116,11 @@ public class Sensor { this.createDate = createDate; } - public List getSensorItems() { + public List getSensorItems() { return sensorItems; } - public void setSensorItems(List sensorItems) { + public void setSensorItems(List sensorItems) { this.sensorItems = sensorItems; } 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 99b6a45..72c9d87 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,7 @@ package com.loafle.overflow.model.sensor; -import com.loafle.overflow.model.meta.MetaSensorDisplayItem; +import com.loafle.overflow.model.meta.MetaDisplayItem; +import com.loafle.overflow.model.meta.MetaDisplayItemMapping; import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDeleteAction; @@ -24,8 +25,8 @@ public class SensorItem { private Sensor sensor; @ManyToOne - @JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false) - private MetaSensorDisplayItem metaSensorDisplayItem; + @JoinColumn(name = "META_DISPLAY_ITEM_MAPPING_ID", nullable = false) + private MetaDisplayItemMapping metaDisplayItemMapping; @Temporal(TemporalType.TIMESTAMP) @Column(name = "CREATE_DATE", nullable = false, columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP", insertable = false, updatable = false) @@ -47,12 +48,12 @@ public class SensorItem { this.sensor = sensor; } - public MetaSensorDisplayItem getMetaSensorDisplayItem() { - return metaSensorDisplayItem; + public MetaDisplayItemMapping getMetaDisplayItemMapping() { + return metaDisplayItemMapping; } - public void setMetaSensorDisplayItem(MetaSensorDisplayItem metaSensorDisplayItem) { - this.metaSensorDisplayItem = metaSensorDisplayItem; + public void setMetaDisplayItemMapping(MetaDisplayItemMapping metaDisplayItemMapping) { + this.metaDisplayItemMapping = metaDisplayItemMapping; } public Date getCreateDate() { diff --git a/src/main/java/com/loafle/overflow/model/sensor/SensorItemDependency.java b/src/main/java/com/loafle/overflow/model/sensor/SensorItemDependency.java deleted file mode 100644 index 8237769..0000000 --- a/src/main/java/com/loafle/overflow/model/sensor/SensorItemDependency.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.loafle.overflow.model.sensor; - -import com.loafle.overflow.model.meta.MetaSensorDisplayItem; -import com.loafle.overflow.model.meta.MetaSensorItemKey; - -import javax.persistence.*; - -/** - * Created by insanity on 17. 9. 20. - */ -@Entity -@Table(name = "SENSOR_ITEM_DEPENDENCY", schema = "public") -public class SensorItemDependency { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - @ManyToOne - @JoinColumn(name = "META_SENSOR_DISPLAY_ITEM_ID", nullable = false) - private MetaSensorDisplayItem metaSensorDisplayItem; - - @ManyToOne - @JoinColumn(name = "META_SENSOR_ITEM_KEY_ID", nullable = false) - private MetaSensorItemKey metaSensorItemKey; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public MetaSensorDisplayItem getMetaSensorDisplayItem() { - return metaSensorDisplayItem; - } - - public void setMetaSensorDisplayItem(MetaSensorDisplayItem metaSensorDisplayItem) { - this.metaSensorDisplayItem = metaSensorDisplayItem; - } - - public MetaSensorItemKey getMetaSensorItemKey() { - return metaSensorItemKey; - } - - public void setMetaSensorItemKey(MetaSensorItemKey metaSensorItemKey) { - this.metaSensorItemKey = metaSensorItemKey; - } -} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaCollectionItemMappingService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaCollectionItemMappingService.java new file mode 100644 index 0000000..3532655 --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaCollectionItemMappingService.java @@ -0,0 +1,4 @@ +package com.loafle.overflow.service.central.meta; + +public interface MetaCollectionItemMappingService { +} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaCollectionItemService.java similarity index 60% rename from src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemService.java rename to src/main/java/com/loafle/overflow/service/central/meta/MetaCollectionItemService.java index 0696e85..6ee2937 100644 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemService.java +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaCollectionItemService.java @@ -2,16 +2,16 @@ 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.MetaSensorItem; +import com.loafle.overflow.model.meta.MetaCollectionItem; import java.util.List; /** * Created by snoop on 17. 7. 27. */ -public interface MetaSensorItemService { +public interface MetaCollectionItemService { @WebappAPI - List readAll() throws OverflowException; + List readAll() throws OverflowException; } diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaCrawlerContainerService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaCrawlerContainerService.java new file mode 100644 index 0000000..3c7844d --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaCrawlerContainerService.java @@ -0,0 +1,5 @@ +package com.loafle.overflow.service.central.meta; + +public interface MetaCrawlerContainerService { + +} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemCategoryService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemCategoryService.java new file mode 100644 index 0000000..c111026 --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemCategoryService.java @@ -0,0 +1,22 @@ +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.MetaDisplayItemCategory; + +import java.util.List; + +/** + * Created by snoop on 17. 7. 27. + */ +public interface MetaDisplayItemCategoryService { + @WebappAPI + List readAll() throws OverflowException; + + @WebappAPI + MetaDisplayItemCategory regist(MetaDisplayItemCategory metaDisplayItemCategory) throws OverflowException; + + @WebappAPI + List registAll(List metaDisplayItemCategories) throws OverflowException; + +} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorDisplayMappingService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemMappingService.java similarity index 66% rename from src/main/java/com/loafle/overflow/service/central/meta/MetaSensorDisplayMappingService.java rename to src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemMappingService.java index 4d476e9..b1ca30e 100644 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorDisplayMappingService.java +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemMappingService.java @@ -2,7 +2,7 @@ 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.MetaSensorDisplayMapping; +import com.loafle.overflow.model.meta.MetaDisplayItemMapping; import com.loafle.overflow.model.meta.MetaSensorItemKey; import java.util.List; @@ -10,9 +10,9 @@ import java.util.List; /** * Created by snoop on 18. 4. 24. */ -public interface MetaSensorDisplayMappingService { +public interface MetaDisplayItemMappingService { @WebappAPI - MetaSensorDisplayMapping regist(MetaSensorDisplayMapping metaSensorDisplayMapping) throws OverflowException; + 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 new file mode 100644 index 0000000..2e88fcf --- /dev/null +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaDisplayItemService.java @@ -0,0 +1,19 @@ +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.MetaDisplayItem; + +import java.util.List; + +/** + * Created by insanity on 17. 9. 20. + */ + +public interface MetaDisplayItemService { + @WebappAPI + MetaDisplayItem regist(MetaDisplayItem metaDisplayItem) throws OverflowException; + + @WebappAPI + MetaDisplayItem read(Long id) throws OverflowException; +} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemUnitService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaItemUnitService.java similarity index 53% rename from src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemUnitService.java rename to src/main/java/com/loafle/overflow/service/central/meta/MetaItemUnitService.java index f7f163c..5a0cffa 100644 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemUnitService.java +++ b/src/main/java/com/loafle/overflow/service/central/meta/MetaItemUnitService.java @@ -2,13 +2,13 @@ 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.MetaSensorItemUnit; +import com.loafle.overflow.model.meta.MetaItemUnit; /** * Created by insanity on 17. 9. 20. */ -public interface MetaSensorItemUnitService { +public interface MetaItemUnitService { @WebappAPI - MetaSensorItemUnit regist(MetaSensorItemUnit metaSensorItemUnit) throws OverflowException; + MetaItemUnit regist(MetaItemUnit metaItemUnit) throws OverflowException; } diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorDisplayItemService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorDisplayItemService.java deleted file mode 100644 index 01aa133..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorDisplayItemService.java +++ /dev/null @@ -1,22 +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.MetaSensorDisplayItem; - -import java.util.List; - -/** - * Created by insanity on 17. 9. 20. - */ - -public interface MetaSensorDisplayItemService { - @WebappAPI - MetaSensorDisplayItem regist(MetaSensorDisplayItem metaSensorDisplayItem) throws OverflowException; - - @WebappAPI - MetaSensorDisplayItem read(Long id) throws OverflowException; - - @WebappAPI - List readAllByCrawlerID(Short metaCrawlerID) throws OverflowException; -} diff --git a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemTypeService.java b/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemTypeService.java deleted file mode 100644 index 10e1763..0000000 --- a/src/main/java/com/loafle/overflow/service/central/meta/MetaSensorItemTypeService.java +++ /dev/null @@ -1,22 +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.MetaSensorItemType; - -import java.util.List; - -/** - * Created by snoop on 17. 7. 27. - */ -public interface MetaSensorItemTypeService { - @WebappAPI - List readAll() throws OverflowException; - - @WebappAPI - MetaSensorItemType regist(MetaSensorItemType metaSensorItemType) throws OverflowException; - - @WebappAPI - List registAll(List metaSensorItemTypes) throws OverflowException; - -} diff --git a/src/main/java/com/loafle/overflow/service/central/sensor/SensorItemDependencyService.java b/src/main/java/com/loafle/overflow/service/central/sensor/SensorItemDependencyService.java deleted file mode 100644 index 1f79e7d..0000000 --- a/src/main/java/com/loafle/overflow/service/central/sensor/SensorItemDependencyService.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.loafle.overflow.service.central.sensor; - -import com.loafle.overflow.core.annotation.WebappAPI; -import com.loafle.overflow.core.exception.OverflowException; -import com.loafle.overflow.model.meta.MetaSensorDisplayItem; -import com.loafle.overflow.model.meta.MetaSensorItemKey; -import com.loafle.overflow.model.sensor.SensorItemDependency; - -import java.util.List; -import java.util.Map; - -/** - * Created by insanity on 17. 9. 20. - */ - -public interface SensorItemDependencyService { - @WebappAPI - SensorItemDependency regist(SensorItemDependency dependency) throws OverflowException; - - @WebappAPI - List readAllMetaSensorItemKeyByMetaSensorDisplayItemID(Long metaSensorDisplayItemID) throws OverflowException; - - @WebappAPI - Map> readAllMapByMetaSensorDisplayItems(List metaSensorDisplayItems) - throws OverflowException; - -}