tim@335: package de.intevation.gnv.state; tim@335: tim@335: /** sascha@780: * @author Tim Englich sascha@778: * tim@335: */ tim@335: public class DefaultInputValue implements InputValue { tim@335: tim@335: /** tim@335: * The UID of this Class. tim@335: */ tim@335: private static final long serialVersionUID = -8518824299166180986L; tim@335: private String name = null; tim@335: private String type = null; tim@335: private boolean multiselect = false; tim@335: private int usedInQueries = 1; tim@335: private String defaultValue = "N/N"; tim@335: tim@335: public DefaultInputValue(String name, String type, String defaultValue, tim@335: boolean multiselect) { tim@335: this(name, type, multiselect, 1); tim@335: this.defaultValue = defaultValue; tim@335: tim@335: } tim@335: tim@335: /** tim@335: * Constructor tim@335: */ tim@335: public DefaultInputValue(String name, String type, boolean multiselect, tim@335: int usedInQueries) { tim@335: this.name = name; tim@335: this.type = type; tim@335: this.multiselect = multiselect; tim@335: this.usedInQueries = usedInQueries; tim@335: } tim@335: tim@335: /** tim@335: * @see de.intevation.gnv.state.InputValue#getName() tim@335: */ tim@335: public String getName() { tim@335: return this.name; tim@335: } tim@335: tim@335: /** tim@335: * @see de.intevation.gnv.state.InputValue#getType() tim@335: */ tim@335: public String getType() { tim@335: return this.type; tim@335: } tim@335: tim@335: /** tim@335: * @see java.lang.Object#toString() tim@335: */ tim@335: @Override tim@335: public String toString() { tim@335: return "InputValue " + this.name + " ==> " + this.type tim@335: + "==> multiselect: " + this.multiselect; tim@335: } tim@335: tim@335: /** tim@335: * @see de.intevation.gnv.state.InputValue#isMultiselect() tim@335: */ tim@335: public boolean isMultiselect() { tim@335: return this.multiselect; tim@335: } tim@335: tim@335: public int usedInQueries() { tim@335: return this.usedInQueries; tim@335: } tim@335: tim@335: public String getDefaultValue() { tim@335: return this.defaultValue; tim@335: } tim@335: tim@335: }