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 ConnectionTypegetConnectionType()Returns the connection type, which we're gonna attempt to connect with.StringgetDatabaseName()Returns the name of the database.StringgetIp()Returns the ip of the sql server.StringgetPassword()Returns the password, with which we're gonna try to authenticate with the sql server.intgetPort()Returns the port of the ip, which represents the sql server.StringgetUsername()Returns the username, with which we're gonna try to authenticate with the sql server.voidsetConnectionType(ConnectionType connectionType)Sets a new connection typevoidsetDatabaseName(String databaseName)Sets a new database name.voidsetIp(String ip)Sets a new ip to use for sql server connection.voidsetPassword(String password)Sets a new passwordvoidsetPort(int port)Sets a new portvoidsetUsername(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
-
-