Mercurial > lada > lada-server
changeset 296:b196ef9d8645
New model classes for query configs.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 15 Aug 2013 15:18:22 +0200 |
parents | 512addede0ec |
children | dc2e1668a179 |
files | src/main/java/de/intevation/lada/model/query/QueryConfig.java src/main/java/de/intevation/lada/model/query/QueryFilter.java src/main/java/de/intevation/lada/model/query/ResultConfig.java |
diffstat | 3 files changed, 224 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/query/QueryConfig.java Thu Aug 15 15:18:22 2013 +0200 @@ -0,0 +1,102 @@ +package de.intevation.lada.model.query; + +import java.util.List; + + +public class QueryConfig +{ + int id; + String name; + String description; + String sql; + List<QueryFilter> filters; + List<ResultConfig> results; + + public QueryConfig() + { + } + + /** + * @return the id + */ + public int getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(int id) { + this.id = id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * @return the sql + */ + public String getSql() { + return sql; + } + + /** + * @param sql the sql to set + */ + public void setSql(String sql) { + this.sql = sql; + } + + /** + * @return the filter + */ + public List<QueryFilter> getFilters() { + return filters; + } + + /** + * @param filter the filter to set + */ + public void setFilters(List<QueryFilter> filters) { + this.filters = filters; + } + + /** + * @return the results + */ + public List<ResultConfig> getResults() { + return results; + } + + /** + * @param results the results to set + */ + public void setResults(List<ResultConfig> results) { + this.results = results; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/query/QueryFilter.java Thu Aug 15 15:18:22 2013 +0200 @@ -0,0 +1,32 @@ +package de.intevation.lada.model.query; + + +public class QueryFilter +{ + private String dataIndex; + private String type; + + public QueryFilter() { + } + + public QueryFilter(String dataIndex, String type) { + this.dataIndex = dataIndex; + this.type = type; + } + + public String getDataIndex() { + return dataIndex; + } + + public void setDataIndex(String dataIndex) { + this.dataIndex = dataIndex; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/model/query/ResultConfig.java Thu Aug 15 15:18:22 2013 +0200 @@ -0,0 +1,90 @@ +package de.intevation.lada.model.query; + + +public class ResultConfig +{ + String dataIndex; + String header; + Integer flex; + Integer width; + + public ResultConfig() { + } + + public ResultConfig(String dataIndex, String header, Integer flex, Integer width) { + this.dataIndex= dataIndex; + this.header= header; + this.flex = flex; + this.width = width; + } + + public ResultConfig(String dataIndex, String header, Integer flex) { + this.dataIndex= dataIndex; + this.header= header; + this.flex = flex; + this.width = null; + } + + public ResultConfig(String dataIndex, String header) { + this.dataIndex= dataIndex; + this.header= header; + this.flex = 0; + this.width = null; + } + + /** + * @return the dataIndex + */ + public String getDataIndex() { + return dataIndex; + } + + /** + * @param dataIndex the dataIndex to set + */ + public void setDataIndex(String dataIndex) { + this.dataIndex = dataIndex; + } + + /** + * @return the header + */ + public String getHeader() { + return header; + } + + /** + * @param header the header to set + */ + public void setHeader(String header) { + this.header = header; + } + + /** + * @return the width + */ + public Integer getWidth() { + return width; + } + + /** + * @param width the width to set + */ + public void setWidth(Integer width) { + this.width = width; + } + + /** + * @return the flex + */ + public Integer getFlex() { + return flex; + } + + /** + * @param flex the flex to set + */ + public void setFlex(Integer flex) { + this.flex = flex; + } +}