java.lang.Object
org.proto4j.redis.sql.SQLConfiguration
public abstract class SQLConfiguration
extends java.lang.Object
The base class for all SQLConfiguration objects. This class is used to provide
a set of information about the connection that will be established.
The connection url will be provided through getQualifiedName()
, which
is implemented in every inheritor of this class.
- Since:
- 1.0
-
Constructor Summary
Constructors Modifier Constructor Description SQLConfiguration(java.lang.String driverType)
Create a new configuration instance without any additional configuration.SQLConfiguration(java.lang.String driverType, java.util.Properties properties)
Create a new configuration instance with additional configuration properties.protected
SQLConfiguration(java.lang.String driverType, java.util.Properties properties, SQLPrincipal principal)
A utility constructor for creating overloaded constructors. -
Method Summary
Modifier and Type Method Description java.lang.String
getDriverType()
java.security.Principal
getPrincipal()
java.util.Properties
getProperties()
abstract java.lang.String
getQualifiedName()
void
setPrincipal(SQLPrincipal principal)
Sets new authentication parameters with the dedicatedSQLPrincipal
.void
setProperties(java.util.Properties properties)
Applies new properties to this configuration instance.
-
Constructor Details
-
SQLConfiguration
public SQLConfiguration(java.lang.String driverType)Create a new configuration instance without any additional configuration.- Parameters:
driverType
- the jdbc driver name
-
SQLConfiguration
public SQLConfiguration(java.lang.String driverType, java.util.Properties properties)Create a new configuration instance with additional configuration properties. These could also include the username and password property for authentication.- Parameters:
driverType
- the jdbc driver nameproperties
- the configuration properties
-
SQLConfiguration
protected SQLConfiguration(java.lang.String driverType, java.util.Properties properties, SQLPrincipal principal)A utility constructor for creating overloaded constructors.- Parameters:
driverType
- the jdbc driver nameproperties
- the configuration propertiesprincipal
- the authentication parameters
-
-
Method Details
-
getQualifiedName
public abstract java.lang.String getQualifiedName()- Returns:
- the database connection url
-
getDriverType
public java.lang.String getDriverType()- Returns:
- the jdbc driver name
-
getPrincipal
public java.security.Principal getPrincipal()- Returns:
- the authentication parameters
-
getProperties
public java.util.Properties getProperties()- Returns:
- the configuration properties
-
setPrincipal
Sets new authentication parameters with the dedicatedSQLPrincipal
.- Parameters:
principal
- the authentication parameters
-
setProperties
public void setProperties(java.util.Properties properties)Applies new properties to this configuration instance.- Parameters:
properties
- the configuration properties
-