java/sql-dk/src/main/java/info/globalcode/sql/dk/configuration/Property.java
author František Kučera <franta-hg@frantovo.cz>
Thu, 24 Oct 2019 21:43:08 +0200
branchv_0
changeset 250 aae5009bd0af
parent 238 4a1864c3e867
permissions -rw-r--r--
fix license version: GNU GPLv3
franta-hg@104
     1
/**
franta-hg@104
     2
 * SQL-DK
franta-hg@104
     3
 * Copyright © 2013 František Kučera (frantovo.cz)
franta-hg@104
     4
 *
franta-hg@104
     5
 * This program is free software: you can redistribute it and/or modify
franta-hg@104
     6
 * it under the terms of the GNU General Public License as published by
franta-hg@250
     7
 * the Free Software Foundation, version 3 of the License.
franta-hg@104
     8
 *
franta-hg@104
     9
 * This program is distributed in the hope that it will be useful,
franta-hg@104
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@104
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@104
    12
 * GNU General Public License for more details.
franta-hg@104
    13
 *
franta-hg@104
    14
 * You should have received a copy of the GNU General Public License
franta-hg@104
    15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@104
    16
 */
franta-hg@104
    17
package info.globalcode.sql.dk.configuration;
franta-hg@104
    18
franta-hg@104
    19
import javax.xml.bind.annotation.XmlAttribute;
franta-hg@104
    20
import javax.xml.bind.annotation.XmlValue;
franta-hg@104
    21
franta-hg@104
    22
/**
franta-hg@104
    23
 * One configurable
franta-hg@104
    24
 *
franta-hg@104
    25
 * @author Ing. František Kučera (frantovo.cz)
franta-hg@104
    26
 */
franta-hg@105
    27
public class Property implements NameIdentified, Cloneable {
franta-hg@104
    28
franta-hg@104
    29
	private String name;
franta-hg@104
    30
	private String value;
franta-hg@104
    31
franta-hg@104
    32
	public Property() {
franta-hg@104
    33
	}
franta-hg@104
    34
franta-hg@104
    35
	public Property(String name, String value) {
franta-hg@104
    36
		this.name = name;
franta-hg@104
    37
		this.value = value;
franta-hg@104
    38
	}
franta-hg@104
    39
franta-hg@104
    40
	@XmlAttribute(name = "name")
franta-hg@104
    41
	@Override
franta-hg@104
    42
	public String getName() {
franta-hg@104
    43
		return name;
franta-hg@104
    44
	}
franta-hg@104
    45
franta-hg@104
    46
	public void setName(String name) {
franta-hg@104
    47
		this.name = name;
franta-hg@104
    48
	}
franta-hg@104
    49
franta-hg@104
    50
	@XmlValue
franta-hg@104
    51
	public String getValue() {
franta-hg@104
    52
		return value;
franta-hg@104
    53
	}
franta-hg@104
    54
franta-hg@104
    55
	public void setValue(String value) {
franta-hg@104
    56
		this.value = value;
franta-hg@104
    57
	}
franta-hg@104
    58
franta-hg@104
    59
	@Override
franta-hg@104
    60
	public String toString() {
franta-hg@104
    61
		return name + "='" + value + "'";
franta-hg@104
    62
	}
franta-hg@105
    63
franta-hg@105
    64
	@Override
franta-hg@105
    65
	protected Property clone() {
franta-hg@105
    66
		return new Property(name, value);
franta-hg@105
    67
	}
franta-hg@104
    68
}