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