com.antelmann.sql
Class ConnectorSettings
java.lang.Object
com.antelmann.sql.ConnectorSettings
- All Implemented Interfaces:
- Factory<Connection>, ValueRetriever<Connection>, Serializable
public class ConnectorSettings
- extends Object
- implements Serializable, Factory<Connection>, ValueRetriever<Connection>
allows to specify how to connect to a database in a serializable manner
- Since:
- 01.01.2015, 03:10:51
- Author:
- holger
- See Also:
Connector,
Serialized Form
|
Constructor Summary |
ConnectorSettings()
|
ConnectorSettings(String server,
Connector.DBType type,
String dbname,
Integer port,
String user,
char[] pwd,
boolean ssl)
|
ConnectorSettings(String server,
Connector.DBType type,
String dbname,
String user,
char[] password)
|
ConnectorSettings
public ConnectorSettings()
ConnectorSettings
public ConnectorSettings(String server,
Connector.DBType type,
String dbname,
String user,
char[] password)
ConnectorSettings
public ConnectorSettings(String server,
Connector.DBType type,
String dbname,
Integer port,
String user,
char[] pwd,
boolean ssl)
getDBType
public Connector.DBType getDBType()
setDBType
public void setDBType(Connector.DBType type)
getHost
public String getHost()
setHost
public void setHost(String host)
getDbname
public String getDbname()
setDbname
public void setDbname(String dbname)
getPort
public Integer getPort()
setPort
public void setPort(Integer port)
getUser
public String getUser()
setUser
public void setUser(String user)
getPassword
public char[] getPassword()
setPassword
public void setPassword(char[] password)
isSSL
public boolean isSSL()
setSSL
public void setSSL(boolean ssl)
getConectionProperties
public Properties getConectionProperties()
createInstance
public Connection createInstance(EventObject eo)
throws SQLException
- Description copied from interface:
Factory
- creates a new instance of the factory type on each call based on the given event
- Specified by:
createInstance in interface Factory<Connection>
- Parameters:
eo - the event that triggered this instance creation; normally, this method
should also cope with the event to be null.
- Throws:
SQLException
getRelevantValue
public Connection getRelevantValue()
throws IOException
- a new connection is created on each call
- Specified by:
getRelevantValue in interface ValueRetriever<Connection>
- Throws:
IOException - if any resource to fulfill the request is not accessible
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads