This commit is contained in:
crusader 2018-04-23 17:41:09 +09:00
parent bc9c8f9848
commit 1865c8f17a
5 changed files with 103 additions and 76 deletions

View File

@ -6,41 +6,40 @@ import com.loafle.overflow.module.core.type.PortType;
* Connection * Connection
*/ */
public class Connection { public class Connection {
private String ip; private String ip;
private int port; private int port;
private PortType portType; private PortType portType;
private boolean ssl; private boolean ssl;
public String getIp() { public String getIp() {
return ip; return ip;
} }
public void setIp(String ip) { public void setIp(String ip) {
this.ip = ip; this.ip = ip;
} }
public int getPort() { public int getPort() {
return port; return port;
} }
public void setPort(int port) { public void setPort(int port) {
this.port = port; this.port = port;
} }
public PortType getPortType() { public PortType getPortType() {
return portType; return portType;
} }
public void setPortType(PortType portType) { public void setPortType(PortType portType) {
this.portType = portType; this.portType = portType;
} }
public boolean isSsl() { public boolean isSsl() {
return ssl; return ssl;
} }
public void setSsl(boolean ssl) { public void setSsl(boolean ssl) {
this.ssl = ssl; this.ssl = ssl;
} }
} }

View File

@ -1,9 +1,37 @@
package com.loafle.overflow.module.sensorconfig.model; package com.loafle.overflow.module.sensorconfig.model;
import java.util.List;
/** /**
* Item * Item
*/ */
public class Item { public class Item {
private List<Keys> keys;
private QueryInfo queryInfo;
private MappingInfo mappingInfo;
public List<Keys> getKeys() {
return keys;
}
public void setKeys(List<Keys> 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;
}
} }

View File

@ -8,9 +8,9 @@ import java.util.Map;
* ResultSet * ResultSet
*/ */
public abstract class ResultSet { public abstract class ResultSet {
private Item item; protected Item item;
private List<List<String>> rows; protected List<List<String>> rows;
private Map<String, Integer> meta; protected Map<String, Integer> meta;
// methods // methods
public static ResultSet newInstance(Item item) { public static ResultSet newInstance(Item item) {

View File

@ -1,5 +1,6 @@
package com.loafle.overflow.module.sensorconfig.model; package com.loafle.overflow.module.sensorconfig.model;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -14,7 +15,6 @@ public class ResultSetCol extends ResultSet {
} }
public void setMeta() { public void setMeta() {
List<Keys> meta = this.item.getKeys(); List<Keys> meta = this.item.getKeys();
List<String> arrayColumns = this.item.getMappingInfo().getArrayColumns(); List<String> arrayColumns = this.item.getMappingInfo().getArrayColumns();

View File

@ -6,58 +6,58 @@ import java.util.List;
* SensorConfig * SensorConfig
*/ */
public class SensorConfig { public class SensorConfig {
private long id; private long id;
private String configID; private String configID;
private Target target; private Target target;
private Schedule schedule; private Schedule schedule;
private Crawler crawler; private Crawler crawler;
private List<Item> items; private List<Item> items;
public long getId() { public long getId() {
return id; return id;
} }
public void setId(long id) { public void setId(long id) {
this.id = id; this.id = id;
} }
public String getConfigID() { public String getConfigID() {
return configID; return configID;
} }
public void setConfigID(String configID) { public void setConfigID(String configID) {
this.configID = configID; this.configID = configID;
} }
public Target getTarget() { public Target getTarget() {
return target; return target;
} }
public void setTarget(Target target) { public void setTarget(Target target) {
this.target = target; this.target = target;
} }
public Schedule getSchedule() { public Schedule getSchedule() {
return schedule; return schedule;
} }
public void setSchedule(Schedule schedule) { public void setSchedule(Schedule schedule) {
this.schedule = schedule; this.schedule = schedule;
} }
public Crawler getCrawler() { public Crawler getCrawler() {
return crawler; return crawler;
} }
public void setCrawler(Crawler crawler) { public void setCrawler(Crawler crawler) {
this.crawler = crawler; this.crawler = crawler;
} }
public List<Item> getItems() { public List<Item> getItems() {
return items; return items;
} }
public void setItems(List<Item> items) { public void setItems(List<Item> items) {
this.items = items; this.items = items;
} }
} }