Package com.mrivanplays.sqlhelper
Class ConnectionConfig
- java.lang.Object
-
- com.mrivanplays.sqlhelper.ConnectionConfig
-
public final class ConnectionConfig extends Object
Represents a connection config, for specifying connection data.
-
-
Constructor Summary
Constructors Constructor Description ConnectionConfig()
ConnectionConfig(ConnectionType connectionType, String ip, int port, String databaseName, String username, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionType
getConnectionType()
Returns the connection type, which we're gonna attempt to connect with.String
getDatabaseName()
Returns the name of the database.String
getIp()
Returns the ip of the sql server.String
getPassword()
Returns the password, with which we're gonna try to authenticate with the sql server.int
getPort()
Returns the port of the ip, which represents the sql server.String
getUsername()
Returns the username, with which we're gonna try to authenticate with the sql server.void
setConnectionType(ConnectionType connectionType)
Sets a new connection typevoid
setDatabaseName(String databaseName)
Sets a new database name.void
setIp(String ip)
Sets a new ip to use for sql server connection.void
setPassword(String password)
Sets a new passwordvoid
setPort(int port)
Sets a new portvoid
setUsername(String username)
Sets a new username
-
-
-
Constructor Detail
-
ConnectionConfig
public ConnectionConfig()
-
ConnectionConfig
public ConnectionConfig(ConnectionType connectionType, String ip, int port, String databaseName, String username, String password)
-
-
Method Detail
-
getConnectionType
public ConnectionType getConnectionType()
Returns the connection type, which we're gonna attempt to connect with.- Returns:
- connection type
-
setConnectionType
public void setConnectionType(ConnectionType connectionType)
Sets a new connection type- Parameters:
connectionType
- connection type
-
getIp
public String getIp()
Returns the ip of the sql server.- Returns:
- ip
-
setIp
public void setIp(String ip)
Sets a new ip to use for sql server connection.- Parameters:
ip
- new ip
-
getPort
public int getPort()
Returns the port of the ip, which represents the sql server.- Returns:
- port
-
setPort
public void setPort(int port)
Sets a new port- Parameters:
port
- port
-
getDatabaseName
public String getDatabaseName()
Returns the name of the database.- Returns:
- database name
-
setDatabaseName
public void setDatabaseName(String databaseName)
Sets a new database name.- Parameters:
databaseName
- name of the database
-
getUsername
public String getUsername()
Returns the username, with which we're gonna try to authenticate with the sql server.- Returns:
- username
-
setUsername
public void setUsername(String username)
Sets a new username- Parameters:
username
- username
-
getPassword
public String getPassword()
Returns the password, with which we're gonna try to authenticate with the sql server.- Returns:
- password
-
setPassword
public void setPassword(String password)
Sets a new password- Parameters:
password
- password
-
-