franta-hg@203: /** franta-hg@203: * SQL-DK franta-hg@203: * Copyright © 2015 František Kučera (frantovo.cz) franta-hg@203: * franta-hg@203: * This program is free software: you can redistribute it and/or modify franta-hg@203: * it under the terms of the GNU General Public License as published by franta-hg@203: * the Free Software Foundation, either version 3 of the License, or franta-hg@203: * (at your option) any later version. franta-hg@203: * franta-hg@203: * This program is distributed in the hope that it will be useful, franta-hg@203: * but WITHOUT ANY WARRANTY; without even the implied warranty of franta-hg@203: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the franta-hg@203: * GNU General Public License for more details. franta-hg@203: * franta-hg@203: * You should have received a copy of the GNU General Public License franta-hg@203: * along with this program. If not, see . franta-hg@203: */ franta-hg@203: package info.globalcode.sql.dk.configuration; franta-hg@203: franta-hg@203: import javax.xml.bind.annotation.XmlAttribute; franta-hg@203: import javax.xml.bind.annotation.XmlEnum; franta-hg@203: import javax.xml.bind.annotation.XmlEnumValue; franta-hg@203: import javax.xml.bind.annotation.XmlValue; franta-hg@203: franta-hg@203: /** franta-hg@203: * franta-hg@203: * @author Ing. František Kučera (frantovo.cz) franta-hg@203: */ franta-hg@203: public class CommandArgument { franta-hg@203: franta-hg@203: private String value; franta-hg@203: private TYPE type; franta-hg@203: franta-hg@203: @XmlEnum franta-hg@203: public static enum TYPE { franta-hg@203: franta-hg@203: /** franta-hg@203: * value = literal (text) argument franta-hg@203: */ franta-hg@203: @XmlEnumValue("literal") franta-hg@203: LITERAL, franta-hg@203: /** franta-hg@203: * value will be substituted by hostname or IP address of the DB server franta-hg@203: */ franta-hg@203: @XmlEnumValue("host") franta-hg@203: HOST, franta-hg@203: /** franta-hg@203: * value will be substituted by the port of the DB server franta-hg@203: */ franta-hg@203: @XmlEnumValue("port") franta-hg@203: PORT, franta-hg@203: /** franta-hg@203: * value will be substituted by environmental variable of given name franta-hg@203: */ franta-hg@203: @XmlEnumValue("env") franta-hg@203: ENVIRONMENT_VARIABLE, franta-hg@203: /** franta-hg@203: * value will be substituted by database property of given name franta-hg@203: */ franta-hg@203: @XmlEnumValue("dbProperty") franta-hg@203: DB_PROPERTY; franta-hg@203: } franta-hg@203: franta-hg@203: @XmlValue franta-hg@203: public String getValue() { franta-hg@203: return value; franta-hg@203: } franta-hg@203: franta-hg@203: public void setValue(String value) { franta-hg@203: this.value = value; franta-hg@203: } franta-hg@203: franta-hg@203: @XmlAttribute(name = "type") franta-hg@203: public TYPE getType() { franta-hg@203: return type; franta-hg@203: } franta-hg@203: franta-hg@203: public void setType(TYPE type) { franta-hg@203: this.type = type; franta-hg@203: } franta-hg@203: franta-hg@203: }