www.pudn.com > dataswap.rar > DataBaseConfig.java


package com.gemt.dataswap.config; 
 
public class DataBaseConfig implements java.io.Serializable { 
	 
	/** 
	 * 保存数据库配置信息 
	 */ 
	private static final long serialVersionUID = 8434459599604640218L; 
	private String driverClass; 
	private String host; 
	private int port; 
	private String dbName; 
	private String userName; 
	private String password; 
	private String dbDialect; 
	 
	 
	public String getDbDialect() 
	{ 
		return dbDialect; 
	} 
	public void setDbDialect(String dbDialect) 
	{ 
		this.dbDialect = dbDialect; 
	} 
	public String getDbName() 
	{ 
		return dbName; 
	} 
	public void setDbName(String dbName) 
	{ 
		this.dbName = dbName; 
	} 
	public String getDriverClass() 
	{ 
		return driverClass; 
	} 
	public void setDriverClass(String driverClass) 
	{ 
		this.driverClass = driverClass; 
	} 
	public String getHost() 
	{ 
		return host; 
	} 
	public void setHost(String host) 
	{ 
		this.host = host; 
	} 
	public String getPassword() 
	{ 
		return password; 
	} 
	public void setPassword(String password) 
	{ 
		this.password = password; 
	} 
	public int getPort() 
	{ 
		return port; 
	} 
	public void setPort(int port) 
	{ 
		this.port = port; 
	} 
	public String getUserName() 
	{ 
		return userName; 
	} 
	public void setUserName(String userName) 
	{ 
		this.userName = userName; 
	} 
	@Override 
	public int hashCode() 
	{ 
		final int PRIME = 31; 
		int result = super.hashCode(); 
		result = PRIME * result + ((dbDialect == null) ? 0 : dbDialect.hashCode()); 
		result = PRIME * result + ((dbName == null) ? 0 : dbName.hashCode()); 
		result = PRIME * result + ((driverClass == null) ? 0 : driverClass.hashCode()); 
		result = PRIME * result + ((host == null) ? 0 : host.hashCode()); 
		result = PRIME * result + ((password == null) ? 0 : password.hashCode()); 
		result = PRIME * result + port; 
		result = PRIME * result + ((userName == null) ? 0 : userName.hashCode()); 
		return result; 
	} 
	@Override 
	public boolean equals(Object obj) 
	{ 
		if (this == obj) 
			return true; 
		if (!super.equals(obj)) 
			return false; 
		if (getClass() != obj.getClass()) 
			return false; 
		final DataBaseConfig other = (DataBaseConfig) obj; 
		if (dbDialect == null) 
		{ 
			if (other.dbDialect != null) 
				return false; 
		} 
		else if (!dbDialect.equals(other.dbDialect)) 
			return false; 
		if (dbName == null) 
		{ 
			if (other.dbName != null) 
				return false; 
		} 
		else if (!dbName.equals(other.dbName)) 
			return false; 
		if (driverClass == null) 
		{ 
			if (other.driverClass != null) 
				return false; 
		} 
		else if (!driverClass.equals(other.driverClass)) 
			return false; 
		if (host == null) 
		{ 
			if (other.host != null) 
				return false; 
		} 
		else if (!host.equals(other.host)) 
			return false; 
		if (password == null) 
		{ 
			if (other.password != null) 
				return false; 
		} 
		else if (!password.equals(other.password)) 
			return false; 
		if (port != other.port) 
			return false; 
		if (userName == null) 
		{ 
			if (other.userName != null) 
				return false; 
		} 
		else if (!userName.equals(other.userName)) 
			return false; 
		return true; 
	} 
	 
	 
}