java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java
author František Kučera <franta-hg@frantovo.cz>
Sat, 21 Dec 2013 22:18:07 +0100
branchv_0
changeset 27 24aa5199bfd6
parent 26 4ec8e5534eb9
child 29 d66858b4b563
permissions -rw-r--r--
DatabaseConnection: just change package
franta-hg@26
     1
/**
franta-hg@26
     2
 * SQL-DK
franta-hg@26
     3
 * Copyright © 2013 František Kučera (frantovo.cz)
franta-hg@26
     4
 *
franta-hg@26
     5
 * This program is free software: you can redistribute it and/or modify
franta-hg@26
     6
 * it under the terms of the GNU General Public License as published by
franta-hg@26
     7
 * the Free Software Foundation, either version 3 of the License, or
franta-hg@26
     8
 * (at your option) any later version.
franta-hg@26
     9
 *
franta-hg@26
    10
 * This program is distributed in the hope that it will be useful,
franta-hg@26
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
franta-hg@26
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
franta-hg@26
    13
 * GNU General Public License for more details.
franta-hg@26
    14
 *
franta-hg@26
    15
 * You should have received a copy of the GNU General Public License
franta-hg@26
    16
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
franta-hg@26
    17
 */
franta-hg@26
    18
package info.globalcode.sql.dk.configuration;
franta-hg@26
    19
franta-hg@27
    20
import info.globalcode.sql.dk.DatabaseConnection;
franta-hg@26
    21
import javax.xml.bind.annotation.XmlElement;
franta-hg@26
    22
import javax.xml.bind.annotation.XmlTransient;
franta-hg@26
    23
franta-hg@26
    24
/**
franta-hg@26
    25
 *
franta-hg@26
    26
 * @author Ing. František Kučera (frantovo.cz)
franta-hg@26
    27
 */
franta-hg@26
    28
public class DatabaseDefinition implements NameIdentified {
franta-hg@26
    29
franta-hg@26
    30
	private String name;
franta-hg@26
    31
	private String url;
franta-hg@26
    32
	private String userName;
franta-hg@26
    33
	private String password;
franta-hg@26
    34
franta-hg@26
    35
	@XmlElement(name = "name")
franta-hg@26
    36
	@Override
franta-hg@26
    37
	public String getName() {
franta-hg@26
    38
		return name;
franta-hg@26
    39
	}
franta-hg@26
    40
franta-hg@26
    41
	public void setName(String name) {
franta-hg@26
    42
		this.name = name;
franta-hg@26
    43
	}
franta-hg@26
    44
franta-hg@26
    45
	@XmlElement(name = "url")
franta-hg@26
    46
	public String getUrl() {
franta-hg@26
    47
		return url;
franta-hg@26
    48
	}
franta-hg@26
    49
franta-hg@26
    50
	public void setUrl(String url) {
franta-hg@26
    51
		this.url = url;
franta-hg@26
    52
	}
franta-hg@26
    53
franta-hg@26
    54
	@XmlElement(name = "userName")
franta-hg@26
    55
	public String getUserName() {
franta-hg@26
    56
		return userName;
franta-hg@26
    57
	}
franta-hg@26
    58
franta-hg@26
    59
	public void setUserName(String userName) {
franta-hg@26
    60
		this.userName = userName;
franta-hg@26
    61
	}
franta-hg@26
    62
franta-hg@26
    63
	@XmlElement(name = "password")
franta-hg@26
    64
	public String getPassword() {
franta-hg@26
    65
		return password;
franta-hg@26
    66
	}
franta-hg@26
    67
franta-hg@26
    68
	public void setPassword(String password) {
franta-hg@26
    69
		this.password = password;
franta-hg@26
    70
	}
franta-hg@26
    71
franta-hg@26
    72
	@XmlTransient
franta-hg@26
    73
	public DatabaseConnection connect() {
franta-hg@26
    74
		return new DatabaseConnection(this);
franta-hg@26
    75
	}
franta-hg@26
    76
}