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