Package me.hsgamer.hscore.database
Class Setting
java.lang.Object
me.hsgamer.hscore.database.Setting
The setting for connection
-
Method Summary
Modifier and TypeMethodDescriptionstatic SettingCreate a new setting with the default values from the driverstatic Settingdeserialize(Driver driver, Map<String, Object> map) Deserialize the setting from the mapGet all client propertiesGet all driver properties as a list of stringGet the database nameGet the driverGet all driver propertiesGet all driver properties as a list of stringgetHost()Get the hostGet the host and port as a base urlGet the passwordgetPort()Get the portGet the usernameSerialize the setting to the mapsetClientProperties(Map<String, Object> properties) Set the client propertiessetClientProperty(String property, Object value) Set the client propertysetDatabaseName(String databaseName) Set the database namesetDriverProperties(Map<String, Object> properties) Set the driver propertiessetDriverProperty(String property, Object value) Set the driver propertySet the hostsetPassword(String password) Set the passwordSet the portsetUsername(String username) Set the username
-
Method Details
-
create
Create a new setting with the default values from the driver- Parameters:
driver- the driver- Returns:
- the setting
-
deserialize
Deserialize the setting from the map- Parameters:
map- the map- Returns:
- the setting
-
serialize
Serialize the setting to the map- Returns:
- the map
-
getDriver
Get the driver- Returns:
- the driver
-
getHost
Get the host- Returns:
- the host
-
setHost
Set the host- Parameters:
host- the host- Returns:
thisfor builder chain
-
getDatabaseName
Get the database name- Returns:
- the database name
-
setDatabaseName
Set the database name- Parameters:
databaseName- the database name- Returns:
thisfor builder chain
-
getPort
Get the port- Returns:
- the port
-
setPort
Set the port- Parameters:
port- the port- Returns:
thisfor builder chain
-
getUsername
Get the username- Returns:
- the username
-
setUsername
Set the username- Parameters:
username- the username- Returns:
thisfor builder chain
-
getPassword
Get the password- Returns:
- the password
-
setPassword
Set the password- Parameters:
password- the password- Returns:
thisfor builder chain
-
setClientProperty
Set the client property- Parameters:
property- the propertyvalue- the value
-
getClientProperties
Get all client properties- Returns:
- the properties
-
setClientProperties
Set the client properties- Parameters:
properties- the properties
-
getClientPropertyStrings
Get all driver properties as a list of string- Returns:
- the properties as a list of string
-
setDriverProperty
Set the driver property- Parameters:
property- the propertyvalue- the value
-
getDriverProperties
Get all driver properties- Returns:
- the properties
-
setDriverProperties
Set the driver properties- Parameters:
properties- the properties
-
getDriverPropertyStrings
Get all driver properties as a list of string- Returns:
- the properties as a list of string
-
getNormalizedHost
Get the host and port as a base url- Returns:
- the base url
-