|
1 /** |
|
2 * SQL-DK |
|
3 * Copyright © 2015 František Kučera (frantovo.cz) |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU General Public License as published by |
|
7 * the Free Software Foundation, either version 3 of the License, or |
|
8 * (at your option) any later version. |
|
9 * |
|
10 * This program is distributed in the hope that it will be useful, |
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 * GNU General Public License for more details. |
|
14 * |
|
15 * You should have received a copy of the GNU General Public License |
|
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 */ |
|
18 package info.globalcode.sql.dk.configuration; |
|
19 |
|
20 import javax.xml.bind.annotation.XmlAttribute; |
|
21 import javax.xml.bind.annotation.XmlEnum; |
|
22 import javax.xml.bind.annotation.XmlEnumValue; |
|
23 import javax.xml.bind.annotation.XmlValue; |
|
24 |
|
25 /** |
|
26 * |
|
27 * @author Ing. František Kučera (frantovo.cz) |
|
28 */ |
|
29 public class CommandArgument { |
|
30 |
|
31 private String value; |
|
32 private TYPE type; |
|
33 |
|
34 @XmlEnum |
|
35 public static enum TYPE { |
|
36 |
|
37 /** |
|
38 * value = literal (text) argument |
|
39 */ |
|
40 @XmlEnumValue("literal") |
|
41 LITERAL, |
|
42 /** |
|
43 * value will be substituted by hostname or IP address of the DB server |
|
44 */ |
|
45 @XmlEnumValue("host") |
|
46 HOST, |
|
47 /** |
|
48 * value will be substituted by the port of the DB server |
|
49 */ |
|
50 @XmlEnumValue("port") |
|
51 PORT, |
|
52 /** |
|
53 * value will be substituted by environmental variable of given name |
|
54 */ |
|
55 @XmlEnumValue("env") |
|
56 ENVIRONMENT_VARIABLE, |
|
57 /** |
|
58 * value will be substituted by database property of given name |
|
59 */ |
|
60 @XmlEnumValue("dbProperty") |
|
61 DB_PROPERTY; |
|
62 } |
|
63 |
|
64 @XmlValue |
|
65 public String getValue() { |
|
66 return value; |
|
67 } |
|
68 |
|
69 public void setValue(String value) { |
|
70 this.value = value; |
|
71 } |
|
72 |
|
73 @XmlAttribute(name = "type") |
|
74 public TYPE getType() { |
|
75 return type; |
|
76 } |
|
77 |
|
78 public void setType(TYPE type) { |
|
79 this.type = type; |
|
80 } |
|
81 |
|
82 } |