Class SQLConfiguration

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 dedicated SQLPrincipal.
    void setProperties​(java.util.Properties properties)
    Applies new properties to this configuration instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 name
      properties - 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 name
      properties - the configuration properties
      principal - 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

      public void setPrincipal​(SQLPrincipal principal)
      Sets new authentication parameters with the dedicated SQLPrincipal.
      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