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
*/
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;
}
}

View File

@ -1,9 +1,37 @@
package com.loafle.overflow.module.sensorconfig.model;
import java.util.List;
/**
* 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
*/
public abstract class ResultSet {
private Item item;
private List<List<String>> rows;
private Map<String, Integer> meta;
protected Item item;
protected List<List<String>> rows;
protected Map<String, Integer> meta;
// methods
public static ResultSet newInstance(Item item) {

View File

@ -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<Keys> meta = this.item.getKeys();
List<String> arrayColumns = this.item.getMappingInfo().getArrayColumns();

View File

@ -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<Item> items;
private long id;
private String configID;
private Target target;
private Schedule schedule;
private Crawler crawler;
private List<Item> 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<Item> getItems() {
return items;
}
public List<Item> getItems() {
return items;
}
public void setItems(List<Item> items) {
this.items = items;
}
public void setItems(List<Item> items) {
this.items = items;
}
}