From 1865c8f17abd1a4189dc12178066fd05fecb2b02 Mon Sep 17 00:00:00 2001 From: crusader Date: Mon, 23 Apr 2018 17:41:09 +0900 Subject: [PATCH] ing --- .../module/sensorconfig/model/Connection.java | 57 +++++++------ .../module/sensorconfig/model/Item.java | 30 ++++++- .../module/sensorconfig/model/ResultSet.java | 6 +- .../sensorconfig/model/ResultSetCol.java | 2 +- .../sensorconfig/model/SensorConfig.java | 84 +++++++++---------- 5 files changed, 103 insertions(+), 76 deletions(-) diff --git a/src/main/java/com/loafle/overflow/module/sensorconfig/model/Connection.java b/src/main/java/com/loafle/overflow/module/sensorconfig/model/Connection.java index 01ce000..0913527 100644 --- a/src/main/java/com/loafle/overflow/module/sensorconfig/model/Connection.java +++ b/src/main/java/com/loafle/overflow/module/sensorconfig/model/Connection.java @@ -6,41 +6,40 @@ import com.loafle.overflow.module.core.type.PortType; * Connection */ public class Connection { - private String ip; - private int port; - private PortType portType; - private boolean ssl; + private String ip; + private int port; + private PortType portType; + private boolean ssl; - public String getIp() { - return ip; - } + public String getIp() { + return ip; + } - public void setIp(String ip) { - this.ip = ip; - } + public void setIp(String ip) { + this.ip = ip; + } - public int getPort() { - return port; - } + public int getPort() { + return port; + } - public void setPort(int port) { - this.port = port; - } + public void setPort(int port) { + this.port = port; + } - public PortType getPortType() { - return portType; - } + public PortType getPortType() { + return portType; + } - public void setPortType(PortType portType) { - this.portType = portType; - } + public void setPortType(PortType portType) { + this.portType = portType; + } - public boolean isSsl() { - return ssl; - } + public boolean isSsl() { + return ssl; + } - public void setSsl(boolean ssl) { - this.ssl = ssl; - } + public void setSsl(boolean ssl) { + this.ssl = ssl; + } } - diff --git a/src/main/java/com/loafle/overflow/module/sensorconfig/model/Item.java b/src/main/java/com/loafle/overflow/module/sensorconfig/model/Item.java index 99669c2..d15d184 100644 --- a/src/main/java/com/loafle/overflow/module/sensorconfig/model/Item.java +++ b/src/main/java/com/loafle/overflow/module/sensorconfig/model/Item.java @@ -1,9 +1,37 @@ package com.loafle.overflow.module.sensorconfig.model; +import java.util.List; + /** * Item */ public class Item { + private List keys; + private QueryInfo queryInfo; + private MappingInfo mappingInfo; + + public List getKeys() { + return keys; + } + + public void setKeys(List keys) { + this.keys = keys; + } + + public QueryInfo getQueryInfo() { + return queryInfo; + } + + public void setQueryInfo(QueryInfo queryInfo) { + this.queryInfo = queryInfo; + } + + public MappingInfo getMappingInfo() { + return mappingInfo; + } + + public void setMappingInfo(MappingInfo mappingInfo) { + this.mappingInfo = mappingInfo; + } - } \ No newline at end of file diff --git a/src/main/java/com/loafle/overflow/module/sensorconfig/model/ResultSet.java b/src/main/java/com/loafle/overflow/module/sensorconfig/model/ResultSet.java index 0913ac0..59ec408 100644 --- a/src/main/java/com/loafle/overflow/module/sensorconfig/model/ResultSet.java +++ b/src/main/java/com/loafle/overflow/module/sensorconfig/model/ResultSet.java @@ -8,9 +8,9 @@ import java.util.Map; * ResultSet */ public abstract class ResultSet { - private Item item; - private List> rows; - private Map meta; + protected Item item; + protected List> rows; + protected Map meta; // methods public static ResultSet newInstance(Item item) { diff --git a/src/main/java/com/loafle/overflow/module/sensorconfig/model/ResultSetCol.java b/src/main/java/com/loafle/overflow/module/sensorconfig/model/ResultSetCol.java index bace6ad..7e75e01 100644 --- a/src/main/java/com/loafle/overflow/module/sensorconfig/model/ResultSetCol.java +++ b/src/main/java/com/loafle/overflow/module/sensorconfig/model/ResultSetCol.java @@ -1,5 +1,6 @@ package com.loafle.overflow.module.sensorconfig.model; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -14,7 +15,6 @@ public class ResultSetCol extends ResultSet { } public void setMeta() { - List meta = this.item.getKeys(); List arrayColumns = this.item.getMappingInfo().getArrayColumns(); diff --git a/src/main/java/com/loafle/overflow/module/sensorconfig/model/SensorConfig.java b/src/main/java/com/loafle/overflow/module/sensorconfig/model/SensorConfig.java index 6097393..1e6df66 100644 --- a/src/main/java/com/loafle/overflow/module/sensorconfig/model/SensorConfig.java +++ b/src/main/java/com/loafle/overflow/module/sensorconfig/model/SensorConfig.java @@ -6,58 +6,58 @@ import java.util.List; * SensorConfig */ public class SensorConfig { - private long id; - private String configID; - private Target target; - private Schedule schedule; - private Crawler crawler; - private List items; + private long id; + private String configID; + private Target target; + private Schedule schedule; + private Crawler crawler; + private List items; - public long getId() { - return id; - } + public long getId() { + return id; + } - public void setId(long id) { - this.id = id; - } + public void setId(long id) { + this.id = id; + } - public String getConfigID() { - return configID; - } + public String getConfigID() { + return configID; + } - public void setConfigID(String configID) { - this.configID = configID; - } + public void setConfigID(String configID) { + this.configID = configID; + } - public Target getTarget() { - return target; - } + public Target getTarget() { + return target; + } - public void setTarget(Target target) { - this.target = target; - } + public void setTarget(Target target) { + this.target = target; + } - public Schedule getSchedule() { - return schedule; - } + public Schedule getSchedule() { + return schedule; + } - public void setSchedule(Schedule schedule) { - this.schedule = schedule; - } + public void setSchedule(Schedule schedule) { + this.schedule = schedule; + } - public Crawler getCrawler() { - return crawler; - } + public Crawler getCrawler() { + return crawler; + } - public void setCrawler(Crawler crawler) { - this.crawler = crawler; - } + public void setCrawler(Crawler crawler) { + this.crawler = crawler; + } - public List getItems() { - return items; - } + public List getItems() { + return items; + } - public void setItems(List items) { - this.items = items; - } + public void setItems(List items) { + this.items = items; + } } \ No newline at end of file