# HG changeset patch # User Raimund Renkert # Date 1376572702 -7200 # Node ID b196ef9d8645f1ca985f4fdedb7d8e107c1b3bb0 # Parent 512addede0ec1e591fdda9c9313a8e914d846806 New model classes for query configs. diff -r 512addede0ec -r b196ef9d8645 src/main/java/de/intevation/lada/model/query/QueryConfig.java --- /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 filters; + List 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 getFilters() { + return filters; + } + + /** + * @param filter the filter to set + */ + public void setFilters(List filters) { + this.filters = filters; + } + + /** + * @return the results + */ + public List getResults() { + return results; + } + + /** + * @param results the results to set + */ + public void setResults(List results) { + this.results = results; + } +} diff -r 512addede0ec -r b196ef9d8645 src/main/java/de/intevation/lada/model/query/QueryFilter.java --- /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; + } +} diff -r 512addede0ec -r b196ef9d8645 src/main/java/de/intevation/lada/model/query/ResultConfig.java --- /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; + } +}